-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Versi server:                 5.6.37 - MySQL Community Server (GPL)
-- OS Server:                    Win32
-- HeidiSQL Versi:               11.0.0.6099
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

-- membuang struktur untuk table si_sarung.ast_aset
CREATE TABLE IF NOT EXISTS `ast_aset` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `nomor_aset` varchar(100) DEFAULT NULL,
  `nama_aset` varchar(100) NOT NULL,
  `id_akun_aset` int(11) NOT NULL DEFAULT '0',
  `tipe_id_akun_aset` char(1) NOT NULL DEFAULT 'D',
  `deskripsi` text NOT NULL,
  `tanggal_akuisisi` date DEFAULT NULL,
  `biaya_akuisisi` varchar(100) NOT NULL DEFAULT '0.0',
  `id_akun_bayar` int(11) DEFAULT '0',
  `tipe_id_akun_bayar` char(1) NOT NULL DEFAULT 'K',
  `id_pembelian` int(11) NOT NULL DEFAULT '0',
  `id_pembelian_barang` int(11) NOT NULL DEFAULT '0',
  `penyusutan` int(1) NOT NULL DEFAULT '0',
  `masa_manfaat` decimal(65,1) NOT NULL DEFAULT '0.0',
  `nilai_pertahun` decimal(65,2) NOT NULL DEFAULT '0.00',
  `id_akun_penyusutan` int(11) NOT NULL DEFAULT '0',
  `id_akun_akumulasi_penyusutan` int(11) NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ast_aset: ~0 rows (lebih kurang)
DELETE FROM `ast_aset`;
/*!40000 ALTER TABLE `ast_aset` DISABLE KEYS */;
/*!40000 ALTER TABLE `ast_aset` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ast_aset_jual
CREATE TABLE IF NOT EXISTS `ast_aset_jual` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `id_aset` int(11) NOT NULL DEFAULT '0',
  `tanggal_jual` date DEFAULT NULL,
  `id_akun_terima` int(11) NOT NULL DEFAULT '0',
  `tipe_id_akun_terima` char(100) NOT NULL DEFAULT 'D',
  `harga_jual` varchar(100) NOT NULL DEFAULT '0',
  `id_akun_selisih` int(11) NOT NULL DEFAULT '0',
  `tipe_id_akun_selisih` char(1) NOT NULL DEFAULT 'K',
  `nilai_selisih` varchar(100) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `ast_aset_jual_fk` (`id_aset`),
  CONSTRAINT `ast_aset_jual_fk` FOREIGN KEY (`id_aset`) REFERENCES `ast_aset` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ast_aset_jual: ~0 rows (lebih kurang)
DELETE FROM `ast_aset_jual`;
/*!40000 ALTER TABLE `ast_aset_jual` DISABLE KEYS */;
/*!40000 ALTER TABLE `ast_aset_jual` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ast_aset_penyusutan
CREATE TABLE IF NOT EXISTS `ast_aset_penyusutan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `tanggal_penyusutan` date DEFAULT NULL,
  `id_aset` int(11) NOT NULL DEFAULT '0',
  `biaya_penyusutan` varchar(100) NOT NULL DEFAULT '0',
  `akumulasi_penyusutan` varchar(100) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `ast_aset_penyusutan_fk` (`id_aset`),
  CONSTRAINT `ast_aset_penyusutan_fk` FOREIGN KEY (`id_aset`) REFERENCES `ast_aset` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ast_aset_penyusutan: ~0 rows (lebih kurang)
DELETE FROM `ast_aset_penyusutan`;
/*!40000 ALTER TABLE `ast_aset_penyusutan` DISABLE KEYS */;
/*!40000 ALTER TABLE `ast_aset_penyusutan` ENABLE KEYS */;

-- membuang struktur untuk view si_sarung.a_keu_bop
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_keu_bop` (
	`id_bop` INT(11) NOT NULL,
	`total_nominal` DOUBLE NULL,
	`total_realisasi` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_keu_jurnal_lain
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_keu_jurnal_lain` (
	`id_jurnal_lain` INT(11) NOT NULL,
	`total_debet` DOUBLE NULL,
	`total_kredit` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pem_orderbeli
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pem_orderbeli` (
	`id_orderbeli` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_order` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_tempo` DATE NULL,
	`id_penyedia` INT(100) NOT NULL,
	`potongan` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`termasuk_pajak` INT(11) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`nominal_ongkir` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan_revisi` TEXT NULL COLLATE 'latin1_swedish_ci',
	`syarat_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tempat_serah` INT(11) NULL,
	`tanggal_serah` DATE NULL,
	`penerima` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nominal_total` DOUBLE NULL,
	`nominal_pajak_detail` DOUBLE NULL,
	`nominal_pajak` DOUBLE NULL,
	`data_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pem_pembelian
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pem_pembelian` (
	`id_pembelian` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NULL,
	`id_penyedia` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`termasuk_pajak` INT(11) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_ongkir` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`syarat_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tempat_serah` INT(11) NULL,
	`tanggal_serah` DATE NULL,
	`penerima` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_ongkir` INT(11) NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`data_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nominal_total` DOUBLE NULL,
	`nominal_pajak` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pem_sewa
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pem_sewa` (
	`id_sewa` INT(11) NOT NULL,
	`id_lokasi` INT(11) NOT NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`no_faktur` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_faktur` DATE NOT NULL,
	`tahun` INT(3) NOT NULL,
	`harga_per_tahun` VARCHAR(25) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_awal` DATE NOT NULL,
	`tanggal_akhir` DATE NOT NULL,
	`id_penyedia` INT(11) NOT NULL,
	`fungsi` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jenis` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`alamat` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`costing` VARCHAR(35) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_sewa` INT(11) NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nominal_total` DOUBLE NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pen_penjualan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pen_penjualan` (
	`id_penjualan` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NOT NULL,
	`tanggal_full` DATETIME NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`status_kirim` INT(1) NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`kurs_bayar` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_surat` DATE NULL,
	`no_surat` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_surat` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keterangan_surat` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_piutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_penjualan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`total_barang` DOUBLE NULL,
	`nominal_total` DOUBLE NULL,
	`nominal_pajak` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pen_penjualan_retur
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pen_penjualan_retur` (
	`id` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_retur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_retur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_retur` DATE NOT NULL,
	`tanggal_full` DATETIME NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`id_penjualan` INT(11) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COMMENT '0=>retur, 1=>terima gudang' COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`kurs_bayar` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_piutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_retur_penjualan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`total_barang` DOUBLE NULL,
	`nominal_total` DOUBLE NULL,
	`nominal_pajak` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pen_penjualan_retur_barang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pen_penjualan_retur_barang` (
	`id_jual_barang` INT(100) NOT NULL,
	`id_penjualan` INT(100) NOT NULL,
	`id_barang` INT(100) NOT NULL,
	`nama_barang` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`jml_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang_konv` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`potongan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`total` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` INT(11) NOT NULL,
	`id_satuan` MEDIUMINT(9) NOT NULL,
	`jumlah` DOUBLE NOT NULL,
	`jumlah_konversi` DOUBLE NOT NULL,
	`id_workorder` INT(11) NOT NULL,
	`id_workorder_barang` INT(11) NOT NULL,
	`id_komposisi` INT(11) NOT NULL,
	`id_proses` INT(11) NOT NULL,
	`id_kualitas` MEDIUMINT(9) NOT NULL,
	`id_motif_barang` INT(11) NOT NULL,
	`id_motif` INT(100) NOT NULL,
	`id_kualitas_dudul` INT(11) NOT NULL,
	`id_label` INT(11) NOT NULL,
	`id_kemasan` INT(11) NOT NULL,
	`id_kemasansatuan` INT(11) NOT NULL,
	`id_kemasansepuluh` INT(11) NOT NULL,
	`id_kemasanseratus` INT(11) NOT NULL,
	`id_plat` INT(11) NOT NULL,
	`id_cap` INT(11) NOT NULL,
	`id_kualitas_proses` INT(11) NOT NULL,
	`id_kualitas_periksa` INT(11) NOT NULL,
	`id_perubahansatuan` INT(11) NOT NULL,
	`jumlah_rencana` DOUBLE NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`update_at` TIMESTAMP NOT NULL,
	`id` INT(11) NOT NULL,
	`id_penjualan_retur` INT(11) NOT NULL,
	`id_penjualan_barang` INT(11) NOT NULL,
	`jml_retur` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`total_retur` DOUBLE NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pen_penjualan_retur_barang_nonfaktur
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pen_penjualan_retur_barang_nonfaktur` (
	`id` INT(11) NOT NULL,
	`id_penjualan_retur` INT(11) NOT NULL,
	`id_barang` INT(11) NOT NULL,
	`jml_retur` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`total_retur` DOUBLE NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pen_penjualan_retur_groupby_penjualan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pen_penjualan_retur_groupby_penjualan` (
	`id_penjualan` INT(11) NOT NULL,
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`kurs_bayar` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`total_barang` DOUBLE NULL,
	`nominal_total` DOUBLE NULL,
	`nominal_pajak` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pen_penjualan_retur_nonfaktur
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pen_penjualan_retur_nonfaktur` (
	`id` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_retur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_retur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_retur` DATE NOT NULL,
	`tanggal_full` DATETIME NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`id_penjualan` INT(1) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COMMENT '0=>retur, 1=>terima gudang' COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`kurs_bayar` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_piutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_retur_penjualan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`total_barang` DOUBLE NULL,
	`nominal_total` DOUBLE NULL,
	`nominal_pajak` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upahproduksi
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upahproduksi` (
	`id_upahproduksi` INT(100) NOT NULL,
	`id_barangmasuk` INT(100) NULL,
	`id_barangkeluar` INT(11) NOT NULL,
	`id_proses` INT(11) NOT NULL,
	`id_pegawai` INT(11) NOT NULL,
	`id_rekanan` INT(11) NOT NULL,
	`nomor` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`lap_hasil` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` INT(11) NOT NULL,
	`id_workorder_barang` INT(11) NOT NULL,
	`id_lokasi` INT(11) NOT NULL,
	`tanggal` DATE NOT NULL,
	`id_jenis` INT(11) NOT NULL,
	`id_akun_upah` INT(11) NOT NULL,
	`status_bayar` INT(11) NOT NULL,
	`akun_bayar` INT(11) NOT NULL,
	`tanggal_bayar` DATE NULL,
	`jumlah_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`pajak` TINYINT(2) NOT NULL,
	`id_akun_pajak` INT(11) NOT NULL,
	`created_at` TIMESTAMP NULL,
	`updated_at` TIMESTAMP NULL,
	`total_upah` DOUBLE NOT NULL,
	`total_upah_harian` DOUBLE NOT NULL,
	`total_lain` DECIMAL(33,0) NOT NULL,
	`total_bayar_kasbon` DECIMAL(32,0) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upahproduksi_harian
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upahproduksi_harian` (
	`id_upahproduksi` INT(11) NULL,
	`total_upah_harian` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upahproduksi_harian_kemasan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upahproduksi_harian_kemasan` (
	`id_upah_kemasan` INT(11) NULL,
	`total_upah_harian` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upahproduksi_kemasan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upahproduksi_kemasan` (
	`id` INT(100) NOT NULL,
	`id_barangmasuk_kemasan` INT(100) NULL,
	`id_barangkeluar_kemasan` INT(11) NOT NULL,
	`id_proses` INT(11) NOT NULL,
	`id_pegawai` INT(11) NOT NULL,
	`id_rekanan` INT(11) NOT NULL,
	`nomor` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`lap_hasil` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` INT(11) NOT NULL,
	`tanggal` DATE NOT NULL,
	`id_jenis` INT(11) NOT NULL,
	`id_akun_upah` INT(11) NOT NULL,
	`status_bayar` INT(11) NOT NULL,
	`akun_bayar` INT(11) NOT NULL,
	`tanggal_bayar` DATE NULL,
	`jumlah_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`pajak` TINYINT(2) NULL,
	`created_at` TIMESTAMP NULL,
	`updated_at` TIMESTAMP NULL,
	`total_upah` DOUBLE NOT NULL,
	`total_upah_harian` DOUBLE NOT NULL,
	`total_lain` DECIMAL(32,0) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upahproduksi_lainnya
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upahproduksi_lainnya` (
	`id_upahproduksi` INT(11) NOT NULL,
	`id_pegawai` INT(11) NOT NULL,
	`id_rekanan` INT(11) NOT NULL,
	`id_lokasi` INT(11) NOT NULL,
	`id_proses` INT(11) NOT NULL,
	`tanggal_upah` DATE NOT NULL,
	`tanggal_hasil` DATE NOT NULL,
	`nomor` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_upah` INT(11) NOT NULL,
	`id_akun_bayar` INT(11) NOT NULL,
	`status_bayar` INT(11) NOT NULL,
	`tanggal_bayar` DATE NOT NULL,
	`jenis` CHAR(2) NOT NULL COMMENT '0 -> Lainnya dengan laporan hasil, 1 -> Tanpa laporan hasil' COLLATE 'latin1_swedish_ci',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`total_upah` DECIMAL(32,0) NOT NULL,
	`total_lain` DOUBLE NOT NULL,
	`total_bayar_kasbon` DOUBLE NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upahtenun
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upahtenun` (
	`id_upahproduksi` INT(11) NOT NULL,
	`id_rekanan` INT(11) NOT NULL,
	`nomor` VARCHAR(10) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_akun_upah` INT(11) NOT NULL,
	`status_bayar` TINYINT(2) NOT NULL COMMENT '0 : Belum Bayar | 1 : Sudah Bayar',
	`akun_bayar` INT(11) NOT NULL,
	`tanggal_bayar` DATE NULL,
	`jumlah_bayar` DOUBLE NULL,
	`pajak` INT(1) NOT NULL,
	`id_akun_pajak` INT(1) NOT NULL,
	`total_upah` DOUBLE NOT NULL,
	`total_lain` DOUBLE NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upahtenun_detail_total
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upahtenun_detail_total` (
	`id_upahtenun` INT(11) NOT NULL,
	`total_upah` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upahtenun_lain_total
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upahtenun_lain_total` (
	`id_upahtenun` INT(11) NOT NULL,
	`total_lain` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upahtenun_pick_total
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upahtenun_pick_total` (
	`id_upahtenun` INT(11) NOT NULL,
	`total_pick` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upahtenun_total
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upahtenun_total` (
	`id_upah_borongan` INT(11) NOT NULL,
	`total_upah` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upah_borongan_lain_lain
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upah_borongan_lain_lain` (
	`id_upah_borongan` INT(11) NOT NULL,
	`total_lain` DECIMAL(33,0) NULL,
	`total_bayar_kasbon` DECIMAL(32,0) NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upah_kemasan_lain_lain
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upah_kemasan_lain_lain` (
	`id_upah_kemasan` INT(11) NOT NULL,
	`total_lain` DECIMAL(32,0) NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upah_total
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upah_total` (
	`id_upah_borongan` INT(10) NOT NULL,
	`total_upah` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_pro_upah_total_kemasan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_pro_upah_total_kemasan` (
	`id_upah_kemasan` INT(11) NOT NULL,
	`total_upah` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_ref_jurnal
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_ref_jurnal` (
	`id` INT(100) NULL,
	`kd_rek_1` INT(100) NULL,
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`level` INT(12) NULL,
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`used` INT(100) NULL,
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`locked` INT(100) NULL,
	`created_at` TIMESTAMP NULL,
	`updated_at` TIMESTAMP NULL,
	`kode` VARCHAR(11) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_id_akun_jurnal` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`rows` INT(11) NULL COMMENT '1=debet, 2=kredit'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_serv_orderservice_pajak
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_serv_orderservice_pajak` (
	`id` INT(100) NOT NULL,
	`id_nota` INT(100) NOT NULL,
	`id_akun` INT(100) NOT NULL,
	`nominal` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`pemotongan` INT(11) NOT NULL,
	`id_akun_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nominal_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_total_pem_orderbeli_detail
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_total_pem_orderbeli_detail` (
	`id_orderbeli` INT(100) NOT NULL,
	`nominal_total` DOUBLE NULL,
	`total` DOUBLE NULL,
	`nominal_ppn` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_total_pem_pembelian_detail
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_total_pem_pembelian_detail` (
	`id_pembelian` INT(100) NOT NULL,
	`nominal_total` DOUBLE NULL,
	`total` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_total_pem_sewa
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_total_pem_sewa` (
	`id_sewa` INT(11) NOT NULL,
	`nominal_total` DOUBLE NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_total_pen_penjualan_detail
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_total_pen_penjualan_detail` (
	`id_penjualan` INT(100) NOT NULL,
	`total_barang` DOUBLE NULL,
	`nominal_total` DOUBLE NULL,
	`total` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_total_pen_penjualan_retur_detail
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_total_pen_penjualan_retur_detail` (
	`id_penjualan_retur` INT(11) NOT NULL,
	`id_penjualan_barang` INT(11) NOT NULL,
	`total_barang` DOUBLE NULL,
	`nominal_total` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_total_pen_penjualan_retur_detail_groupby_penjualan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_total_pen_penjualan_retur_detail_groupby_penjualan` (
	`id_penjualan_retur` INT(11) NOT NULL,
	`id_penjualan_barang` INT(11) NOT NULL,
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`kurs_bayar` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`total_barang` DOUBLE NULL,
	`nominal_total` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_total_pen_penjualan_retur_nonfaktur_detail
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_total_pen_penjualan_retur_nonfaktur_detail` (
	`id_penjualan_retur` INT(11) NOT NULL,
	`total_barang` DOUBLE NULL,
	`nominal_total` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_total_serv_orderservice_detail
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_total_serv_orderservice_detail` (
	`id_nota` INT(100) NOT NULL,
	`sub_total` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_total_serv_orderservice_pajak
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_total_serv_orderservice_pajak` (
	`id_nota` INT(100) NOT NULL,
	`nominal_pajak` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_upahproduksi_lainnya_lainlain_total
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_upahproduksi_lainnya_lainlain_total` (
	`id_upahproduksi_lainnya` INT(11) NOT NULL,
	`total_lain` DOUBLE NULL,
	`total_bayar_kasbon` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_upahproduksi_lainnya_total
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_upahproduksi_lainnya_total` (
	`id_upahproduksi_lainnya` INT(11) NOT NULL,
	`total_upah` DECIMAL(32,0) NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_view_keu_sales_contract_tagihan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_view_keu_sales_contract_tagihan` (
	`id_sales_contract_tagihan` INT(11) NOT NULL,
	`nominal` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_view_keu_sumber_dana
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_view_keu_sumber_dana` (
	`id_keu_sumber_dana` INT(11) NOT NULL,
	`nominal` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_view_keu_sumber_dana_detail
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `a_view_keu_sumber_dana_detail` (
	`id` INT(11) NOT NULL,
	`id_keu_sumber_dana` INT(11) NOT NULL,
	`ke_akun` INT(11) NOT NULL,
	`nominal_transaksi` VARCHAR(65) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_id_akun` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nomor_transaksi_konversi` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.histori_akun
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `histori_akun` (
	`lokasi_ref` INT(11) NOT NULL,
	`id_ref` INT(11) NOT NULL,
	`tanggal_ref` DATE NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`dari_akun` INT(11) NOT NULL,
	`dari_akun_tipe_id_akun` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`dari_akun_kd_rek_1` INT(100) NOT NULL,
	`dari_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`dari_akun_nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun` INT(11) NOT NULL,
	`ke_akun_tipe_id_akun` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`ke_akun_kd_rek_1` INT(100) NOT NULL,
	`ke_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun_nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_transaksi` VARCHAR(65) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.histori_akun_orderservice_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `histori_akun_orderservice_bayar` (
	`lokasi_ref` INT(11) NOT NULL,
	`id_ref` INT(11) NOT NULL,
	`tanggal_ref` DATE NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`dari_akun` INT(100) NOT NULL,
	`dari_akun_tipe_id_akun` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`dari_akun_kd_rek_1` INT(100) NOT NULL,
	`dari_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`dari_akun_nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`ke_akun` INT(100) NOT NULL,
	`ke_akun_tipe_id_akun` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ke_akun_kd_rek_1` INT(100) NOT NULL,
	`ke_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun_nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`nominal_transaksi` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keterangan` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.histori_akun_pembelian_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `histori_akun_pembelian_bayar` (
	`lokasi_ref` INT(11) NOT NULL,
	`id_ref` INT(11) NOT NULL,
	`tanggal_ref` DATE NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`dari_akun` INT(100) NOT NULL,
	`dari_akun_tipe_id_akun` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`dari_akun_kd_rek_1` INT(100) NOT NULL,
	`dari_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`dari_akun_nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`ke_akun` INT(100) NOT NULL,
	`ke_akun_tipe_id_akun` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ke_akun_kd_rek_1` INT(100) NOT NULL,
	`ke_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun_nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`nominal_transaksi` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keterangan` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.histori_akun_penjualan_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `histori_akun_penjualan_bayar` (
	`lokasi_ref` INT(11) NOT NULL,
	`id_ref` INT(11) NOT NULL,
	`tanggal_ref` DATE NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`dari_akun` INT(100) NOT NULL,
	`dari_akun_tipe_id_akun` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`dari_akun_kd_rek_1` INT(100) NOT NULL,
	`dari_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`dari_akun_nama_perkiraan` VARCHAR(301) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun` INT(100) NOT NULL,
	`ke_akun_tipe_id_akun` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ke_akun_kd_rek_1` INT(100) NOT NULL,
	`ke_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun_nama_perkiraan` VARCHAR(301) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_transaksi` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keterangan` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.histori_akun_sales_contract_tagihan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `histori_akun_sales_contract_tagihan` (
	`lokasi_ref` INT(11) NOT NULL,
	`id_ref` INT(11) NOT NULL,
	`tanggal_ref` DATE NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`dari_akun` INT(11) NOT NULL,
	`dari_akun_tipe_id_akun` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`dari_akun_kd_rek_1` INT(100) NOT NULL,
	`dari_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`dari_akun_nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun` INT(11) NOT NULL,
	`ke_akun_tipe_id_akun` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`ke_akun_kd_rek_1` INT(100) NOT NULL,
	`ke_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun_nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_transaksi` VARCHAR(65) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.histori_akun_sewa_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `histori_akun_sewa_bayar` (
	`lokasi_ref` INT(11) NOT NULL,
	`id_ref` INT(11) NOT NULL,
	`tanggal_ref` DATE NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`dari_akun` INT(100) NOT NULL,
	`dari_akun_tipe_id_akun` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`dari_akun_kd_rek_1` INT(100) NOT NULL,
	`dari_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`dari_akun_nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`ke_akun` INT(100) NOT NULL,
	`ke_akun_tipe_id_akun` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ke_akun_kd_rek_1` INT(100) NOT NULL,
	`ke_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun_nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`nominal_transaksi` VARCHAR(53) NULL COLLATE 'latin1_swedish_ci',
	`keterangan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.histori_akun_sumber_dana
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `histori_akun_sumber_dana` (
	`lokasi_ref` INT(11) NOT NULL,
	`id_ref` INT(11) NOT NULL,
	`tanggal_ref` DATE NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`dari_akun` INT(11) NOT NULL,
	`dari_akun_tipe_id_akun` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`dari_akun_kd_rek_1` INT(100) NOT NULL,
	`dari_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`dari_akun_nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun` INT(11) NOT NULL,
	`ke_akun_tipe_id_akun` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`ke_akun_kd_rek_1` INT(100) NOT NULL,
	`ke_akun_kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ke_akun_nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_transaksi` VARCHAR(65) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk table si_sarung.inv_opname
CREATE TABLE IF NOT EXISTS `inv_opname` (
  `id_opname` int(11) NOT NULL AUTO_INCREMENT,
  `id_gudang` int(11) NOT NULL,
  `keterangan` text NOT NULL,
  `tanggal` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `id_user` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_opname`) USING BTREE,
  KEY `index_invopname` (`id_opname`,`id_gudang`,`id_user`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_opname: ~0 rows (lebih kurang)
DELETE FROM `inv_opname`;
/*!40000 ALTER TABLE `inv_opname` DISABLE KEYS */;
/*!40000 ALTER TABLE `inv_opname` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.inv_opnameproduksi
CREATE TABLE IF NOT EXISTS `inv_opnameproduksi` (
  `id_opname` int(11) NOT NULL AUTO_INCREMENT,
  `id_lokasi` int(11) NOT NULL DEFAULT '0',
  `tanggal_full` datetime NOT NULL,
  `keterangan` text NOT NULL,
  `id_user` int(11) NOT NULL DEFAULT '0',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_opname`),
  KEY `index_invopnameproduksi` (`id_lokasi`,`id_user`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_opnameproduksi: 0 rows
DELETE FROM `inv_opnameproduksi`;
/*!40000 ALTER TABLE `inv_opnameproduksi` DISABLE KEYS */;
/*!40000 ALTER TABLE `inv_opnameproduksi` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.inv_opnameproduksi_barang
CREATE TABLE IF NOT EXISTS `inv_opnameproduksi_barang` (
  `id_opnameproduksi_barang` int(10) NOT NULL AUTO_INCREMENT,
  `id_opname` int(100) NOT NULL,
  `id_gudang` int(100) NOT NULL,
  `id_barang` int(100) NOT NULL,
  `jumlah_stok` varchar(20) NOT NULL,
  `jumlah_opname` varchar(12) NOT NULL,
  `jumlah_selisih` varchar(20) NOT NULL,
  `keterangan` text NOT NULL,
  `id_workorder` int(100) NOT NULL,
  `id_workorder_barang` int(100) NOT NULL,
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `id_kualitas` mediumint(9) NOT NULL DEFAULT '0',
  `id_komposisi` int(11) NOT NULL DEFAULT '0',
  `id_motif_barang` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `id_motif` int(100) NOT NULL,
  `id_kualitas_dudul` int(11) NOT NULL DEFAULT '0',
  `id_label` int(11) NOT NULL,
  `id_kemasan` int(11) NOT NULL,
  `id_kemasansatuan` int(11) NOT NULL,
  `id_kemasansepuluh` int(11) NOT NULL,
  `id_kemasanseratus` int(11) NOT NULL,
  `id_cap` int(11) NOT NULL,
  `id_kualitas_proses` int(11) NOT NULL,
  `id_kualitas_periksa` int(11) NOT NULL,
  `id_perubahansatuan` int(11) NOT NULL,
  `jumlah_rencana` double NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `id_proses_sekarang` int(11) NOT NULL DEFAULT '0',
  `id_satuan_hasil` int(11) NOT NULL DEFAULT '0',
  `id_pegawai` int(255) NOT NULL DEFAULT '0',
  `id_rekanan` int(255) NOT NULL DEFAULT '0',
  `id_mesin` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_opnameproduksi_barang`),
  KEY `index_invopnameproduksi_barang` (`id_opname`,`id_gudang`,`id_barang`,`id_workorder`,`id_workorder_barang`,`id_proses`,`id_kualitas`,`id_komposisi`,`id_motif_barang`,`id_satuan`,`id_motif`,`id_opnameproduksi_barang`,`id_perubahansatuan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_opnameproduksi_barang: ~0 rows (lebih kurang)
DELETE FROM `inv_opnameproduksi_barang`;
/*!40000 ALTER TABLE `inv_opnameproduksi_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `inv_opnameproduksi_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.inv_opname_barang
CREATE TABLE IF NOT EXISTS `inv_opname_barang` (
  `id_opname_barang` int(100) NOT NULL AUTO_INCREMENT,
  `id_opname` int(100) NOT NULL,
  `id_barang` int(100) NOT NULL,
  `jumlah_stok` float NOT NULL DEFAULT '0',
  `jumlah_opname` float NOT NULL DEFAULT '0',
  `jumlah_selisih` float NOT NULL,
  `keterangan` text NOT NULL,
  `id_workorder` int(100) NOT NULL,
  `id_workorder_barang` int(100) NOT NULL,
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `id_kualitas` mediumint(9) NOT NULL DEFAULT '0',
  `id_komposisi` int(11) NOT NULL DEFAULT '0',
  `id_motif_barang` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `id_motif` int(100) NOT NULL,
  `id_kualitas_dudul` int(11) NOT NULL DEFAULT '0',
  `id_label` int(11) NOT NULL,
  `id_kemasan` int(11) NOT NULL,
  `id_kemasansatuan` int(11) NOT NULL,
  `id_kemasansepuluh` int(11) NOT NULL,
  `id_kemasanseratus` int(11) NOT NULL,
  `id_cap` int(11) NOT NULL,
  `id_kualitas_proses` int(11) NOT NULL,
  `id_kualitas_periksa` int(11) NOT NULL,
  `id_perubahansatuan` int(11) NOT NULL,
  `jumlah_rencana` double NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_opname_barang`) USING BTREE,
  KEY `fk_opnamebarang` (`id_opname`) USING BTREE,
  KEY `index_invopname_barang` (`id_opname`,`id_barang`,`id_workorder`,`id_workorder_barang`,`id_proses`,`id_komposisi`,`id_motif_barang`,`id_motif`,`id_satuan`,`id_perubahansatuan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_opname_barang: ~0 rows (lebih kurang)
DELETE FROM `inv_opname_barang`;
/*!40000 ALTER TABLE `inv_opname_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `inv_opname_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.inv_pengeluaran
CREATE TABLE IF NOT EXISTS `inv_pengeluaran` (
  `id_pengeluaran` int(11) NOT NULL AUTO_INCREMENT,
  `id_lokasi` int(11) NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `keterangan` text NOT NULL,
  `id_user` int(11) NOT NULL DEFAULT '0',
  `jenis` int(11) NOT NULL DEFAULT '0',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_pengeluaran`),
  KEY `index_invpengeluaran` (`id_pengeluaran`,`id_lokasi`,`id_user`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_pengeluaran: 0 rows
DELETE FROM `inv_pengeluaran`;
/*!40000 ALTER TABLE `inv_pengeluaran` DISABLE KEYS */;
/*!40000 ALTER TABLE `inv_pengeluaran` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.inv_pengeluaran_barang
CREATE TABLE IF NOT EXISTS `inv_pengeluaran_barang` (
  `id_pengeluaran_barang` int(11) NOT NULL AUTO_INCREMENT,
  `id_pengeluaran` int(11) NOT NULL,
  `id_barang` int(11) NOT NULL,
  `id_gudang` int(11) NOT NULL,
  `jumlah` text NOT NULL,
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `status` char(2) NOT NULL DEFAULT '',
  `id_barangmasuk_barang` int(11) NOT NULL DEFAULT '0',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_pengeluaran_barang`),
  KEY `fk_pengeluaran` (`id_pengeluaran`),
  KEY `index_invpengeluaran_barang` (`id_pengeluaran`,`id_barang`,`id_gudang`,`id_satuan`,`id_barangmasuk_barang`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_pengeluaran_barang: 0 rows
DELETE FROM `inv_pengeluaran_barang`;
/*!40000 ALTER TABLE `inv_pengeluaran_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `inv_pengeluaran_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.inv_rubahspk
CREATE TABLE IF NOT EXISTS `inv_rubahspk` (
  `id_rubahspk` int(11) NOT NULL AUTO_INCREMENT,
  `tanggal` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `id_lokasi` int(11) NOT NULL,
  `keterangan` text NOT NULL,
  `id_workorder_awal` int(11) NOT NULL,
  `id_workorder_barang_awal` int(11) NOT NULL,
  `id_workorder_akhir` int(11) NOT NULL,
  `id_workrder_barang_akhir` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_rubahspk`) USING BTREE,
  KEY `index_invrubahspk` (`id_lokasi`,`id_user`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1647 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_rubahspk: ~651 rows (lebih kurang)
DELETE FROM `inv_rubahspk`;
/*!40000 ALTER TABLE `inv_rubahspk` DISABLE KEYS */;
INSERT INTO `inv_rubahspk` (`id_rubahspk`, `tanggal`, `tanggal_full`, `id_lokasi`, `keterangan`, `id_workorder_awal`, `id_workorder_barang_awal`, `id_workorder_akhir`, `id_workrder_barang_akhir`, `id_user`, `created_at`, `update_at`) VALUES
	(1043, '2020-09-03', '2020-09-03 14:43:06', 1, 'TENUN AA.0020', 0, 0, 0, 0, 22, '2020-09-03 14:43:06', '2020-09-03 14:43:06'),
	(1044, '2020-09-03', '2020-09-03 14:54:47', 1, 'TENUN AA.0021', 0, 0, 0, 0, 22, '2020-09-03 14:54:47', '2020-09-03 14:54:47'),
	(1045, '2020-09-03', '2020-09-03 15:10:41', 1, 'TENUN Y.0256', 0, 0, 0, 0, 22, '2020-09-03 15:10:41', '2020-09-03 15:10:41'),
	(1046, '2020-09-03', '2020-09-03 15:21:34', 1, 'TENUN E.1615', 0, 0, 0, 0, 22, '2020-09-03 15:21:34', '2020-09-03 15:21:34'),
	(1047, '2020-09-03', '2020-09-03 15:26:27', 1, 'TENUN E.1614', 0, 0, 0, 0, 22, '2020-09-03 15:26:27', '2020-09-03 15:26:27'),
	(1048, '2020-09-04', '2020-09-04 10:11:04', 1, '', 0, 0, 0, 0, 9, '2020-09-04 10:11:04', '2020-09-04 10:11:04'),
	(1049, '2020-09-04', '2020-09-04 10:14:37', 1, '', 0, 0, 0, 0, 9, '2020-09-04 10:14:37', '2020-09-04 10:14:37'),
	(1050, '2020-09-04', '2020-09-04 10:15:06', 1, '', 0, 0, 0, 0, 9, '2020-09-04 10:15:06', '2020-09-04 10:15:06'),
	(1051, '2020-09-07', '2020-09-07 09:51:07', 1, '', 0, 0, 0, 0, 9, '2020-09-07 09:51:07', '2020-09-07 09:51:07'),
	(1052, '2020-09-07', '2020-09-07 13:15:13', 1, 'TENUN Y.0260', 0, 0, 0, 0, 22, '2020-09-07 13:15:13', '2020-09-07 13:15:13'),
	(1053, '2020-09-07', '2020-09-07 13:27:19', 1, 'TENUN Y.0270', 0, 0, 0, 0, 22, '2020-09-07 13:27:19', '2020-09-07 13:27:19'),
	(1054, '2020-09-07', '2020-09-07 13:42:29', 1, 'TENUN J.0773', 0, 0, 0, 0, 22, '2020-09-07 13:42:29', '2020-09-07 13:42:29'),
	(1055, '2020-09-07', '2020-09-07 13:58:58', 1, 'TENUN K.0447', 0, 0, 0, 0, 22, '2020-09-07 13:58:58', '2020-09-07 13:58:58'),
	(1056, '2020-09-07', '2020-09-07 14:14:51', 1, 'TENUN J.0785', 0, 0, 0, 0, 22, '2020-09-07 14:14:51', '2020-09-07 14:14:51'),
	(1057, '2020-09-07', '2020-09-07 14:36:48', 1, 'TENUN RR.0010', 0, 0, 0, 0, 22, '2020-09-07 14:34:36', '2020-09-07 14:34:36'),
	(1058, '2020-09-07', '2020-09-07 15:03:24', 1, 'TENUN A.1303', 0, 0, 0, 0, 22, '2020-09-07 15:03:24', '2020-09-07 15:03:24'),
	(1059, '2020-09-07', '2020-09-07 15:13:17', 1, 'TENUN E.1612', 0, 0, 0, 0, 22, '2020-09-07 15:13:17', '2020-09-07 15:13:17'),
	(1060, '2020-09-07', '2020-09-07 15:21:10', 1, 'TENUN H.1095', 0, 0, 0, 0, 22, '2020-09-07 15:21:10', '2020-09-07 15:21:10'),
	(1061, '2020-09-07', '2020-09-07 15:31:08', 1, 'TENUN  E.1606', 0, 0, 0, 0, 22, '2020-09-07 15:31:08', '2020-09-07 15:31:08'),
	(1062, '2020-09-08', '2020-09-08 10:48:48', 1, 'TENUN E.1605', 0, 0, 0, 0, 22, '2020-09-08 10:48:48', '2020-09-08 10:48:48'),
	(1063, '2020-09-08', '2020-09-08 13:29:03', 1, 'TENUN A.1322', 0, 0, 0, 0, 22, '2020-09-08 13:29:03', '2020-09-08 13:29:03'),
	(1064, '2020-09-08', '2020-09-08 13:39:38', 1, 'TENUN C.0414', 0, 0, 0, 0, 22, '2020-09-08 13:39:38', '2020-09-08 13:39:38'),
	(1065, '2020-09-08', '2020-09-08 13:55:16', 1, 'TENUN G.0351', 0, 0, 0, 0, 22, '2020-09-08 13:55:16', '2020-09-08 13:55:16'),
	(1066, '2020-09-09', '2020-09-09 10:23:20', 1, '', 0, 0, 0, 0, 9, '2020-09-09 10:23:20', '2020-09-09 10:23:20'),
	(1067, '2020-09-09', '2020-09-09 10:30:32', 1, '', 0, 0, 0, 0, 9, '2020-09-09 10:30:32', '2020-09-09 10:30:32'),
	(1068, '2020-09-10', '2020-09-10 15:36:50', 1, 'TENUN AA.0022', 0, 0, 0, 0, 22, '2020-09-10 15:36:50', '2020-09-10 15:36:50'),
	(1069, '2020-09-11', '2020-09-11 09:58:16', 1, '', 0, 0, 0, 0, 9, '2020-09-11 09:58:16', '2020-09-11 09:58:16'),
	(1070, '2020-09-11', '2020-09-11 10:01:39', 1, '', 0, 0, 0, 0, 9, '2020-09-11 10:01:39', '2020-09-11 10:01:39'),
	(1071, '2020-09-11', '2020-09-11 10:29:03', 1, 'TENUN H.1091', 0, 0, 0, 0, 22, '2020-09-11 10:29:03', '2020-09-11 10:29:03'),
	(1072, '2020-09-11', '2020-09-11 10:48:51', 1, 'TENUN J.0783', 0, 0, 0, 0, 22, '2020-09-11 10:48:51', '2020-09-11 10:48:51'),
	(1073, '2020-09-11', '2020-09-11 13:19:03', 1, 'TENUN P.0661', 0, 0, 0, 0, 22, '2020-09-11 13:19:03', '2020-09-11 13:19:03'),
	(1074, '2020-09-11', '2020-09-11 13:42:35', 1, 'TENUN P.0664', 0, 0, 0, 0, 22, '2020-09-11 13:42:35', '2020-09-11 13:42:35'),
	(1075, '2020-09-12', '2020-09-12 08:15:11', 1, 'TENUN H.1103', 0, 0, 0, 0, 22, '2020-09-12 08:15:11', '2020-09-12 08:15:11'),
	(1076, '2020-09-12', '2020-09-12 08:23:41', 1, 'TENUN E.1603', 0, 0, 0, 0, 22, '2020-09-12 08:23:41', '2020-09-12 08:23:41'),
	(1077, '2020-09-14', '2020-09-14 13:10:16', 1, 'TENUN RR.0012', 0, 0, 0, 0, 22, '2020-09-14 13:10:16', '2020-09-14 13:10:16'),
	(1078, '2020-09-14', '2020-09-14 14:46:13', 1, 'TENUN H.1093', 0, 0, 0, 0, 22, '2020-09-14 13:27:08', '2020-09-14 13:27:08'),
	(1079, '2020-09-14', '2020-09-14 13:40:33', 1, 'TENUN NN.0287', 0, 0, 0, 0, 22, '2020-09-14 13:40:33', '2020-09-14 13:40:33'),
	(1080, '2020-09-14', '2020-09-14 14:45:05', 1, 'TENUN NN.0286', 0, 0, 0, 0, 22, '2020-09-14 13:49:50', '2020-09-14 13:49:50'),
	(1081, '2020-09-14', '2020-09-14 14:02:42', 1, 'TENUN H.1094', 0, 0, 0, 0, 22, '2020-09-14 14:02:42', '2020-09-14 14:02:42'),
	(1082, '2020-09-14', '2020-09-14 14:55:26', 1, 'TENUN Y.0206', 0, 0, 0, 0, 22, '2020-09-14 14:21:44', '2020-09-14 14:21:44'),
	(1083, '2020-09-14', '2020-09-14 14:42:25', 1, 'TENUN Y.0208', 0, 0, 0, 0, 22, '2020-09-14 14:33:12', '2020-09-14 14:33:12'),
	(1084, '2020-09-14', '2020-09-14 15:05:17', 1, 'TENUN Y.0249', 0, 0, 0, 0, 22, '2020-09-14 15:05:17', '2020-09-14 15:05:17'),
	(1085, '2020-09-14', '2020-09-14 15:25:52', 1, 'TENUN Y.0258', 0, 0, 0, 0, 22, '2020-09-14 15:25:52', '2020-09-14 15:25:52'),
	(1086, '2020-09-14', '2020-09-14 15:42:41', 1, 'TENUN Y.0259', 0, 0, 0, 0, 22, '2020-09-14 15:42:41', '2020-09-14 15:42:41'),
	(1087, '2020-09-15', '2020-09-15 13:13:08', 1, 'TENUN Y.0250', 0, 0, 0, 0, 22, '2020-09-15 13:13:08', '2020-09-15 13:13:08'),
	(1088, '2020-09-15', '2020-09-15 13:41:36', 1, 'TENUN E.1610', 0, 0, 0, 0, 22, '2020-09-15 13:36:52', '2020-09-15 13:36:52'),
	(1089, '2020-09-15', '2020-09-15 13:48:12', 1, 'TENUN E.1609', 0, 0, 0, 0, 22, '2020-09-15 13:48:12', '2020-09-15 13:48:12'),
	(1090, '2020-09-15', '2020-09-15 13:53:56', 1, 'TENUN.1608', 0, 0, 0, 0, 22, '2020-09-15 13:53:56', '2020-09-15 13:53:56'),
	(1091, '2020-09-15', '2020-09-15 14:04:28', 1, 'TENUN E.1607', 0, 0, 0, 0, 22, '2020-09-15 14:00:34', '2020-09-15 14:00:34'),
	(1092, '2020-09-15', '2020-09-15 14:23:28', 1, 'TENUN RR.0013', 0, 0, 0, 0, 22, '2020-09-15 14:23:28', '2020-09-15 14:23:28'),
	(1093, '2020-09-15', '2020-09-15 14:42:38', 1, 'TENUN PP.0009', 0, 0, 0, 0, 22, '2020-09-15 14:42:38', '2020-09-15 14:42:38'),
	(1094, '2020-09-16', '2020-09-16 08:33:45', 1, '', 0, 0, 0, 0, 9, '2020-09-16 08:33:45', '2020-09-16 08:33:45'),
	(1095, '2020-09-16', '2020-09-16 08:33:54', 1, '', 0, 0, 0, 0, 9, '2020-09-16 08:33:54', '2020-09-16 08:33:54'),
	(1096, '2020-09-16', '2020-09-16 08:38:37', 1, '', 0, 0, 0, 0, 9, '2020-09-16 08:38:37', '2020-09-16 08:38:37'),
	(1097, '2020-09-17', '2020-09-17 10:27:05', 1, '', 0, 0, 0, 0, 9, '2020-09-17 10:08:14', '2020-09-17 10:08:14'),
	(1098, '2020-09-17', '2020-09-17 14:58:40', 1, '', 0, 0, 0, 0, 9, '2020-09-17 13:41:31', '2020-09-17 13:41:31'),
	(1099, '2020-09-18', '2020-09-18 13:06:10', 1, '', 0, 0, 0, 0, 9, '2020-09-18 13:06:10', '2020-09-18 13:06:10'),
	(1100, '2020-09-18', '2020-09-18 13:12:29', 1, '', 0, 0, 0, 0, 9, '2020-09-18 13:12:29', '2020-09-18 13:12:29'),
	(1101, '2020-09-18', '2020-09-18 13:15:11', 1, '', 0, 0, 0, 0, 9, '2020-09-18 13:15:11', '2020-09-18 13:15:11'),
	(1102, '2020-09-18', '2020-09-18 13:29:33', 1, '', 0, 0, 0, 0, 9, '2020-09-18 13:29:33', '2020-09-18 13:29:33'),
	(1103, '2020-09-18', '2020-09-18 13:30:02', 1, '', 0, 0, 0, 0, 9, '2020-09-18 13:30:02', '2020-09-18 13:30:02'),
	(1104, '2020-09-21', '2020-09-21 09:01:37', 1, '', 0, 0, 0, 0, 9, '2020-09-21 09:01:37', '2020-09-21 09:01:37'),
	(1105, '2020-09-21', '2020-09-21 11:54:56', 1, '', 0, 0, 0, 0, 9, '2020-09-21 11:54:56', '2020-09-21 11:54:56'),
	(1106, '2020-09-21', '2020-09-21 15:11:17', 1, '', 0, 0, 0, 0, 9, '2020-09-21 15:11:17', '2020-09-21 15:11:17'),
	(1107, '2020-09-21', '2020-09-21 15:15:29', 1, '', 0, 0, 0, 0, 9, '2020-09-21 15:15:29', '2020-09-21 15:15:29'),
	(1108, '2020-09-21', '2020-09-21 15:21:45', 1, '', 0, 0, 0, 0, 9, '2020-09-21 15:21:45', '2020-09-21 15:21:45'),
	(1109, '2020-09-21', '2020-09-21 15:25:04', 1, '', 0, 0, 0, 0, 9, '2020-09-21 15:25:04', '2020-09-21 15:25:04'),
	(1110, '2020-09-21', '2020-09-21 15:48:43', 1, '', 0, 0, 0, 0, 9, '2020-09-21 15:48:43', '2020-09-21 15:48:43'),
	(1111, '2020-09-22', '2020-09-22 10:21:50', 1, '', 0, 0, 0, 0, 9, '2020-09-22 10:21:50', '2020-09-22 10:21:50'),
	(1112, '2020-09-22', '2020-09-22 11:16:20', 1, '', 0, 0, 0, 0, 9, '2020-09-22 11:16:20', '2020-09-22 11:16:20'),
	(1113, '2020-09-23', '2020-09-23 10:03:49', 1, '', 0, 0, 0, 0, 9, '2020-09-23 10:03:49', '2020-09-23 10:03:49'),
	(1114, '2020-09-23', '2020-09-23 10:03:51', 1, '', 0, 0, 0, 0, 9, '2020-09-23 10:03:51', '2020-09-23 10:03:51'),
	(1115, '2020-09-23', '2020-09-23 10:08:28', 1, '', 0, 0, 0, 0, 9, '2020-09-23 10:08:28', '2020-09-23 10:08:28'),
	(1116, '2020-09-23', '2020-09-23 10:43:23', 1, 'RUBAH', 0, 0, 0, 0, 17, '2020-09-23 10:43:23', '2020-09-23 10:43:23'),
	(1117, '2020-09-23', '2020-09-23 10:45:26', 1, '', 0, 0, 0, 0, 9, '2020-09-23 10:45:26', '2020-09-23 10:45:26'),
	(1118, '2020-09-23', '2020-09-23 10:55:23', 1, '', 0, 0, 0, 0, 17, '2020-09-23 10:55:23', '2020-09-23 10:55:23'),
	(1119, '2020-09-23', '2020-09-23 11:15:28', 1, '', 0, 0, 0, 0, 9, '2020-09-23 11:15:28', '2020-09-23 11:15:28'),
	(1120, '2020-09-23', '2020-09-23 11:25:53', 1, '', 0, 0, 0, 0, 9, '2020-09-23 11:25:53', '2020-09-23 11:25:53'),
	(1121, '2020-09-23', '2020-09-23 11:29:00', 1, '', 0, 0, 0, 0, 9, '2020-09-23 11:29:00', '2020-09-23 11:29:00'),
	(1122, '2020-09-23', '2020-09-23 11:35:14', 1, '', 0, 0, 0, 0, 9, '2020-09-23 11:35:14', '2020-09-23 11:35:14'),
	(1123, '2020-09-23', '2020-09-23 11:39:26', 1, '', 0, 0, 0, 0, 9, '2020-09-23 11:39:26', '2020-09-23 11:39:26'),
	(1124, '2020-09-23', '2020-09-23 11:42:04', 1, '', 0, 0, 0, 0, 9, '2020-09-23 11:42:04', '2020-09-23 11:42:04'),
	(1125, '2020-09-23', '2020-09-23 11:44:54', 1, '', 0, 0, 0, 0, 9, '2020-09-23 11:44:54', '2020-09-23 11:44:54'),
	(1126, '2020-09-23', '2020-09-23 11:49:15', 1, '', 0, 0, 0, 0, 9, '2020-09-23 11:49:15', '2020-09-23 11:49:15'),
	(1127, '2020-09-23', '2020-09-23 13:19:11', 1, 'NORMALISASI ORDER', 0, 0, 0, 0, 17, '2020-09-23 13:19:11', '2020-09-23 13:19:11'),
	(1128, '2020-09-23', '2020-09-23 13:23:34', 1, '', 0, 0, 0, 0, 9, '2020-09-23 13:23:34', '2020-09-23 13:23:34'),
	(1129, '2020-09-23', '2020-09-23 13:33:14', 1, '', 0, 0, 0, 0, 17, '2020-09-23 13:33:14', '2020-09-23 13:33:14'),
	(1130, '2020-09-23', '2020-09-23 13:36:23', 1, '', 0, 0, 0, 0, 17, '2020-09-23 13:36:23', '2020-09-23 13:36:23'),
	(1131, '2020-09-23', '2020-09-23 13:44:37', 1, '', 0, 0, 0, 0, 9, '2020-09-23 13:44:37', '2020-09-23 13:44:37'),
	(1132, '2020-09-23', '2020-09-23 13:58:00', 1, '', 0, 0, 0, 0, 9, '2020-09-23 13:58:00', '2020-09-23 13:58:00'),
	(1133, '2020-09-23', '2020-09-23 14:10:56', 1, '', 0, 0, 0, 0, 17, '2020-09-23 14:10:56', '2020-09-23 14:10:56'),
	(1134, '2020-09-23', '2020-09-23 14:36:49', 1, '', 0, 0, 0, 0, 9, '2020-09-23 14:36:49', '2020-09-23 14:36:49'),
	(1135, '2020-09-23', '2020-09-23 15:24:07', 1, '', 0, 0, 0, 0, 17, '2020-09-23 15:24:07', '2020-09-23 15:24:07'),
	(1136, '2020-09-23', '2020-09-23 15:47:52', 1, '', 0, 0, 0, 0, 17, '2020-09-23 15:47:52', '2020-09-23 15:47:52'),
	(1137, '2020-09-24', '2020-09-24 08:29:47', 1, '', 0, 0, 0, 0, 9, '2020-09-24 08:29:47', '2020-09-24 08:29:47'),
	(1138, '2020-09-24', '2020-09-24 08:34:02', 1, '', 0, 0, 0, 0, 9, '2020-09-24 08:34:02', '2020-09-24 08:34:02'),
	(1139, '2020-09-24', '2020-09-24 09:03:24', 1, '', 0, 0, 0, 0, 9, '2020-09-24 09:03:24', '2020-09-24 09:03:24'),
	(1140, '2020-09-24', '2020-09-24 09:37:26', 1, '', 0, 0, 0, 0, 9, '2020-09-24 09:37:26', '2020-09-24 09:37:26'),
	(1141, '2020-09-24', '2020-09-24 10:06:00', 1, '', 0, 0, 0, 0, 17, '2020-09-24 10:06:00', '2020-09-24 10:06:00'),
	(1142, '2020-09-24', '2020-09-24 13:19:31', 1, '', 0, 0, 0, 0, 9, '2020-09-24 13:19:31', '2020-09-24 13:19:31'),
	(1143, '2020-09-24', '2020-09-24 14:01:46', 1, '', 0, 0, 0, 0, 9, '2020-09-24 14:01:46', '2020-09-24 14:01:46'),
	(1144, '2020-09-24', '2020-09-24 14:10:26', 1, '', 0, 0, 0, 0, 9, '2020-09-24 14:10:26', '2020-09-24 14:10:26'),
	(1145, '2020-09-24', '2020-09-24 15:05:43', 1, '', 0, 0, 0, 0, 9, '2020-09-24 15:05:43', '2020-09-24 15:05:43'),
	(1146, '2020-09-24', '2020-09-24 15:14:04', 1, '', 0, 0, 0, 0, 9, '2020-09-24 15:14:04', '2020-09-24 15:14:04'),
	(1147, '2020-09-24', '2020-09-24 15:36:46', 1, '', 0, 0, 0, 0, 9, '2020-09-24 15:36:46', '2020-09-24 15:36:46'),
	(1148, '2020-09-24', '2020-09-24 15:44:21', 1, '', 0, 0, 0, 0, 9, '2020-09-24 15:44:21', '2020-09-24 15:44:21'),
	(1149, '2020-09-25', '2020-09-25 08:35:22', 1, '', 0, 0, 0, 0, 9, '2020-09-25 08:35:22', '2020-09-25 08:35:22'),
	(1150, '2020-09-25', '2020-09-25 08:46:07', 1, '', 0, 0, 0, 0, 9, '2020-09-25 08:46:07', '2020-09-25 08:46:07'),
	(1151, '2020-09-25', '2020-09-25 08:58:53', 1, '', 0, 0, 0, 0, 9, '2020-09-25 08:58:53', '2020-09-25 08:58:53'),
	(1152, '2020-09-25', '2020-09-25 09:17:40', 1, '', 0, 0, 0, 0, 9, '2020-09-25 09:17:40', '2020-09-25 09:17:40'),
	(1153, '2020-09-25', '2020-09-25 10:15:28', 1, '', 0, 0, 0, 0, 9, '2020-09-25 10:15:28', '2020-09-25 10:15:28'),
	(1154, '2020-09-25', '2020-09-25 10:20:54', 1, '', 0, 0, 0, 0, 9, '2020-09-25 10:20:54', '2020-09-25 10:20:54'),
	(1155, '2020-09-25', '2020-09-25 10:23:14', 1, '', 0, 0, 0, 0, 9, '2020-09-25 10:23:14', '2020-09-25 10:23:14'),
	(1156, '2020-09-25', '2020-09-25 10:23:22', 1, '', 0, 0, 0, 0, 9, '2020-09-25 10:23:22', '2020-09-25 10:23:22'),
	(1157, '2020-09-25', '2020-09-25 13:15:55', 1, '', 0, 0, 0, 0, 9, '2020-09-25 13:15:55', '2020-09-25 13:15:55'),
	(1158, '2020-09-25', '2020-09-25 13:43:08', 1, '', 0, 0, 0, 0, 9, '2020-09-25 13:43:08', '2020-09-25 13:43:08'),
	(1159, '2020-09-25', '2020-09-25 13:49:08', 1, '', 0, 0, 0, 0, 9, '2020-09-25 13:49:08', '2020-09-25 13:49:08'),
	(1160, '2020-09-25', '2020-09-25 13:49:39', 1, '', 0, 0, 0, 0, 9, '2020-09-25 13:49:39', '2020-09-25 13:49:39'),
	(1161, '2020-09-25', '2020-09-25 14:07:02', 1, 'Pengurangan Nomer Order - Kelos', 0, 0, 0, 0, 17, '2020-09-25 14:07:02', '2020-09-25 14:07:02'),
	(1162, '2020-09-25', '2020-09-25 14:11:04', 1, '', 0, 0, 0, 0, 9, '2020-09-25 14:11:04', '2020-09-25 14:11:04'),
	(1163, '2020-09-25', '2020-09-25 14:17:12', 1, '', 0, 0, 0, 0, 9, '2020-09-25 14:17:12', '2020-09-25 14:17:12'),
	(1164, '2020-09-25', '2020-09-25 14:30:27', 1, '', 0, 0, 0, 0, 9, '2020-09-25 14:30:27', '2020-09-25 14:30:27'),
	(1165, '2020-09-25', '2020-09-25 15:41:20', 1, '', 0, 0, 0, 0, 9, '2020-09-25 15:41:20', '2020-09-25 15:41:20'),
	(1166, '2020-09-25', '2020-09-25 15:53:40', 1, '', 0, 0, 0, 0, 9, '2020-09-25 15:53:40', '2020-09-25 15:53:40'),
	(1167, '2020-09-26', '2020-09-26 08:15:34', 1, '', 0, 0, 0, 0, 9, '2020-09-26 08:15:34', '2020-09-26 08:15:34'),
	(1168, '2020-09-26', '2020-09-26 08:20:58', 1, '', 0, 0, 0, 0, 9, '2020-09-26 08:20:58', '2020-09-26 08:20:58'),
	(1169, '2020-09-26', '2020-09-26 09:12:23', 1, '', 0, 0, 0, 0, 9, '2020-09-26 09:12:23', '2020-09-26 09:12:23'),
	(1170, '2020-09-26', '2020-09-26 09:24:32', 1, '', 0, 0, 0, 0, 9, '2020-09-26 09:24:32', '2020-09-26 09:24:32'),
	(1171, '2020-09-26', '2020-09-26 09:59:48', 1, '', 0, 0, 0, 0, 9, '2020-09-26 09:59:48', '2020-09-26 09:59:48'),
	(1172, '2020-09-26', '2020-09-26 11:00:07', 1, '', 0, 0, 0, 0, 9, '2020-09-26 11:00:07', '2020-09-26 11:00:07'),
	(1173, '2020-09-26', '2020-09-26 11:22:48', 1, '', 0, 0, 0, 0, 9, '2020-09-26 11:22:48', '2020-09-26 11:22:48'),
	(1174, '2020-09-26', '2020-09-26 11:36:18', 1, '', 0, 0, 0, 0, 9, '2020-09-26 11:36:18', '2020-09-26 11:36:18'),
	(1175, '2020-09-28', '2020-09-28 08:42:16', 1, '', 0, 0, 0, 0, 9, '2020-09-28 08:42:16', '2020-09-28 08:42:16'),
	(1176, '2020-09-28', '2020-09-28 09:12:00', 1, '', 0, 0, 0, 0, 9, '2020-09-28 09:12:00', '2020-09-28 09:12:00'),
	(1177, '2020-09-28', '2020-09-28 09:49:34', 1, '', 0, 0, 0, 0, 9, '2020-09-28 09:49:34', '2020-09-28 09:49:34'),
	(1178, '2020-09-28', '2020-09-28 10:31:41', 1, '', 0, 0, 0, 0, 9, '2020-09-28 10:31:41', '2020-09-28 10:31:41'),
	(1179, '2020-09-28', '2020-09-28 11:29:42', 1, '', 0, 0, 0, 0, 9, '2020-09-28 11:29:42', '2020-09-28 11:29:42'),
	(1180, '2020-09-28', '2020-09-28 11:34:14', 1, '', 0, 0, 0, 0, 9, '2020-09-28 11:34:14', '2020-09-28 11:34:14'),
	(1181, '2020-09-28', '2020-09-28 14:03:46', 1, '', 0, 0, 0, 0, 9, '2020-09-28 14:03:46', '2020-09-28 14:03:46'),
	(1182, '2020-09-28', '2020-09-28 14:21:43', 1, '', 0, 0, 0, 0, 9, '2020-09-28 14:21:43', '2020-09-28 14:21:43'),
	(1183, '2020-09-28', '2020-09-28 14:44:58', 1, '', 0, 0, 0, 0, 9, '2020-09-28 14:44:58', '2020-09-28 14:44:58'),
	(1184, '2020-09-28', '2020-09-28 15:13:15', 1, '', 0, 0, 0, 0, 9, '2020-09-28 15:13:15', '2020-09-28 15:13:15'),
	(1185, '2020-09-29', '2020-09-29 08:35:21', 1, '', 0, 0, 0, 0, 9, '2020-09-29 08:35:21', '2020-09-29 08:35:21'),
	(1186, '2020-09-29', '2020-09-29 08:55:47', 1, '', 0, 0, 0, 0, 9, '2020-09-29 08:55:47', '2020-09-29 08:55:47'),
	(1187, '2020-09-29', '2020-09-29 09:46:13', 1, '', 0, 0, 0, 0, 9, '2020-09-29 09:46:13', '2020-09-29 09:46:13'),
	(1188, '2020-09-29', '2020-09-29 10:19:37', 1, '', 0, 0, 0, 0, 9, '2020-09-29 10:19:37', '2020-09-29 10:19:37'),
	(1189, '2020-09-29', '2020-09-29 10:48:27', 1, '', 0, 0, 0, 0, 9, '2020-09-29 10:48:27', '2020-09-29 10:48:27'),
	(1190, '2020-09-29', '2020-09-29 13:21:31', 1, '', 0, 0, 0, 0, 9, '2020-09-29 13:21:31', '2020-09-29 13:21:31'),
	(1191, '2020-09-29', '2020-09-29 13:27:29', 1, '', 0, 0, 0, 0, 9, '2020-09-29 13:27:29', '2020-09-29 13:27:29'),
	(1192, '2020-09-29', '2020-09-29 15:03:12', 1, '', 0, 0, 0, 0, 9, '2020-09-29 15:03:12', '2020-09-29 15:03:12'),
	(1193, '2020-09-29', '2020-09-29 15:33:35', 1, '', 0, 0, 0, 0, 9, '2020-09-29 15:33:35', '2020-09-29 15:33:35'),
	(1194, '2020-09-30', '2020-09-30 10:11:11', 1, '', 0, 0, 0, 0, 9, '2020-09-30 10:11:11', '2020-09-30 10:11:11'),
	(1195, '2020-09-30', '2020-09-30 11:00:42', 1, '', 0, 0, 0, 0, 9, '2020-09-30 11:00:42', '2020-09-30 11:00:42'),
	(1196, '2020-09-30', '2020-09-30 11:00:44', 1, '', 0, 0, 0, 0, 9, '2020-09-30 11:00:44', '2020-09-30 11:00:44'),
	(1197, '2020-09-30', '2020-09-30 11:10:29', 1, '', 0, 0, 0, 0, 9, '2020-09-30 11:10:29', '2020-09-30 11:10:29'),
	(1198, '2020-09-30', '2020-09-30 11:15:40', 1, '', 0, 0, 0, 0, 9, '2020-09-30 11:10:37', '2020-09-30 11:10:37'),
	(1199, '2020-09-30', '2020-09-30 11:21:29', 1, '', 0, 0, 0, 0, 9, '2020-09-30 11:20:26', '2020-09-30 11:20:26'),
	(1200, '2020-09-30', '2020-09-30 11:23:17', 1, '', 0, 0, 0, 0, 9, '2020-09-30 11:23:17', '2020-09-30 11:23:17'),
	(1201, '2020-09-30', '2020-09-30 13:50:59', 1, '', 0, 0, 0, 0, 9, '2020-09-30 13:50:59', '2020-09-30 13:50:59'),
	(1202, '2020-09-30', '2020-09-30 14:14:54', 1, '', 0, 0, 0, 0, 9, '2020-09-30 14:14:54', '2020-09-30 14:14:54'),
	(1203, '2020-09-30', '2020-09-30 14:53:48', 1, '', 0, 0, 0, 0, 9, '2020-09-30 14:53:48', '2020-09-30 14:53:48'),
	(1204, '2020-09-30', '2020-09-30 15:21:26', 1, '', 0, 0, 0, 0, 9, '2020-09-30 15:21:26', '2020-09-30 15:21:26'),
	(1205, '2020-10-01', '2020-10-01 09:26:51', 1, '', 0, 0, 0, 0, 9, '2020-10-01 09:26:51', '2020-10-01 09:26:51'),
	(1206, '2020-10-01', '2020-10-01 10:01:12', 1, '', 0, 0, 0, 0, 9, '2020-10-01 10:01:12', '2020-10-01 10:01:12'),
	(1207, '2020-10-01', '2020-10-01 10:34:43', 1, '', 0, 0, 0, 0, 9, '2020-10-01 10:34:43', '2020-10-01 10:34:43'),
	(1208, '2020-10-01', '2020-10-01 10:47:21', 1, '', 0, 0, 0, 0, 9, '2020-10-01 10:47:21', '2020-10-01 10:47:21'),
	(1209, '2020-10-01', '2020-10-01 13:22:24', 1, '', 0, 0, 0, 0, 9, '2020-10-01 13:22:24', '2020-10-01 13:22:24'),
	(1210, '2020-10-01', '2020-10-01 14:19:47', 1, '', 0, 0, 0, 0, 9, '2020-10-01 14:19:47', '2020-10-01 14:19:47'),
	(1211, '2020-10-01', '2020-10-01 14:25:44', 1, '', 0, 0, 0, 0, 9, '2020-10-01 14:25:44', '2020-10-01 14:25:44'),
	(1212, '2020-10-01', '2020-10-01 14:34:30', 1, '', 0, 0, 0, 0, 9, '2020-10-01 14:34:30', '2020-10-01 14:34:30'),
	(1213, '2020-10-01', '2020-10-01 14:38:50', 1, '', 0, 0, 0, 0, 9, '2020-10-01 14:38:50', '2020-10-01 14:38:50'),
	(1214, '2020-10-01', '2020-10-01 15:03:07', 1, '', 0, 0, 0, 0, 9, '2020-10-01 15:03:07', '2020-10-01 15:03:07'),
	(1215, '2020-10-01', '2020-10-01 15:21:36', 1, '', 0, 0, 0, 0, 9, '2020-10-01 15:21:36', '2020-10-01 15:21:36'),
	(1216, '2020-10-01', '2020-10-01 15:33:29', 1, '', 0, 0, 0, 0, 9, '2020-10-01 15:33:29', '2020-10-01 15:33:29'),
	(1217, '2020-10-01', '2020-10-01 15:39:49', 1, '', 0, 0, 0, 0, 9, '2020-10-01 15:39:49', '2020-10-01 15:39:49'),
	(1218, '2020-10-01', '2020-10-01 15:51:57', 1, '', 0, 0, 0, 0, 9, '2020-10-01 15:51:57', '2020-10-01 15:51:57'),
	(1219, '2020-10-02', '2020-10-02 10:20:42', 1, '', 0, 0, 0, 0, 9, '2020-10-02 10:20:42', '2020-10-02 10:20:42'),
	(1220, '2020-10-02', '2020-10-02 10:27:41', 1, '', 0, 0, 0, 0, 9, '2020-10-02 10:27:41', '2020-10-02 10:27:41'),
	(1221, '2020-10-02', '2020-10-02 13:09:36', 1, '', 0, 0, 0, 0, 9, '2020-10-02 13:09:36', '2020-10-02 13:09:36'),
	(1222, '2020-10-02', '2020-10-02 14:07:01', 1, '', 0, 0, 0, 0, 9, '2020-10-02 14:07:01', '2020-10-02 14:07:01'),
	(1223, '2020-10-02', '2020-10-02 14:30:37', 1, '', 0, 0, 0, 0, 9, '2020-10-02 14:30:37', '2020-10-02 14:30:37'),
	(1224, '2020-10-02', '2020-10-02 15:56:27', 1, '', 0, 0, 0, 0, 9, '2020-10-02 15:56:27', '2020-10-02 15:56:27'),
	(1225, '2020-10-03', '2020-10-03 08:15:40', 1, '', 0, 0, 0, 0, 9, '2020-10-03 08:15:40', '2020-10-03 08:15:40'),
	(1226, '2020-10-03', '2020-10-03 10:29:53', 1, '', 0, 0, 0, 0, 9, '2020-10-03 10:29:53', '2020-10-03 10:29:53'),
	(1227, '2020-10-03', '2020-10-03 10:38:06', 1, '', 0, 0, 0, 0, 9, '2020-10-03 10:38:06', '2020-10-03 10:38:06'),
	(1228, '2020-10-03', '2020-10-03 11:15:50', 1, '', 0, 0, 0, 0, 9, '2020-10-03 11:15:50', '2020-10-03 11:15:50'),
	(1229, '2020-10-05', '2020-10-05 09:30:32', 1, '', 0, 0, 0, 0, 9, '2020-10-05 09:30:32', '2020-10-05 09:30:32'),
	(1230, '2020-10-05', '2020-10-05 10:09:17', 1, '', 0, 0, 0, 0, 9, '2020-10-05 10:09:17', '2020-10-05 10:09:17'),
	(1231, '2020-10-05', '2020-10-05 10:14:53', 1, '', 0, 0, 0, 0, 9, '2020-10-05 10:14:53', '2020-10-05 10:14:53'),
	(1232, '2020-10-05', '2020-10-05 11:26:15', 1, '', 0, 0, 0, 0, 9, '2020-10-05 11:26:15', '2020-10-05 11:26:15'),
	(1233, '2020-10-05', '2020-10-05 15:17:39', 1, '', 0, 0, 0, 0, 9, '2020-10-05 15:17:39', '2020-10-05 15:17:39'),
	(1234, '2020-10-06', '2020-10-06 09:04:42', 1, '', 0, 0, 0, 0, 9, '2020-10-06 09:04:42', '2020-10-06 09:04:42'),
	(1235, '2020-10-06', '2020-10-06 09:12:34', 1, '', 0, 0, 0, 0, 9, '2020-10-06 09:12:34', '2020-10-06 09:12:34'),
	(1236, '2020-10-06', '2020-10-06 09:23:20', 1, '', 0, 0, 0, 0, 9, '2020-10-06 09:23:20', '2020-10-06 09:23:20'),
	(1237, '2020-10-06', '2020-10-06 09:26:52', 1, '', 0, 0, 0, 0, 9, '2020-10-06 09:26:52', '2020-10-06 09:26:52'),
	(1238, '2020-10-06', '2020-10-06 11:33:51', 1, 'PERUBAHAN NORDER', 0, 0, 0, 0, 17, '2020-10-06 11:33:51', '2020-10-06 11:33:51'),
	(1239, '2020-10-06', '2020-10-06 11:50:52', 1, 'PERUBAHAN NO. ORDER', 0, 0, 0, 0, 17, '2020-10-06 11:50:52', '2020-10-06 11:50:52'),
	(1240, '2020-10-06', '2020-10-06 13:50:47', 1, '', 0, 0, 0, 0, 9, '2020-10-06 13:50:47', '2020-10-06 13:50:47'),
	(1241, '2020-10-06', '2020-10-06 14:11:29', 1, '', 0, 0, 0, 0, 9, '2020-10-06 14:11:29', '2020-10-06 14:11:29'),
	(1242, '2020-10-06', '2020-10-06 14:44:15', 1, '', 0, 0, 0, 0, 9, '2020-10-06 14:44:15', '2020-10-06 14:44:15'),
	(1243, '2020-10-07', '2020-10-07 09:51:14', 1, '', 0, 0, 0, 0, 9, '2020-10-07 09:51:14', '2020-10-07 09:51:14'),
	(1244, '2020-10-07', '2020-10-07 11:37:01', 1, '', 0, 0, 0, 0, 9, '2020-10-07 11:20:33', '2020-10-07 11:20:33'),
	(1245, '2020-10-07', '2020-10-07 11:51:01', 1, '', 0, 0, 0, 0, 9, '2020-10-07 11:51:01', '2020-10-07 11:51:01'),
	(1246, '2020-10-07', '2020-10-07 14:46:10', 1, '', 0, 0, 0, 0, 9, '2020-10-07 14:46:10', '2020-10-07 14:46:10'),
	(1247, '2020-10-08', '2020-10-08 07:51:34', 1, '', 0, 0, 0, 0, 9, '2020-10-08 07:51:34', '2020-10-08 07:51:34'),
	(1248, '2020-10-08', '2020-10-08 08:20:07', 1, '', 0, 0, 0, 0, 9, '2020-10-08 08:20:07', '2020-10-08 08:20:07'),
	(1249, '2020-10-08', '2020-10-08 09:02:59', 1, '', 0, 0, 0, 0, 9, '2020-10-08 09:02:59', '2020-10-08 09:02:59'),
	(1250, '2020-10-08', '2020-10-08 09:12:17', 1, '', 0, 0, 0, 0, 9, '2020-10-08 09:12:17', '2020-10-08 09:12:17'),
	(1251, '2020-10-08', '2020-10-08 10:05:22', 1, '', 0, 0, 0, 0, 9, '2020-10-08 10:05:22', '2020-10-08 10:05:22'),
	(1252, '2020-10-08', '2020-10-08 13:08:46', 1, '', 0, 0, 0, 0, 9, '2020-10-08 13:08:46', '2020-10-08 13:08:46'),
	(1253, '2020-10-08', '2020-10-08 13:46:53', 1, '', 0, 0, 0, 0, 9, '2020-10-08 13:46:53', '2020-10-08 13:46:53'),
	(1254, '2020-10-08', '2020-10-08 14:20:33', 1, '', 0, 0, 0, 0, 9, '2020-10-08 14:20:33', '2020-10-08 14:20:33'),
	(1255, '2020-10-08', '2020-10-08 14:55:05', 1, '', 0, 0, 0, 0, 9, '2020-10-08 14:55:05', '2020-10-08 14:55:05'),
	(1256, '2020-10-08', '2020-10-08 15:04:49', 1, '', 0, 0, 0, 0, 9, '2020-10-08 15:04:49', '2020-10-08 15:04:49'),
	(1257, '2020-10-08', '2020-10-08 15:45:57', 1, '', 0, 0, 0, 0, 9, '2020-10-08 15:45:57', '2020-10-08 15:45:57'),
	(1258, '2020-10-09', '2020-10-09 08:56:56', 1, '', 0, 0, 0, 0, 9, '2020-10-09 08:56:56', '2020-10-09 08:56:56'),
	(1259, '2020-10-09', '2020-10-09 08:58:56', 1, '', 0, 0, 0, 0, 9, '2020-10-09 08:58:56', '2020-10-09 08:58:56'),
	(1260, '2020-10-09', '2020-10-09 10:12:08', 1, '', 0, 0, 0, 0, 9, '2020-10-09 10:12:08', '2020-10-09 10:12:08'),
	(1261, '2020-10-09', '2020-10-09 10:17:06', 1, '', 0, 0, 0, 0, 9, '2020-10-09 10:17:06', '2020-10-09 10:17:06'),
	(1262, '2020-10-09', '2020-10-09 10:27:06', 1, '', 0, 0, 0, 0, 9, '2020-10-09 10:27:06', '2020-10-09 10:27:06'),
	(1263, '2020-10-09', '2020-10-09 10:28:41', 1, '', 0, 0, 0, 0, 9, '2020-10-09 10:28:41', '2020-10-09 10:28:41'),
	(1264, '2020-10-09', '2020-10-09 10:29:22', 1, '', 0, 0, 0, 0, 9, '2020-10-09 10:29:22', '2020-10-09 10:29:22'),
	(1265, '2020-10-09', '2020-10-09 10:38:01', 1, '', 0, 0, 0, 0, 9, '2020-10-09 10:38:01', '2020-10-09 10:38:01'),
	(1266, '2020-10-09', '2020-10-09 14:31:08', 1, '', 0, 0, 0, 0, 9, '2020-10-09 14:31:08', '2020-10-09 14:31:08'),
	(1267, '2020-10-09', '2020-10-09 14:36:39', 1, '', 0, 0, 0, 0, 9, '2020-10-09 14:36:39', '2020-10-09 14:36:39'),
	(1268, '2020-10-09', '2020-10-09 14:36:42', 1, '', 0, 0, 0, 0, 9, '2020-10-09 14:36:42', '2020-10-09 14:36:42'),
	(1269, '2020-10-09', '2020-10-09 14:42:27', 1, '', 0, 0, 0, 0, 9, '2020-10-09 14:42:27', '2020-10-09 14:42:27'),
	(1270, '2020-10-09', '2020-10-09 14:42:35', 1, '', 0, 0, 0, 0, 9, '2020-10-09 14:42:35', '2020-10-09 14:42:35'),
	(1271, '2020-10-09', '2020-10-09 15:33:41', 1, '', 0, 0, 0, 0, 9, '2020-10-09 15:33:41', '2020-10-09 15:33:41'),
	(1272, '2020-10-10', '2020-10-10 10:08:43', 1, '', 0, 0, 0, 0, 9, '2020-10-10 10:08:43', '2020-10-10 10:08:43'),
	(1273, '2020-10-10', '2020-10-10 11:24:54', 1, '', 0, 0, 0, 0, 9, '2020-10-10 11:24:54', '2020-10-10 11:24:54'),
	(1274, '2020-10-10', '2020-10-10 11:49:33', 1, '', 0, 0, 0, 0, 9, '2020-10-10 11:49:33', '2020-10-10 11:49:33'),
	(1275, '2020-10-10', '2020-10-10 11:52:51', 1, '', 0, 0, 0, 0, 9, '2020-10-10 11:52:51', '2020-10-10 11:52:51'),
	(1276, '2020-10-12', '2020-10-12 08:38:19', 1, '', 0, 0, 0, 0, 9, '2020-10-12 08:38:19', '2020-10-12 08:38:19'),
	(1277, '2020-10-12', '2020-10-12 09:02:32', 1, '', 0, 0, 0, 0, 9, '2020-10-12 09:02:32', '2020-10-12 09:02:32'),
	(1278, '2020-10-12', '2020-10-12 09:33:52', 1, '', 0, 0, 0, 0, 9, '2020-10-12 09:33:52', '2020-10-12 09:33:52'),
	(1279, '2020-10-12', '2020-10-12 10:48:42', 1, '', 0, 0, 0, 0, 9, '2020-10-12 10:48:42', '2020-10-12 10:48:42'),
	(1280, '2020-10-12', '2020-10-12 11:26:56', 1, '', 0, 0, 0, 0, 9, '2020-10-12 11:26:56', '2020-10-12 11:26:56'),
	(1281, '2020-10-12', '2020-10-12 13:55:08', 1, '', 0, 0, 0, 0, 9, '2020-10-12 13:55:08', '2020-10-12 13:55:08'),
	(1282, '2020-10-12', '2020-10-12 14:54:57', 1, '', 0, 0, 0, 0, 9, '2020-10-12 14:54:57', '2020-10-12 14:54:57'),
	(1283, '2020-10-12', '2020-10-12 15:01:38', 1, '', 0, 0, 0, 0, 9, '2020-10-12 15:01:38', '2020-10-12 15:01:38'),
	(1284, '2020-10-13', '2020-10-13 09:48:35', 1, '', 0, 0, 0, 0, 9, '2020-10-13 09:48:35', '2020-10-13 09:48:35'),
	(1285, '2020-10-13', '2020-10-13 11:11:44', 1, '', 0, 0, 0, 0, 9, '2020-10-13 11:11:44', '2020-10-13 11:11:44'),
	(1286, '2020-10-13', '2020-10-13 14:17:40', 1, '', 0, 0, 0, 0, 9, '2020-10-13 14:17:40', '2020-10-13 14:17:40'),
	(1287, '2020-10-13', '2020-10-13 15:17:44', 1, '', 0, 0, 0, 0, 9, '2020-10-13 15:17:44', '2020-10-13 15:17:44'),
	(1288, '2020-10-13', '2020-10-13 15:31:23', 1, '', 0, 0, 0, 0, 9, '2020-10-13 15:31:23', '2020-10-13 15:31:23'),
	(1289, '2020-10-14', '2020-10-14 10:17:14', 1, '', 0, 0, 0, 0, 9, '2020-10-14 10:17:14', '2020-10-14 10:17:14'),
	(1290, '2020-10-14', '2020-10-14 10:57:09', 1, '', 0, 0, 0, 0, 9, '2020-10-14 10:38:26', '2020-10-14 10:38:26'),
	(1291, '2020-10-14', '2020-10-14 10:40:52', 1, '', 0, 0, 0, 0, 9, '2020-10-14 10:40:52', '2020-10-14 10:40:52'),
	(1292, '2020-10-14', '2020-10-14 10:44:41', 1, '', 0, 0, 0, 0, 9, '2020-10-14 10:44:41', '2020-10-14 10:44:41'),
	(1293, '2020-10-14', '2020-10-14 11:23:34', 1, '', 0, 0, 0, 0, 9, '2020-10-14 11:23:34', '2020-10-14 11:23:34'),
	(1294, '2020-10-14', '2020-10-14 11:52:22', 1, '', 0, 0, 0, 0, 9, '2020-10-14 11:52:22', '2020-10-14 11:52:22'),
	(1295, '2020-10-14', '2020-10-14 11:56:18', 1, '', 0, 0, 0, 0, 9, '2020-10-14 11:56:18', '2020-10-14 11:56:18'),
	(1296, '2020-10-14', '2020-10-14 13:38:08', 1, '', 0, 0, 0, 0, 9, '2020-10-14 13:38:08', '2020-10-14 13:38:08'),
	(1297, '2020-10-14', '2020-10-14 14:04:29', 1, '', 0, 0, 0, 0, 9, '2020-10-14 14:04:29', '2020-10-14 14:04:29'),
	(1298, '2020-10-14', '2020-10-14 14:54:29', 1, '', 0, 0, 0, 0, 9, '2020-10-14 14:54:29', '2020-10-14 14:54:29'),
	(1299, '2020-10-15', '2020-10-15 08:32:14', 1, '', 0, 0, 0, 0, 9, '2020-10-15 08:32:14', '2020-10-15 08:32:14'),
	(1300, '2020-10-15', '2020-10-15 09:16:40', 1, '', 0, 0, 0, 0, 9, '2020-10-15 09:16:40', '2020-10-15 09:16:40'),
	(1301, '2020-10-15', '2020-10-15 15:36:22', 1, '', 0, 0, 0, 0, 9, '2020-10-15 15:36:22', '2020-10-15 15:36:22'),
	(1302, '2020-10-16', '2020-10-16 08:57:58', 1, '', 0, 0, 0, 0, 9, '2020-10-16 08:57:58', '2020-10-16 08:57:58'),
	(1303, '2020-10-16', '2020-10-16 09:08:19', 1, '', 0, 0, 0, 0, 9, '2020-10-16 09:08:19', '2020-10-16 09:08:19'),
	(1304, '2020-10-16', '2020-10-16 09:56:18', 1, '', 0, 0, 0, 0, 9, '2020-10-16 09:56:18', '2020-10-16 09:56:18'),
	(1305, '2020-10-16', '2020-10-16 10:22:55', 1, '', 0, 0, 0, 0, 9, '2020-10-16 10:22:55', '2020-10-16 10:22:55'),
	(1306, '2020-10-16', '2020-10-16 10:24:15', 1, '', 0, 0, 0, 0, 9, '2020-10-16 10:24:15', '2020-10-16 10:24:15'),
	(1307, '2020-10-16', '2020-10-16 10:35:12', 1, '', 0, 0, 0, 0, 9, '2020-10-16 10:35:12', '2020-10-16 10:35:12'),
	(1308, '2020-10-16', '2020-10-16 14:26:24', 1, '', 0, 0, 0, 0, 9, '2020-10-16 14:26:24', '2020-10-16 14:26:24'),
	(1309, '2020-10-16', '2020-10-16 15:21:26', 1, '', 0, 0, 0, 0, 9, '2020-10-16 15:21:26', '2020-10-16 15:21:26'),
	(1310, '2020-10-16', '2020-10-16 15:21:26', 1, '', 0, 0, 0, 0, 9, '2020-10-16 15:21:26', '2020-10-16 15:21:26'),
	(1311, '2020-10-16', '2020-10-16 15:49:50', 1, '', 0, 0, 0, 0, 9, '2020-10-16 15:49:50', '2020-10-16 15:49:50'),
	(1312, '2020-10-17', '2020-10-17 08:42:11', 1, '', 0, 0, 0, 0, 9, '2020-10-17 08:42:11', '2020-10-17 08:42:11'),
	(1313, '2020-10-17', '2020-10-17 10:12:38', 1, '', 0, 0, 0, 0, 9, '2020-10-17 10:12:38', '2020-10-17 10:12:38'),
	(1314, '2020-10-17', '2020-10-17 10:31:32', 1, '', 0, 0, 0, 0, 9, '2020-10-17 10:31:32', '2020-10-17 10:31:32'),
	(1315, '2020-10-17', '2020-10-17 10:48:25', 1, '', 0, 0, 0, 0, 9, '2020-10-17 10:48:25', '2020-10-17 10:48:25'),
	(1316, '2020-10-17', '2020-10-17 11:15:01', 1, '', 0, 0, 0, 0, 9, '2020-10-17 11:15:01', '2020-10-17 11:15:01'),
	(1317, '2020-10-17', '2020-10-17 11:28:30', 1, '', 0, 0, 0, 0, 9, '2020-10-17 11:28:30', '2020-10-17 11:28:30'),
	(1318, '2020-10-19', '2020-10-19 08:21:03', 1, '', 0, 0, 0, 0, 9, '2020-10-19 08:21:03', '2020-10-19 08:21:03'),
	(1319, '2020-10-19', '2020-10-19 10:07:34', 1, '', 0, 0, 0, 0, 9, '2020-10-19 10:07:34', '2020-10-19 10:07:34'),
	(1320, '2020-10-19', '2020-10-19 10:47:53', 1, '', 0, 0, 0, 0, 9, '2020-10-19 10:47:53', '2020-10-19 10:47:53'),
	(1321, '2020-10-19', '2020-10-19 11:12:13', 1, '', 0, 0, 0, 0, 9, '2020-10-19 11:12:13', '2020-10-19 11:12:13'),
	(1322, '2020-10-20', '2020-10-20 10:10:01', 1, '', 0, 0, 0, 0, 25, '2020-10-20 10:10:01', '2020-10-20 10:10:01'),
	(1323, '2020-10-20', '2020-10-20 10:56:17', 1, '', 0, 0, 0, 0, 25, '2020-10-20 10:56:17', '2020-10-20 10:56:17'),
	(1324, '2020-10-20', '2020-10-20 13:29:59', 1, '', 0, 0, 0, 0, 25, '2020-10-20 13:29:59', '2020-10-20 13:29:59'),
	(1325, '2020-10-20', '2020-10-20 13:33:44', 1, '', 0, 0, 0, 0, 25, '2020-10-20 13:33:44', '2020-10-20 13:33:44'),
	(1326, '2020-10-21', '2020-10-21 10:39:50', 1, '', 0, 0, 0, 0, 9, '2020-10-21 10:39:50', '2020-10-21 10:39:50'),
	(1327, '2020-10-21', '2020-10-21 10:41:28', 1, '', 0, 0, 0, 0, 9, '2020-10-21 10:41:28', '2020-10-21 10:41:28'),
	(1328, '2020-10-21', '2020-10-21 10:53:30', 1, '', 0, 0, 0, 0, 9, '2020-10-21 10:53:30', '2020-10-21 10:53:30'),
	(1329, '2020-10-21', '2020-10-21 10:56:28', 1, '', 0, 0, 0, 0, 9, '2020-10-21 10:56:28', '2020-10-21 10:56:28'),
	(1330, '2020-10-21', '2020-10-21 14:17:40', 1, '', 0, 0, 0, 0, 25, '2020-10-21 14:17:40', '2020-10-21 14:17:40'),
	(1331, '2020-10-21', '2020-10-21 14:22:13', 1, '', 0, 0, 0, 0, 9, '2020-10-21 14:22:13', '2020-10-21 14:22:13'),
	(1332, '2020-10-21', '2020-10-21 14:24:43', 1, '', 0, 0, 0, 0, 9, '2020-10-21 14:24:43', '2020-10-21 14:24:43'),
	(1333, '2020-10-21', '2020-10-21 14:36:03', 1, '', 0, 0, 0, 0, 25, '2020-10-21 14:36:03', '2020-10-21 14:36:03'),
	(1334, '2020-10-21', '2020-10-21 15:08:32', 1, '', 0, 0, 0, 0, 25, '2020-10-21 15:08:32', '2020-10-21 15:08:32'),
	(1335, '2020-10-21', '2020-10-21 15:10:03', 1, '', 0, 0, 0, 0, 9, '2020-10-21 15:10:03', '2020-10-21 15:10:03'),
	(1336, '2020-10-23', '2020-10-23 08:41:22', 1, '', 0, 0, 0, 0, 25, '2020-10-23 08:41:22', '2020-10-23 08:41:22'),
	(1337, '2020-10-23', '2020-10-23 08:51:27', 1, '', 0, 0, 0, 0, 25, '2020-10-23 08:51:27', '2020-10-23 08:51:27'),
	(1338, '2020-10-23', '2020-10-23 09:37:50', 1, '', 0, 0, 0, 0, 25, '2020-10-23 09:37:50', '2020-10-23 09:37:50'),
	(1339, '2020-10-23', '2020-10-23 10:25:49', 1, '', 0, 0, 0, 0, 9, '2020-10-23 10:25:49', '2020-10-23 10:25:49'),
	(1340, '2020-10-23', '2020-10-23 10:31:22', 1, '', 0, 0, 0, 0, 9, '2020-10-23 10:31:22', '2020-10-23 10:31:22'),
	(1341, '2020-10-23', '2020-10-23 10:34:22', 1, '', 0, 0, 0, 0, 9, '2020-10-23 10:34:22', '2020-10-23 10:34:22'),
	(1342, '2020-10-23', '2020-10-23 10:52:03', 1, '', 0, 0, 0, 0, 9, '2020-10-23 10:52:03', '2020-10-23 10:52:03'),
	(1343, '2020-10-24', '2020-10-24 08:30:42', 1, '', 0, 0, 0, 0, 25, '2020-10-24 08:30:42', '2020-10-24 08:30:42'),
	(1344, '2020-10-24', '2020-10-24 09:06:29', 1, '', 0, 0, 0, 0, 25, '2020-10-24 09:06:29', '2020-10-24 09:06:29'),
	(1345, '2020-10-24', '2020-10-24 11:12:23', 1, '', 0, 0, 0, 0, 25, '2020-10-24 11:12:23', '2020-10-24 11:12:23'),
	(1346, '2020-10-24', '2020-10-24 11:56:32', 1, '', 0, 0, 0, 0, 25, '2020-10-24 11:56:32', '2020-10-24 11:56:32'),
	(1347, '2020-10-26', '2020-10-26 08:05:53', 1, '', 0, 0, 0, 0, 25, '2020-10-26 08:05:53', '2020-10-26 08:05:53'),
	(1349, '2020-10-26', '2020-10-26 10:18:48', 1, '', 0, 0, 0, 0, 9, '2020-10-26 10:18:48', '2020-10-26 10:18:48'),
	(1350, '2020-10-26', '2020-10-26 10:18:49', 1, '', 0, 0, 0, 0, 9, '2020-10-26 10:18:49', '2020-10-26 10:18:49'),
	(1351, '2020-10-26', '2020-10-26 11:06:58', 1, '', 0, 0, 0, 0, 25, '2020-10-26 11:06:58', '2020-10-26 11:06:58'),
	(1352, '2020-10-27', '2020-10-27 07:52:04', 1, '', 0, 0, 0, 0, 25, '2020-10-27 07:52:04', '2020-10-27 07:52:04'),
	(1353, '2020-10-27', '2020-10-27 11:18:10', 1, '', 0, 0, 0, 0, 25, '2020-10-27 11:18:10', '2020-10-27 11:18:10'),
	(1354, '2020-10-27', '2020-10-27 11:23:46', 1, '', 0, 0, 0, 0, 25, '2020-10-27 11:23:46', '2020-10-27 11:23:46'),
	(1355, '2020-10-27', '2020-10-27 11:27:38', 1, '', 0, 0, 0, 0, 25, '2020-10-27 11:27:38', '2020-10-27 11:27:38'),
	(1356, '2020-10-27', '2020-10-27 11:51:00', 1, '', 0, 0, 0, 0, 25, '2020-10-27 11:51:00', '2020-10-27 11:51:00'),
	(1357, '2020-10-28', '2020-10-28 08:01:06', 1, '', 0, 0, 0, 0, 25, '2020-10-28 08:01:06', '2020-10-28 08:01:06'),
	(1358, '2020-10-28', '2020-10-28 08:04:56', 1, '', 0, 0, 0, 0, 25, '2020-10-28 08:04:56', '2020-10-28 08:04:56'),
	(1359, '2020-10-28', '2020-10-28 09:23:51', 1, '', 0, 0, 0, 0, 25, '2020-10-28 09:23:51', '2020-10-28 09:23:51'),
	(1360, '2020-10-28', '2020-10-28 09:44:27', 1, '', 0, 0, 0, 0, 25, '2020-10-28 09:44:27', '2020-10-28 09:44:27'),
	(1361, '2020-10-28', '2020-10-28 10:13:22', 1, '', 0, 0, 0, 0, 25, '2020-10-28 10:13:22', '2020-10-28 10:13:22'),
	(1362, '2020-10-28', '2020-10-28 11:01:41', 1, '', 0, 0, 0, 0, 9, '2020-10-28 11:01:41', '2020-10-28 11:01:41'),
	(1363, '2020-10-28', '2020-10-28 11:01:57', 1, '', 0, 0, 0, 0, 9, '2020-10-28 11:01:57', '2020-10-28 11:01:57'),
	(1364, '2020-10-28', '2020-10-28 11:02:59', 1, '', 0, 0, 0, 0, 25, '2020-10-28 11:02:59', '2020-10-28 11:02:59'),
	(1365, '2020-10-28', '2020-10-28 11:08:52', 1, '', 0, 0, 0, 0, 9, '2020-10-28 11:08:52', '2020-10-28 11:08:52'),
	(1366, '2020-10-28', '2020-10-28 11:13:41', 1, '', 0, 0, 0, 0, 25, '2020-10-28 11:13:41', '2020-10-28 11:13:41'),
	(1367, '2020-10-28', '2020-10-28 11:16:10', 1, '', 0, 0, 0, 0, 25, '2020-10-28 11:16:10', '2020-10-28 11:16:10'),
	(1368, '2020-10-28', '2020-10-28 11:37:37', 1, '', 0, 0, 0, 0, 9, '2020-10-28 11:34:49', '2020-10-28 11:34:49'),
	(1369, '2020-10-28', '2020-10-28 13:15:17', 1, '', 0, 0, 0, 0, 25, '2020-10-28 13:15:17', '2020-10-28 13:15:17'),
	(1370, '2020-10-28', '2020-10-28 13:18:02', 1, '', 0, 0, 0, 0, 9, '2020-10-28 13:18:02', '2020-10-28 13:18:02'),
	(1371, '2020-10-28', '2020-10-28 13:36:14', 1, '', 0, 0, 0, 0, 25, '2020-10-28 13:36:14', '2020-10-28 13:36:14'),
	(1372, '2020-10-28', '2020-10-28 13:42:55', 1, '', 0, 0, 0, 0, 25, '2020-10-28 13:42:55', '2020-10-28 13:42:55'),
	(1373, '2020-10-28', '2020-10-28 15:14:35', 1, '', 0, 0, 0, 0, 25, '2020-10-28 15:14:35', '2020-10-28 15:14:35'),
	(1374, '2020-10-28', '2020-10-28 15:19:55', 1, '', 0, 0, 0, 0, 9, '2020-10-28 15:19:55', '2020-10-28 15:19:55'),
	(1375, '2020-10-30', '2020-10-30 09:58:45', 1, '', 0, 0, 0, 0, 25, '2020-10-30 09:58:45', '2020-10-30 09:58:45'),
	(1376, '2020-10-30', '2020-10-30 10:36:57', 1, '', 0, 0, 0, 0, 25, '2020-10-30 10:36:57', '2020-10-30 10:36:57'),
	(1377, '2020-10-30', '2020-10-30 10:40:19', 1, '', 0, 0, 0, 0, 9, '2020-10-30 10:40:19', '2020-10-30 10:40:19'),
	(1378, '2020-10-30', '2020-10-30 13:13:43', 1, '', 0, 0, 0, 0, 25, '2020-10-30 13:13:43', '2020-10-30 13:13:43'),
	(1379, '2020-10-30', '2020-10-30 13:30:06', 1, '', 0, 0, 0, 0, 25, '2020-10-30 13:30:06', '2020-10-30 13:30:06'),
	(1380, '2020-10-30', '2020-10-30 13:44:40', 1, '', 0, 0, 0, 0, 25, '2020-10-30 13:44:40', '2020-10-30 13:44:40'),
	(1381, '2020-10-30', '2020-10-30 14:12:19', 1, '', 0, 0, 0, 0, 25, '2020-10-30 14:12:20', '2020-10-30 14:12:20'),
	(1382, '2020-10-30', '2020-10-30 15:22:32', 1, '', 0, 0, 0, 0, 25, '2020-10-30 15:22:32', '2020-10-30 15:22:32'),
	(1383, '2020-10-30', '2020-10-30 15:42:50', 1, '', 0, 0, 0, 0, 25, '2020-10-30 15:42:50', '2020-10-30 15:42:50'),
	(1384, '2020-10-30', '2020-10-30 15:57:30', 1, '', 0, 0, 0, 0, 25, '2020-10-30 15:57:30', '2020-10-30 15:57:30'),
	(1385, '2020-10-31', '2020-10-31 08:17:20', 1, '', 0, 0, 0, 0, 25, '2020-10-31 08:17:20', '2020-10-31 08:17:20'),
	(1386, '2020-10-31', '2020-10-31 08:39:19', 1, '', 0, 0, 0, 0, 25, '2020-10-31 08:39:19', '2020-10-31 08:39:19'),
	(1387, '2020-10-31', '2020-10-31 09:45:09', 1, '', 0, 0, 0, 0, 25, '2020-10-31 09:45:09', '2020-10-31 09:45:09'),
	(1388, '2020-10-31', '2020-10-31 10:33:13', 1, '', 0, 0, 0, 0, 25, '2020-10-31 10:33:13', '2020-10-31 10:33:13'),
	(1389, '2020-11-02', '2020-11-02 08:13:41', 1, '', 0, 0, 0, 0, 25, '2020-11-02 08:13:41', '2020-11-02 08:13:41'),
	(1390, '2020-11-02', '2020-11-02 09:30:48', 1, '', 0, 0, 0, 0, 25, '2020-11-02 09:30:48', '2020-11-02 09:30:48'),
	(1391, '2020-11-02', '2020-11-02 11:08:15', 1, '', 0, 0, 0, 0, 25, '2020-11-02 11:08:15', '2020-11-02 11:08:15'),
	(1392, '2020-11-02', '2020-11-02 11:55:07', 1, '', 0, 0, 0, 0, 25, '2020-11-02 11:55:07', '2020-11-02 11:55:07'),
	(1393, '2020-11-03', '2020-11-03 08:25:07', 1, '', 0, 0, 0, 0, 25, '2020-11-03 08:25:07', '2020-11-03 08:25:07'),
	(1394, '2020-11-03', '2020-11-03 09:44:51', 1, '', 0, 0, 0, 0, 25, '2020-11-03 09:44:51', '2020-11-03 09:44:51'),
	(1395, '2020-11-03', '2020-11-03 10:39:09', 1, '', 0, 0, 0, 0, 25, '2020-11-03 10:39:09', '2020-11-03 10:39:09'),
	(1396, '2020-11-03', '2020-11-03 10:49:25', 1, '', 0, 0, 0, 0, 25, '2020-11-03 10:49:25', '2020-11-03 10:49:25'),
	(1397, '2020-11-03', '2020-11-03 11:07:31', 1, '', 0, 0, 0, 0, 25, '2020-11-03 11:07:31', '2020-11-03 11:07:31'),
	(1398, '2020-11-03', '2020-11-03 11:54:51', 1, '', 0, 0, 0, 0, 25, '2020-11-03 11:54:51', '2020-11-03 11:54:51'),
	(1399, '2020-11-03', '2020-11-03 13:08:44', 1, '', 0, 0, 0, 0, 25, '2020-11-03 13:08:44', '2020-11-03 13:08:44'),
	(1400, '2020-11-03', '2020-11-03 13:54:34', 1, '', 0, 0, 0, 0, 25, '2020-11-03 13:54:34', '2020-11-03 13:54:34'),
	(1401, '2020-11-03', '2020-11-03 13:59:38', 1, '', 0, 0, 0, 0, 25, '2020-11-03 13:59:38', '2020-11-03 13:59:38'),
	(1402, '2020-11-03', '2020-11-03 14:11:46', 1, '', 0, 0, 0, 0, 25, '2020-11-03 14:11:46', '2020-11-03 14:11:46'),
	(1403, '2020-11-03', '2020-11-03 14:37:49', 1, '', 0, 0, 0, 0, 25, '2020-11-03 14:37:49', '2020-11-03 14:37:49'),
	(1404, '2020-11-04', '2020-11-04 10:21:14', 1, '', 0, 0, 0, 0, 9, '2020-11-04 10:21:14', '2020-11-04 10:21:14'),
	(1405, '2020-11-04', '2020-11-04 11:00:08', 1, '', 0, 0, 0, 0, 25, '2020-11-04 11:00:08', '2020-11-04 11:00:08'),
	(1406, '2020-11-04', '2020-11-04 13:19:29', 1, '', 0, 0, 0, 0, 25, '2020-11-04 13:19:29', '2020-11-04 13:19:29'),
	(1407, '2020-11-04', '2020-11-04 14:00:21', 1, '', 0, 0, 0, 0, 25, '2020-11-04 14:00:21', '2020-11-04 14:00:21'),
	(1408, '2020-11-04', '2020-11-04 14:30:22', 1, '', 0, 0, 0, 0, 25, '2020-11-04 14:30:22', '2020-11-04 14:30:22'),
	(1409, '2020-11-04', '2020-11-04 15:28:48', 1, '', 0, 0, 0, 0, 25, '2020-11-04 15:28:48', '2020-11-04 15:28:48'),
	(1410, '2020-11-05', '2020-11-05 08:20:47', 1, '', 0, 0, 0, 0, 25, '2020-11-05 08:20:47', '2020-11-05 08:20:47'),
	(1411, '2020-11-05', '2020-11-05 08:32:58', 1, '', 0, 0, 0, 0, 25, '2020-11-05 08:32:58', '2020-11-05 08:32:58'),
	(1412, '2020-11-05', '2020-11-05 09:13:33', 1, '', 0, 0, 0, 0, 25, '2020-11-05 09:13:33', '2020-11-05 09:13:33'),
	(1413, '2020-11-05', '2020-11-05 09:54:50', 1, '', 0, 0, 0, 0, 25, '2020-11-05 09:54:50', '2020-11-05 09:54:50'),
	(1414, '2020-11-05', '2020-11-05 11:16:44', 1, '', 0, 0, 0, 0, 25, '2020-11-05 11:16:44', '2020-11-05 11:16:44'),
	(1415, '2020-11-05', '2020-11-05 15:21:04', 1, '', 0, 0, 0, 0, 25, '2020-11-05 15:21:04', '2020-11-05 15:21:04'),
	(1416, '2020-11-05', '2020-11-05 15:35:37', 1, '', 0, 0, 0, 0, 25, '2020-11-05 15:35:37', '2020-11-05 15:35:37'),
	(1417, '2020-11-06', '2020-11-06 08:48:58', 1, '', 0, 0, 0, 0, 25, '2020-11-06 08:48:58', '2020-11-06 08:48:58'),
	(1418, '2020-11-06', '2020-11-06 13:18:42', 1, '', 0, 0, 0, 0, 9, '2020-11-06 13:18:42', '2020-11-06 13:18:42'),
	(1419, '2020-11-06', '2020-11-06 14:12:06', 1, '', 0, 0, 0, 0, 9, '2020-11-06 14:12:06', '2020-11-06 14:12:06'),
	(1420, '2020-11-06', '2020-11-06 14:27:40', 1, '', 0, 0, 0, 0, 9, '2020-11-06 14:27:40', '2020-11-06 14:27:40'),
	(1421, '2020-11-06', '2020-11-06 14:35:37', 1, '', 0, 0, 0, 0, 25, '2020-11-06 14:35:37', '2020-11-06 14:35:37'),
	(1422, '2020-11-06', '2020-11-06 14:45:52', 1, '', 0, 0, 0, 0, 9, '2020-11-06 14:45:52', '2020-11-06 14:45:52'),
	(1423, '2020-11-06', '2020-11-06 15:36:44', 1, '', 0, 0, 0, 0, 25, '2020-11-06 15:36:44', '2020-11-06 15:36:44'),
	(1424, '2020-11-06', '2020-11-06 15:55:13', 1, '', 0, 0, 0, 0, 25, '2020-11-06 15:55:13', '2020-11-06 15:55:13'),
	(1425, '2020-11-07', '2020-11-07 10:31:41', 1, '', 0, 0, 0, 0, 25, '2020-11-07 10:31:41', '2020-11-07 10:31:41'),
	(1426, '2020-11-09', '2020-11-09 08:34:50', 1, '', 0, 0, 0, 0, 25, '2020-11-09 08:34:50', '2020-11-09 08:34:50'),
	(1427, '2020-11-09', '2020-11-09 08:42:53', 1, '', 0, 0, 0, 0, 25, '2020-11-09 08:42:53', '2020-11-09 08:42:53'),
	(1428, '2020-11-09', '2020-11-09 08:55:06', 1, '', 0, 0, 0, 0, 25, '2020-11-09 08:55:06', '2020-11-09 08:55:06'),
	(1429, '2020-11-09', '2020-11-09 09:27:57', 1, '', 0, 0, 0, 0, 25, '2020-11-09 09:27:57', '2020-11-09 09:27:57'),
	(1430, '2020-11-09', '2020-11-09 10:32:19', 1, '', 0, 0, 0, 0, 25, '2020-11-09 10:32:19', '2020-11-09 10:32:19'),
	(1431, '2020-11-09', '2020-11-09 11:52:29', 1, '', 0, 0, 0, 0, 25, '2020-11-09 11:52:29', '2020-11-09 11:52:29'),
	(1432, '2020-11-09', '2020-11-09 15:37:20', 1, '', 0, 0, 0, 0, 25, '2020-11-09 15:37:20', '2020-11-09 15:37:20'),
	(1433, '2020-11-10', '2020-11-10 08:17:48', 1, '', 0, 0, 0, 0, 25, '2020-11-10 08:17:48', '2020-11-10 08:17:48'),
	(1434, '2020-11-10', '2020-11-10 08:28:09', 1, '', 0, 0, 0, 0, 25, '2020-11-10 08:28:09', '2020-11-10 08:28:09'),
	(1435, '2020-11-10', '2020-11-10 08:54:40', 1, '', 0, 0, 0, 0, 25, '2020-11-10 08:54:40', '2020-11-10 08:54:40'),
	(1436, '2020-11-10', '2020-11-10 09:42:06', 1, '', 0, 0, 0, 0, 25, '2020-11-10 09:42:06', '2020-11-10 09:42:06'),
	(1437, '2020-11-10', '2020-11-10 10:55:21', 1, '', 0, 0, 0, 0, 25, '2020-11-10 10:55:21', '2020-11-10 10:55:21'),
	(1438, '2020-11-10', '2020-11-10 15:09:44', 1, '', 0, 0, 0, 0, 25, '2020-11-10 15:09:44', '2020-11-10 15:09:44'),
	(1439, '2020-11-11', '2020-11-11 09:31:08', 1, '', 0, 0, 0, 0, 25, '2020-11-11 09:31:08', '2020-11-11 09:31:08'),
	(1440, '2020-11-11', '2020-11-11 10:26:14', 1, '', 0, 0, 0, 0, 9, '2020-11-11 10:26:14', '2020-11-11 10:26:14'),
	(1441, '2020-11-11', '2020-11-11 10:30:13', 1, '', 0, 0, 0, 0, 9, '2020-11-11 10:30:13', '2020-11-11 10:30:13'),
	(1442, '2020-11-11', '2020-11-11 13:37:55', 1, '', 0, 0, 0, 0, 25, '2020-11-11 13:37:55', '2020-11-11 13:37:55'),
	(1443, '2020-11-11', '2020-11-11 14:20:49', 1, '', 0, 0, 0, 0, 9, '2020-11-11 14:20:49', '2020-11-11 14:20:49'),
	(1444, '2020-11-11', '2020-11-11 15:05:48', 1, '', 0, 0, 0, 0, 9, '2020-11-11 15:05:48', '2020-11-11 15:05:48'),
	(1445, '2020-11-12', '2020-11-12 08:00:00', 1, '', 0, 0, 0, 0, 25, '2020-11-12 08:00:00', '2020-11-12 08:00:00'),
	(1446, '2020-11-12', '2020-11-12 09:38:01', 1, '', 0, 0, 0, 0, 25, '2020-11-12 09:38:01', '2020-11-12 09:38:01'),
	(1447, '2020-11-12', '2020-11-12 09:45:07', 1, '', 0, 0, 0, 0, 25, '2020-11-12 09:45:07', '2020-11-12 09:45:07'),
	(1448, '2020-11-12', '2020-11-12 10:29:25', 1, '', 0, 0, 0, 0, 25, '2020-11-12 10:29:25', '2020-11-12 10:29:25'),
	(1449, '2020-11-12', '2020-11-12 10:33:51', 1, '', 0, 0, 0, 0, 25, '2020-11-12 10:33:51', '2020-11-12 10:33:51'),
	(1450, '2020-11-13', '2020-11-13 09:56:48', 1, '', 0, 0, 0, 0, 9, '2020-11-13 09:56:48', '2020-11-13 09:56:48'),
	(1451, '2020-11-13', '2020-11-13 14:06:20', 1, '', 0, 0, 0, 0, 9, '2020-11-13 14:06:20', '2020-11-13 14:06:20'),
	(1452, '2020-11-14', '2020-11-14 08:36:11', 1, '', 0, 0, 0, 0, 25, '2020-11-14 08:36:11', '2020-11-14 08:36:11'),
	(1453, '2020-11-14', '2020-11-14 09:17:14', 1, '', 0, 0, 0, 0, 25, '2020-11-14 09:17:14', '2020-11-14 09:17:14'),
	(1454, '2020-11-14', '2020-11-14 10:53:37', 1, '', 0, 0, 0, 0, 25, '2020-11-14 10:53:37', '2020-11-14 10:53:37'),
	(1455, '2020-11-14', '2020-11-14 11:07:24', 1, '', 0, 0, 0, 0, 25, '2020-11-14 11:07:24', '2020-11-14 11:07:24'),
	(1456, '2020-11-14', '2020-11-14 11:11:25', 1, '', 0, 0, 0, 0, 25, '2020-11-14 11:11:25', '2020-11-14 11:11:25'),
	(1457, '2020-11-14', '2020-11-14 11:21:08', 1, '', 0, 0, 0, 0, 25, '2020-11-14 11:21:08', '2020-11-14 11:21:08'),
	(1458, '2020-11-14', '2020-11-14 11:45:07', 1, '', 0, 0, 0, 0, 25, '2020-11-14 11:45:07', '2020-11-14 11:45:07'),
	(1459, '2020-11-16', '2020-11-16 09:14:33', 1, '', 0, 0, 0, 0, 25, '2020-11-16 09:14:33', '2020-11-16 09:14:33'),
	(1460, '2020-11-16', '2020-11-16 09:53:20', 1, '', 0, 0, 0, 0, 25, '2020-11-16 09:53:20', '2020-11-16 09:53:20'),
	(1461, '2020-11-16', '2020-11-16 10:13:02', 1, '', 0, 0, 0, 0, 25, '2020-11-16 10:13:02', '2020-11-16 10:13:02'),
	(1462, '2020-11-16', '2020-11-16 10:48:36', 1, '', 0, 0, 0, 0, 25, '2020-11-16 10:48:36', '2020-11-16 10:48:36'),
	(1463, '2020-11-16', '2020-11-16 11:15:00', 1, '', 0, 0, 0, 0, 25, '2020-11-16 11:15:00', '2020-11-16 11:15:00'),
	(1464, '2020-11-16', '2020-11-16 11:38:51', 1, '', 0, 0, 0, 0, 25, '2020-11-16 11:38:51', '2020-11-16 11:38:51'),
	(1465, '2020-11-16', '2020-11-16 13:37:08', 1, '', 0, 0, 0, 0, 25, '2020-11-16 13:37:08', '2020-11-16 13:37:08'),
	(1466, '2020-11-17', '2020-11-17 08:44:42', 1, '', 0, 0, 0, 0, 25, '2020-11-17 08:44:42', '2020-11-17 08:44:42'),
	(1467, '2020-11-17', '2020-11-17 10:18:24', 1, '', 0, 0, 0, 0, 25, '2020-11-17 10:18:24', '2020-11-17 10:18:24'),
	(1468, '2020-11-17', '2020-11-17 15:38:07', 1, '', 0, 0, 0, 0, 25, '2020-11-17 15:38:07', '2020-11-17 15:38:07'),
	(1469, '2020-11-18', '2020-11-18 10:29:11', 1, '', 0, 0, 0, 0, 9, '2020-11-18 10:29:11', '2020-11-18 10:29:11'),
	(1470, '2020-11-18', '2020-11-18 10:32:29', 1, '', 0, 0, 0, 0, 9, '2020-11-18 10:32:29', '2020-11-18 10:32:29'),
	(1471, '2020-11-18', '2020-11-18 10:34:56', 1, '', 0, 0, 0, 0, 9, '2020-11-18 10:34:56', '2020-11-18 10:34:56'),
	(1472, '2020-11-18', '2020-11-18 10:38:12', 1, '', 0, 0, 0, 0, 25, '2020-11-18 10:38:12', '2020-11-18 10:38:12'),
	(1473, '2020-11-18', '2020-11-18 11:12:28', 1, '', 0, 0, 0, 0, 9, '2020-11-18 11:12:28', '2020-11-18 11:12:28'),
	(1474, '2020-11-18', '2020-11-18 15:16:50', 1, '', 0, 0, 0, 0, 25, '2020-11-18 15:16:50', '2020-11-18 15:16:50'),
	(1475, '2020-11-19', '2020-11-19 09:16:12', 1, '', 0, 0, 0, 0, 25, '2020-11-19 09:16:12', '2020-11-19 09:16:12'),
	(1476, '2020-11-19', '2020-11-19 09:46:13', 1, '', 0, 0, 0, 0, 25, '2020-11-19 09:46:13', '2020-11-19 09:46:13'),
	(1477, '2020-11-19', '2020-11-19 11:23:40', 1, '', 0, 0, 0, 0, 25, '2020-11-19 11:23:40', '2020-11-19 11:23:40'),
	(1478, '2020-11-19', '2020-11-19 14:44:35', 1, '', 0, 0, 0, 0, 25, '2020-11-19 14:44:35', '2020-11-19 14:44:35'),
	(1479, '2020-11-19', '2020-11-19 15:08:39', 1, '', 0, 0, 0, 0, 25, '2020-11-19 15:08:39', '2020-11-19 15:08:39'),
	(1480, '2020-11-19', '2020-11-19 15:22:12', 1, '', 0, 0, 0, 0, 25, '2020-11-19 15:22:12', '2020-11-19 15:22:12'),
	(1481, '2020-11-20', '2020-11-20 09:40:18', 1, '', 0, 0, 0, 0, 25, '2020-11-20 09:40:18', '2020-11-20 09:40:18'),
	(1482, '2020-11-20', '2020-11-20 10:23:59', 1, '', 0, 0, 0, 0, 9, '2020-11-20 10:23:59', '2020-11-20 10:23:59'),
	(1483, '2020-11-20', '2020-11-20 10:34:17', 1, '', 0, 0, 0, 0, 9, '2020-11-20 10:34:17', '2020-11-20 10:34:17'),
	(1484, '2020-11-20', '2020-11-20 10:37:13', 1, '', 0, 0, 0, 0, 9, '2020-11-20 10:37:13', '2020-11-20 10:37:13'),
	(1485, '2020-11-20', '2020-11-20 10:54:44', 1, '', 0, 0, 0, 0, 9, '2020-11-20 10:54:44', '2020-11-20 10:54:44'),
	(1486, '2020-11-20', '2020-11-20 15:45:11', 1, '', 0, 0, 0, 0, 25, '2020-11-20 15:45:11', '2020-11-20 15:45:11'),
	(1487, '2020-11-21', '2020-11-21 08:50:12', 1, '', 0, 0, 0, 0, 25, '2020-11-21 08:50:12', '2020-11-21 08:50:12'),
	(1488, '2020-11-21', '2020-11-21 08:56:04', 1, '', 0, 0, 0, 0, 25, '2020-11-21 08:56:04', '2020-11-21 08:56:04'),
	(1489, '2020-11-21', '2020-11-21 09:48:56', 1, '', 0, 0, 0, 0, 25, '2020-11-21 09:48:56', '2020-11-21 09:48:56'),
	(1490, '2020-11-21', '2020-11-21 10:36:31', 1, '', 0, 0, 0, 0, 25, '2020-11-21 10:36:31', '2020-11-21 10:36:31'),
	(1491, '2020-11-21', '2020-11-21 11:18:46', 1, '', 0, 0, 0, 0, 25, '2020-11-21 11:18:46', '2020-11-21 11:18:46'),
	(1492, '2020-11-21', '2020-11-21 11:24:06', 1, '', 0, 0, 0, 0, 25, '2020-11-21 11:24:06', '2020-11-21 11:24:06'),
	(1493, '2020-11-23', '2020-11-23 10:37:11', 1, '', 0, 0, 0, 0, 9, '2020-11-23 10:37:11', '2020-11-23 10:37:11'),
	(1494, '2020-11-23', '2020-11-23 10:59:19', 1, 'KELOS 80/2 M.0648', 0, 0, 0, 0, 17, '2020-11-23 10:59:19', '2020-11-23 10:59:19'),
	(1495, '2020-11-23', '2020-11-23 11:05:09', 1, '', 0, 0, 0, 0, 9, '2020-11-23 11:05:09', '2020-11-23 11:05:09'),
	(1496, '2020-11-23', '2020-11-23 11:40:30', 1, '', 0, 0, 0, 0, 17, '2020-11-23 11:40:30', '2020-11-23 11:40:30'),
	(1497, '2020-11-23', '2020-11-23 12:51:00', 1, '', 0, 0, 0, 0, 17, '2020-11-23 12:51:00', '2020-11-23 12:51:00'),
	(1498, '2020-11-23', '2020-11-23 13:22:57', 1, '', 0, 0, 0, 0, 25, '2020-11-23 13:22:57', '2020-11-23 13:22:57'),
	(1499, '2020-11-23', '2020-11-23 13:31:56', 1, '', 0, 0, 0, 0, 25, '2020-11-23 13:31:56', '2020-11-23 13:31:56'),
	(1500, '2020-11-23', '2020-11-23 13:47:27', 1, '', 0, 0, 0, 0, 25, '2020-11-23 13:47:27', '2020-11-23 13:47:27'),
	(1501, '2020-11-23', '2020-11-23 13:52:29', 1, 'CELUP OP', 0, 0, 0, 0, 17, '2020-11-23 13:52:29', '2020-11-23 13:52:29'),
	(1502, '2020-11-23', '2020-11-23 14:02:06', 1, '', 0, 0, 0, 0, 25, '2020-11-23 14:02:06', '2020-11-23 14:02:06'),
	(1503, '2020-11-23', '2020-11-23 14:10:15', 1, '', 0, 0, 0, 0, 25, '2020-11-23 14:10:15', '2020-11-23 14:10:15'),
	(1504, '2020-11-23', '2020-11-23 14:11:00', 1, 'CELUP OP 2', 0, 0, 0, 0, 17, '2020-11-23 14:11:00', '2020-11-23 14:11:00'),
	(1505, '2020-11-23', '2020-11-23 14:20:39', 1, '', 0, 0, 0, 0, 25, '2020-11-23 14:20:39', '2020-11-23 14:20:39'),
	(1506, '2020-11-23', '2020-11-23 14:41:30', 1, 'CELUP OP 3', 0, 0, 0, 0, 17, '2020-11-23 14:41:30', '2020-11-23 14:41:30'),
	(1507, '2020-11-23', '2020-11-23 14:46:05', 1, 'CELUP OP 4', 0, 0, 0, 0, 17, '2020-11-23 14:46:05', '2020-11-23 14:46:05'),
	(1508, '2020-11-23', '2020-11-23 15:37:22', 1, '', 0, 0, 0, 0, 25, '2020-11-23 15:37:22', '2020-11-23 15:37:22'),
	(1509, '2020-11-24', '2020-11-24 08:14:12', 1, '', 0, 0, 0, 0, 17, '2020-11-24 08:14:12', '2020-11-24 08:14:12'),
	(1510, '2020-11-24', '2020-11-24 08:27:25', 1, 'CELUP OP4', 0, 0, 0, 0, 17, '2020-11-24 08:27:25', '2020-11-24 08:27:25'),
	(1511, '2020-11-24', '2020-11-24 08:31:55', 1, '', 0, 0, 0, 0, 25, '2020-11-24 08:31:55', '2020-11-24 08:31:55'),
	(1512, '2020-11-24', '2020-11-24 08:46:42', 1, 'CELUP OP5 & KELOS OP1', 0, 0, 0, 0, 17, '2020-11-24 08:46:42', '2020-11-24 08:46:42'),
	(1513, '2020-11-24', '2020-11-24 09:07:58', 1, 'BUKA OP1', 0, 0, 0, 0, 17, '2020-11-24 09:07:58', '2020-11-24 09:07:58'),
	(1514, '2020-11-24', '2020-11-24 09:36:08', 1, '', 0, 0, 0, 0, 25, '2020-11-24 09:36:08', '2020-11-24 09:36:08'),
	(1515, '2020-11-24', '2020-11-24 11:50:58', 1, '', 0, 0, 0, 0, 25, '2020-11-24 11:50:58', '2020-11-24 11:50:58'),
	(1516, '2020-11-24', '2020-11-24 14:42:24', 1, '', 0, 0, 0, 0, 25, '2020-11-24 14:42:24', '2020-11-24 14:42:24'),
	(1517, '2020-11-24', '2020-11-24 15:03:00', 1, '', 0, 0, 0, 0, 25, '2020-11-24 15:03:00', '2020-11-24 15:03:00'),
	(1518, '2020-11-24', '2020-11-24 15:04:31', 1, '', 0, 0, 0, 0, 25, '2020-11-24 15:04:31', '2020-11-24 15:04:31'),
	(1519, '2020-11-24', '2020-11-24 15:07:21', 1, '', 0, 0, 0, 0, 25, '2020-11-24 15:07:21', '2020-11-24 15:07:21'),
	(1520, '2020-11-24', '2020-11-24 15:41:49', 1, '', 0, 0, 0, 0, 25, '2020-11-24 15:41:49', '2020-11-24 15:41:49'),
	(1521, '2020-11-24', '2020-11-24 15:45:55', 1, '', 0, 0, 0, 0, 25, '2020-11-24 15:45:55', '2020-11-24 15:45:55'),
	(1522, '2020-11-24', '2020-11-24 15:58:11', 1, '', 0, 0, 0, 0, 25, '2020-11-24 15:58:11', '2020-11-24 15:58:11'),
	(1523, '2020-11-25', '2020-11-25 08:12:00', 1, '', 0, 0, 0, 0, 25, '2020-11-25 08:12:00', '2020-11-25 08:12:00'),
	(1524, '2020-11-25', '2020-11-25 08:18:41', 1, '', 0, 0, 0, 0, 25, '2020-11-25 08:18:41', '2020-11-25 08:18:41'),
	(1525, '2020-11-25', '2020-11-25 08:26:10', 1, '', 0, 0, 0, 0, 25, '2020-11-25 08:26:10', '2020-11-25 08:26:10'),
	(1526, '2020-11-25', '2020-11-25 08:32:44', 1, '', 0, 0, 0, 0, 25, '2020-11-25 08:32:44', '2020-11-25 08:32:44'),
	(1527, '2020-11-25', '2020-11-25 09:07:57', 1, '', 0, 0, 0, 0, 25, '2020-11-25 09:07:57', '2020-11-25 09:07:57'),
	(1528, '2020-11-25', '2020-11-25 11:02:45', 1, '', 0, 0, 0, 0, 25, '2020-11-25 11:02:45', '2020-11-25 11:02:45'),
	(1529, '2020-11-25', '2020-11-25 11:07:36', 1, '', 0, 0, 0, 0, 25, '2020-11-25 11:07:36', '2020-11-25 11:07:36'),
	(1530, '2020-11-25', '2020-11-25 15:05:02', 1, '', 0, 0, 0, 0, 25, '2020-11-25 15:05:02', '2020-11-25 15:05:02'),
	(1531, '2020-11-26', '2020-11-26 09:12:56', 1, '', 0, 0, 0, 0, 25, '2020-11-26 09:12:56', '2020-11-26 09:12:56'),
	(1532, '2020-11-26', '2020-11-26 09:19:43', 1, '', 0, 0, 0, 0, 25, '2020-11-26 09:19:43', '2020-11-26 09:19:43'),
	(1533, '2020-11-26', '2020-11-26 09:57:50', 1, '', 0, 0, 0, 0, 25, '2020-11-26 09:57:50', '2020-11-26 09:57:50'),
	(1534, '2020-11-26', '2020-11-26 10:27:34', 1, '', 0, 0, 0, 0, 25, '2020-11-26 10:27:34', '2020-11-26 10:27:34'),
	(1535, '2020-11-26', '2020-11-26 14:11:17', 1, '', 0, 0, 0, 0, 25, '2020-11-26 14:11:17', '2020-11-26 14:11:17'),
	(1536, '2020-11-26', '2020-11-26 14:16:20', 1, '', 0, 0, 0, 0, 25, '2020-11-26 14:16:20', '2020-11-26 14:16:20'),
	(1537, '2020-11-27', '2020-11-27 09:06:09', 1, '', 0, 0, 0, 0, 25, '2020-11-27 09:06:09', '2020-11-27 09:06:09'),
	(1538, '2020-11-27', '2020-11-27 10:34:16', 1, '', 0, 0, 0, 0, 25, '2020-11-27 10:34:16', '2020-11-27 10:34:16'),
	(1539, '2020-11-27', '2020-11-27 15:18:51', 1, '', 0, 0, 0, 0, 25, '2020-11-27 15:18:51', '2020-11-27 15:18:51'),
	(1540, '2020-11-27', '2020-11-27 15:40:03', 1, '', 0, 0, 0, 0, 25, '2020-11-27 15:40:03', '2020-11-27 15:40:03'),
	(1541, '2020-11-27', '2020-11-27 15:42:43', 1, '', 0, 0, 0, 0, 25, '2020-11-27 15:42:43', '2020-11-27 15:42:43'),
	(1542, '2020-11-27', '2020-11-27 15:45:32', 1, '', 0, 0, 0, 0, 25, '2020-11-27 15:45:32', '2020-11-27 15:45:32'),
	(1543, '2020-11-27', '2020-11-27 15:48:04', 1, '', 0, 0, 0, 0, 25, '2020-11-27 15:48:04', '2020-11-27 15:48:04'),
	(1544, '2020-11-28', '2020-11-28 11:55:06', 1, '', 0, 0, 0, 0, 25, '2020-11-28 11:55:06', '2020-11-28 11:55:06'),
	(1545, '2020-11-28', '2020-11-28 13:19:53', 1, '', 0, 0, 0, 0, 25, '2020-11-28 13:19:53', '2020-11-28 13:19:53'),
	(1546, '2020-11-30', '2020-11-30 10:13:23', 1, '', 0, 0, 0, 0, 25, '2020-11-30 10:13:23', '2020-11-30 10:13:23'),
	(1547, '2020-11-30', '2020-11-30 11:54:51', 1, '', 0, 0, 0, 0, 25, '2020-11-30 11:54:51', '2020-11-30 11:54:51'),
	(1548, '2020-12-01', '2020-12-01 08:07:51', 1, '', 0, 0, 0, 0, 25, '2020-12-01 08:07:51', '2020-12-01 08:07:51'),
	(1549, '2020-12-01', '2020-12-01 14:21:29', 1, '', 0, 0, 0, 0, 25, '2020-12-01 14:21:29', '2020-12-01 14:21:29'),
	(1550, '2020-12-01', '2020-12-01 14:42:56', 1, '', 0, 0, 0, 0, 25, '2020-12-01 14:42:56', '2020-12-01 14:42:56'),
	(1551, '2020-12-01', '2020-12-01 14:58:44', 1, '', 0, 0, 0, 0, 25, '2020-12-01 14:58:44', '2020-12-01 14:58:44'),
	(1552, '2020-12-01', '2020-12-01 14:58:44', 1, '', 0, 0, 0, 0, 25, '2020-12-01 14:58:44', '2020-12-01 14:58:44'),
	(1553, '2020-12-01', '2020-12-01 14:58:45', 1, '', 0, 0, 0, 0, 25, '2020-12-01 14:58:45', '2020-12-01 14:58:45'),
	(1554, '2020-12-02', '2020-12-02 08:47:04', 1, '', 0, 0, 0, 0, 25, '2020-12-02 08:47:04', '2020-12-02 08:47:04'),
	(1555, '2020-12-02', '2020-12-02 10:52:23', 1, '', 0, 0, 0, 0, 25, '2020-12-02 10:52:23', '2020-12-02 10:52:23'),
	(1556, '2020-12-02', '2020-12-02 14:16:26', 1, '', 0, 0, 0, 0, 25, '2020-12-02 14:16:26', '2020-12-02 14:16:26'),
	(1557, '2020-12-02', '2020-12-02 14:34:47', 1, '', 0, 0, 0, 0, 25, '2020-12-02 14:34:47', '2020-12-02 14:34:47'),
	(1558, '2020-12-02', '2020-12-02 14:39:41', 1, '', 0, 0, 0, 0, 25, '2020-12-02 14:39:41', '2020-12-02 14:39:41'),
	(1559, '2020-12-02', '2020-12-02 15:47:59', 1, '', 0, 0, 0, 0, 25, '2020-12-02 15:47:59', '2020-12-02 15:47:59'),
	(1560, '2020-12-03', '2020-12-03 08:25:21', 1, '', 0, 0, 0, 0, 25, '2020-12-03 08:25:21', '2020-12-03 08:25:21'),
	(1561, '2020-12-04', '2020-12-04 10:54:16', 1, '', 0, 0, 0, 0, 25, '2020-12-04 10:54:16', '2020-12-04 10:54:16'),
	(1562, '2020-12-04', '2020-12-04 14:34:18', 1, '', 0, 0, 0, 0, 25, '2020-12-04 14:34:18', '2020-12-04 14:34:18'),
	(1563, '2020-12-04', '2020-12-04 15:37:18', 1, '', 0, 0, 0, 0, 25, '2020-12-04 15:37:18', '2020-12-04 15:37:18'),
	(1564, '2020-12-04', '2020-12-04 15:49:10', 1, '', 0, 0, 0, 0, 25, '2020-12-04 15:49:10', '2020-12-04 15:49:10'),
	(1565, '2020-12-05', '2020-12-05 08:52:10', 1, '', 0, 0, 0, 0, 25, '2020-12-05 08:52:10', '2020-12-05 08:52:10'),
	(1566, '2020-12-05', '2020-12-05 10:12:44', 1, '', 0, 0, 0, 0, 25, '2020-12-05 10:12:44', '2020-12-05 10:12:44'),
	(1567, '2020-12-07', '2020-12-07 13:26:09', 1, '', 0, 0, 0, 0, 25, '2020-12-07 13:26:09', '2020-12-07 13:26:09'),
	(1568, '2020-12-07', '2020-12-07 14:54:30', 1, '', 0, 0, 0, 0, 25, '2020-12-07 14:54:30', '2020-12-07 14:54:30'),
	(1569, '2020-12-08', '2020-12-08 09:14:46', 1, '', 0, 0, 0, 0, 25, '2020-12-08 09:14:46', '2020-12-08 09:14:46'),
	(1570, '2020-12-08', '2020-12-08 13:42:48', 1, '', 0, 0, 0, 0, 25, '2020-12-08 13:42:48', '2020-12-08 13:42:48'),
	(1571, '2020-12-08', '2020-12-08 13:49:58', 1, '', 0, 0, 0, 0, 25, '2020-12-08 13:49:58', '2020-12-08 13:49:58'),
	(1572, '2020-12-08', '2020-12-08 15:58:28', 1, '', 0, 0, 0, 0, 25, '2020-12-08 15:58:28', '2020-12-08 15:58:28'),
	(1573, '2020-12-10', '2020-12-10 09:36:44', 1, '', 0, 0, 0, 0, 25, '2020-12-10 09:36:44', '2020-12-10 09:36:44'),
	(1574, '2020-12-10', '2020-12-10 10:33:03', 1, '', 0, 0, 0, 0, 25, '2020-12-10 10:33:03', '2020-12-10 10:33:03'),
	(1575, '2020-12-10', '2020-12-10 14:00:33', 1, '', 0, 0, 0, 0, 25, '2020-12-10 14:00:33', '2020-12-10 14:00:33'),
	(1576, '2020-12-10', '2020-12-10 14:52:50', 1, '', 0, 0, 0, 0, 25, '2020-12-10 14:52:50', '2020-12-10 14:52:50'),
	(1577, '2020-12-10', '2020-12-10 15:18:08', 1, '', 0, 0, 0, 0, 25, '2020-12-10 15:18:08', '2020-12-10 15:18:08'),
	(1578, '2020-12-10', '2020-12-10 15:36:01', 1, '', 0, 0, 0, 0, 25, '2020-12-10 15:36:01', '2020-12-10 15:36:01'),
	(1579, '2020-12-11', '2020-12-11 09:59:59', 1, '', 0, 0, 0, 0, 25, '2020-12-11 09:59:59', '2020-12-11 09:59:59'),
	(1580, '2020-12-11', '2020-12-11 14:00:09', 1, '', 0, 0, 0, 0, 25, '2020-12-11 14:00:09', '2020-12-11 14:00:09'),
	(1581, '2020-12-11', '2020-12-11 14:24:30', 1, '', 0, 0, 0, 0, 25, '2020-12-11 14:24:30', '2020-12-11 14:24:30'),
	(1582, '2020-12-11', '2020-12-11 15:10:35', 1, 'NOMER ORDER KK.0140', 0, 0, 0, 0, 9, '2020-12-11 15:10:35', '2020-12-11 15:10:35'),
	(1583, '2020-12-11', '2020-12-11 15:27:41', 1, '', 0, 0, 0, 0, 25, '2020-12-11 15:27:41', '2020-12-11 15:27:41'),
	(1584, '2020-12-12', '2020-12-12 08:20:21', 1, '', 0, 0, 0, 0, 25, '2020-12-12 08:20:21', '2020-12-12 08:20:21'),
	(1585, '2020-12-12', '2020-12-12 08:47:37', 1, '', 0, 0, 0, 0, 25, '2020-12-12 08:47:37', '2020-12-12 08:47:37'),
	(1586, '2020-12-12', '2020-12-12 10:02:27', 1, '', 0, 0, 0, 0, 25, '2020-12-12 10:02:27', '2020-12-12 10:02:27'),
	(1587, '2020-12-14', '2020-12-14 10:54:34', 1, '', 0, 0, 0, 0, 25, '2020-12-14 10:54:34', '2020-12-14 10:54:34'),
	(1588, '2020-12-14', '2020-12-14 11:30:20', 1, '', 0, 0, 0, 0, 25, '2020-12-14 11:30:20', '2020-12-14 11:30:20'),
	(1589, '2020-12-15', '2020-12-15 08:38:00', 1, '', 0, 0, 0, 0, 25, '2020-12-15 08:38:00', '2020-12-15 08:38:00'),
	(1590, '2020-12-15', '2020-12-15 10:11:17', 1, '', 0, 0, 0, 0, 25, '2020-12-15 10:11:17', '2020-12-15 10:11:17'),
	(1591, '2020-12-15', '2020-12-15 13:09:58', 1, '', 0, 0, 0, 0, 25, '2020-12-15 13:09:58', '2020-12-15 13:09:58'),
	(1592, '2020-12-15', '2020-12-15 13:12:58', 1, '', 0, 0, 0, 0, 25, '2020-12-15 13:12:58', '2020-12-15 13:12:58'),
	(1593, '2020-12-15', '2020-12-15 13:25:34', 1, '', 0, 0, 0, 0, 25, '2020-12-15 13:25:34', '2020-12-15 13:25:34'),
	(1594, '2020-12-15', '2020-12-15 15:23:27', 1, '', 0, 0, 0, 0, 25, '2020-12-15 15:23:27', '2020-12-15 15:23:27'),
	(1595, '2020-12-15', '2020-12-15 15:58:27', 1, '', 0, 0, 0, 0, 25, '2020-12-15 15:58:27', '2020-12-15 15:58:27'),
	(1596, '2020-12-16', '2020-12-16 09:02:37', 1, '', 0, 0, 0, 0, 25, '2020-12-16 09:02:37', '2020-12-16 09:02:37'),
	(1597, '2020-12-17', '2020-12-17 10:39:01', 1, '', 0, 0, 0, 0, 25, '2020-12-17 10:39:01', '2020-12-17 10:39:01'),
	(1598, '2020-12-17', '2020-12-17 11:01:37', 1, '', 0, 0, 0, 0, 25, '2020-12-17 11:01:37', '2020-12-17 11:01:37'),
	(1599, '2020-12-18', '2020-12-18 10:27:09', 1, '', 0, 0, 0, 0, 25, '2020-12-18 10:27:09', '2020-12-18 10:27:09'),
	(1600, '2020-12-18', '2020-12-18 10:52:39', 1, '', 0, 0, 0, 0, 25, '2020-12-18 10:52:39', '2020-12-18 10:52:39'),
	(1601, '2020-12-18', '2020-12-18 15:49:27', 1, '', 0, 0, 0, 0, 25, '2020-12-18 15:49:27', '2020-12-18 15:49:27'),
	(1602, '2020-12-19', '2020-12-19 09:29:49', 1, '', 0, 0, 0, 0, 25, '2020-12-19 09:29:49', '2020-12-19 09:29:49'),
	(1603, '2020-12-19', '2020-12-19 10:00:26', 1, '', 0, 0, 0, 0, 25, '2020-12-19 10:00:26', '2020-12-19 10:00:26'),
	(1604, '2020-12-21', '2020-12-21 08:38:20', 1, '', 0, 0, 0, 0, 25, '2020-12-21 08:38:20', '2020-12-21 08:38:20'),
	(1605, '2020-12-21', '2020-12-21 09:26:55', 1, '', 0, 0, 0, 0, 25, '2020-12-21 09:26:55', '2020-12-21 09:26:55'),
	(1606, '2020-12-21', '2020-12-21 09:38:12', 1, '', 0, 0, 0, 0, 25, '2020-12-21 09:38:12', '2020-12-21 09:38:12'),
	(1607, '2020-12-21', '2020-12-21 14:46:30', 1, '', 0, 0, 0, 0, 25, '2020-12-21 14:46:30', '2020-12-21 14:46:30'),
	(1608, '2020-12-21', '2020-12-21 14:59:26', 1, '', 0, 0, 0, 0, 25, '2020-12-21 14:59:26', '2020-12-21 14:59:26'),
	(1609, '2020-12-22', '2020-12-22 08:21:21', 1, '', 0, 0, 0, 0, 25, '2020-12-22 08:21:21', '2020-12-22 08:21:21'),
	(1610, '2020-12-22', '2020-12-22 10:59:18', 1, '', 0, 0, 0, 0, 25, '2020-12-22 10:59:18', '2020-12-22 10:59:18'),
	(1611, '2020-12-22', '2020-12-22 14:10:19', 1, '', 0, 0, 0, 0, 25, '2020-12-22 14:10:19', '2020-12-22 14:10:19'),
	(1612, '2020-12-23', '2020-12-23 08:18:39', 1, '', 0, 0, 0, 0, 25, '2020-12-23 08:18:39', '2020-12-23 08:18:39'),
	(1613, '2020-12-23', '2020-12-23 09:20:00', 1, '', 0, 0, 0, 0, 25, '2020-12-23 09:20:00', '2020-12-23 09:20:00'),
	(1614, '2020-12-23', '2020-12-23 09:59:37', 1, '', 0, 0, 0, 0, 25, '2020-12-23 09:59:37', '2020-12-23 09:59:37'),
	(1615, '2020-12-23', '2020-12-23 10:08:15', 1, '', 0, 0, 0, 0, 25, '2020-12-23 10:08:15', '2020-12-23 10:08:15'),
	(1616, '2020-12-23', '2020-12-23 10:50:45', 1, '', 0, 0, 0, 0, 25, '2020-12-23 10:50:45', '2020-12-23 10:50:45'),
	(1617, '2020-12-23', '2020-12-23 14:55:44', 1, '', 0, 0, 0, 0, 25, '2020-12-23 14:55:44', '2020-12-23 14:55:44'),
	(1618, '2020-12-24', '2020-12-24 08:11:08', 1, '', 0, 0, 0, 0, 25, '2020-12-24 08:11:08', '2020-12-24 08:11:08'),
	(1619, '2020-12-24', '2020-12-24 09:37:18', 1, '', 0, 0, 0, 0, 25, '2020-12-24 09:37:18', '2020-12-24 09:37:18'),
	(1620, '2020-12-24', '2020-12-24 10:40:48', 1, '', 0, 0, 0, 0, 25, '2020-12-24 10:40:48', '2020-12-24 10:40:48'),
	(1621, '2020-12-24', '2020-12-24 11:30:07', 1, '', 0, 0, 0, 0, 25, '2020-12-24 11:30:07', '2020-12-24 11:30:07'),
	(1622, '2020-12-25', '2020-12-25 08:32:30', 1, '', 0, 0, 0, 0, 25, '2020-12-25 08:32:30', '2020-12-25 08:32:30'),
	(1623, '2020-12-25', '2020-12-25 08:58:52', 1, '', 0, 0, 0, 0, 25, '2020-12-25 08:58:52', '2020-12-25 08:58:52'),
	(1624, '2020-12-25', '2020-12-25 15:53:44', 1, '', 0, 0, 0, 0, 25, '2020-12-25 15:53:44', '2020-12-25 15:53:44'),
	(1625, '2020-12-26', '2020-12-26 08:36:24', 1, '', 0, 0, 0, 0, 25, '2020-12-26 08:36:24', '2020-12-26 08:36:24'),
	(1626, '2020-12-26', '2020-12-26 09:36:07', 1, '', 0, 0, 0, 0, 25, '2020-12-26 09:36:07', '2020-12-26 09:36:07'),
	(1627, '2020-12-24', '2020-12-24 11:46:15', 1, '', 0, 0, 0, 0, 25, '2020-12-28 11:46:15', '2020-12-28 11:46:15'),
	(1628, '2020-12-24', '2020-12-24 11:46:18', 1, '', 0, 0, 0, 0, 25, '2020-12-28 11:46:18', '2020-12-28 11:46:18'),
	(1629, '2020-12-24', '2020-12-24 13:04:22', 1, '', 0, 0, 0, 0, 25, '2020-12-28 13:04:22', '2020-12-28 13:04:22'),
	(1630, '2020-12-25', '2020-12-25 13:15:38', 1, '', 0, 0, 0, 0, 25, '2020-12-28 13:15:38', '2020-12-28 13:15:38'),
	(1631, '2020-12-26', '2020-12-26 13:21:45', 1, '', 0, 0, 0, 0, 25, '2020-12-28 13:21:45', '2020-12-28 13:21:45'),
	(1632, '2020-12-28', '2020-12-28 13:34:51', 1, '', 0, 0, 0, 0, 25, '2020-12-28 13:34:51', '2020-12-28 13:34:51'),
	(1633, '2020-12-24', '2020-12-24 14:43:55', 1, '', 0, 0, 0, 0, 25, '2020-12-28 14:43:55', '2020-12-28 14:43:55'),
	(1634, '2020-12-28', '2020-12-28 14:52:28', 1, '', 0, 0, 0, 0, 25, '2020-12-28 14:52:28', '2020-12-28 14:52:28'),
	(1635, '2020-12-28', '2020-12-28 09:57:36', 1, '', 0, 0, 0, 0, 25, '2020-12-29 09:57:36', '2020-12-29 09:57:36'),
	(1636, '2020-12-28', '2020-12-28 10:09:33', 1, '', 0, 0, 0, 0, 25, '2020-12-29 10:09:33', '2020-12-29 10:09:33'),
	(1637, '2020-12-29', '2020-12-29 13:05:00', 1, '', 0, 0, 0, 0, 25, '2020-12-29 13:05:00', '2020-12-29 13:05:00'),
	(1638, '2020-12-29', '2020-12-29 13:26:41', 1, '', 0, 0, 0, 0, 25, '2020-12-29 13:26:41', '2020-12-29 13:26:41'),
	(1639, '2020-12-28', '2020-12-28 13:34:05', 1, '', 0, 0, 0, 0, 25, '2020-12-29 13:34:05', '2020-12-29 13:34:05'),
	(1640, '2020-12-29', '2020-12-29 15:32:22', 1, '', 0, 0, 0, 0, 25, '2020-12-29 15:32:22', '2020-12-29 15:32:22'),
	(1641, '2020-12-29', '2020-12-29 08:32:28', 1, '', 0, 0, 0, 0, 25, '2020-12-30 08:32:28', '2020-12-30 08:32:28'),
	(1642, '2020-12-30', '2020-12-30 11:40:58', 1, '', 0, 0, 0, 0, 25, '2020-12-30 11:40:58', '2020-12-30 11:40:58'),
	(1643, '2020-12-18', '2020-12-18 11:59:39', 1, '', 0, 0, 0, 0, 25, '2020-12-30 11:59:39', '2020-12-30 11:59:39'),
	(1644, '2020-12-18', '2020-12-18 12:54:45', 1, '', 0, 0, 0, 0, 25, '2020-12-30 12:54:45', '2020-12-30 12:54:45'),
	(1645, '2020-12-29', '2020-12-29 12:59:41', 1, '', 0, 0, 0, 0, 25, '2020-12-30 12:59:41', '2020-12-30 12:59:41'),
	(1646, '2020-12-29', '2020-12-29 13:21:02', 1, '', 0, 0, 0, 0, 25, '2020-12-30 13:21:02', '2020-12-30 13:21:02');
/*!40000 ALTER TABLE `inv_rubahspk` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.inv_rubahspk_barang
CREATE TABLE IF NOT EXISTS `inv_rubahspk_barang` (
  `id_rubahspk_barang` int(11) NOT NULL AUTO_INCREMENT,
  `id_rubahspk` int(11) NOT NULL,
  `kode_barang` int(11) NOT NULL,
  `nama_barang` varchar(100) NOT NULL,
  `jumlah` varchar(50) NOT NULL,
  `id_gudang` int(10) NOT NULL,
  `id_workorder_awal` int(10) NOT NULL,
  `id_workorder_barang_awal` int(10) NOT NULL,
  `id_workorder_akhir` int(10) NOT NULL,
  `id_workorder_barang_akhir` int(10) NOT NULL,
  `id_satuan` int(10) NOT NULL,
  `id_proses` int(10) NOT NULL,
  `id_komposisi` int(10) NOT NULL,
  `id_motif` int(10) NOT NULL,
  `id_motif_barang` int(10) NOT NULL,
  `id_label` int(10) NOT NULL,
  `id_kualitas` int(10) NOT NULL,
  `id_kualitas_dudul` int(10) NOT NULL,
  `id_kemasan` int(10) NOT NULL,
  `id_kemasansatuan` int(10) NOT NULL,
  `id_kemasansepuluh` int(10) NOT NULL,
  `id_kemasanseratus` int(10) NOT NULL,
  `id_cap` int(10) NOT NULL,
  `id_kualitas_proses` int(10) NOT NULL,
  `id_kualitas_periksa` int(10) NOT NULL,
  `id_perubahansatuan` int(10) NOT NULL,
  `jumlah_rencana` double NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_rubahspk_barang`) USING BTREE,
  KEY `fk_idrubahspk` (`id_rubahspk`) USING BTREE,
  KEY `index_invrubahspk_barang` (`id_rubahspk`,`kode_barang`,`id_gudang`,`id_workorder_awal`,`id_workorder_barang_awal`,`id_workorder_akhir`,`id_workorder_barang_akhir`,`id_satuan`,`id_proses`) USING BTREE,
  CONSTRAINT `fk_invrubah_spkbarang` FOREIGN KEY (`id_rubahspk`) REFERENCES `inv_rubahspk` (`id_rubahspk`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_rubahspk_barang: ~0 rows (lebih kurang)
DELETE FROM `inv_rubahspk_barang`;
/*!40000 ALTER TABLE `inv_rubahspk_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `inv_rubahspk_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.inv_saldoawal
CREATE TABLE IF NOT EXISTS `inv_saldoawal` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `id_barang` int(255) NOT NULL DEFAULT '0',
  `id_gudang` int(255) NOT NULL DEFAULT '0',
  `id_proses` int(255) NOT NULL DEFAULT '0',
  `id_satuan` int(255) NOT NULL DEFAULT '0',
  `id_perubahansatuan` int(11) NOT NULL DEFAULT '1',
  `jumlah_saldoawal` double NOT NULL DEFAULT '0',
  `jumlah_rencana` double NOT NULL DEFAULT '0',
  `id_komposisi` int(255) NOT NULL DEFAULT '0',
  `id_kualitas` int(255) NOT NULL DEFAULT '0',
  `id_motif` int(255) NOT NULL DEFAULT '0',
  `id_motif_barang` int(255) NOT NULL DEFAULT '0',
  `id_workorder` int(255) NOT NULL DEFAULT '0',
  `id_workorder_barang` int(255) NOT NULL DEFAULT '0',
  `id_label` int(255) NOT NULL DEFAULT '0',
  `id_cap` int(255) NOT NULL DEFAULT '0',
  `id_kemasan` int(255) NOT NULL DEFAULT '0',
  `id_kemasansatuan` int(255) NOT NULL DEFAULT '0',
  `id_kemasansepuluh` int(255) NOT NULL DEFAULT '0',
  `id_kemasanseratus` int(255) NOT NULL DEFAULT '0',
  `id_kualitas_proses` int(255) NOT NULL DEFAULT '0',
  `id_kualitas_periksa` int(255) NOT NULL DEFAULT '0',
  `id_kualitas_dudul` int(255) NOT NULL DEFAULT '0',
  `tanggal` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `keterangan` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_invsaldoawal` (`id_barang`,`id_gudang`,`id_proses`,`id_satuan`,`id_perubahansatuan`,`id_komposisi`,`id_motif`,`id_motif_barang`,`id_workorder`,`id_workorder_barang`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_saldoawal: ~0 rows (lebih kurang)
DELETE FROM `inv_saldoawal`;
/*!40000 ALTER TABLE `inv_saldoawal` DISABLE KEYS */;
/*!40000 ALTER TABLE `inv_saldoawal` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.inv_transfergudang
CREATE TABLE IF NOT EXISTS `inv_transfergudang` (
  `id_transfergudang` int(100) NOT NULL AUTO_INCREMENT,
  `gudang_awal` int(100) NOT NULL,
  `gudang_tujuan` int(100) NOT NULL,
  `tanggal` date NOT NULL,
  `tanggal_keluar` datetime NOT NULL,
  `tanggal_masuk` datetime NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `status` int(100) NOT NULL DEFAULT '0',
  `is_cv` int(11) NOT NULL,
  `no_faktur` char(4) NOT NULL,
  `faktur` varchar(50) NOT NULL,
  `tanggal_minta` date NOT NULL,
  `nomor_minta` varchar(50) NOT NULL,
  `id_user` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_transfergudang`) USING BTREE,
  KEY `index_invtransfergudang` (`gudang_awal`,`gudang_tujuan`,`id_user`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_transfergudang: ~0 rows (lebih kurang)
DELETE FROM `inv_transfergudang`;
/*!40000 ALTER TABLE `inv_transfergudang` DISABLE KEYS */;
/*!40000 ALTER TABLE `inv_transfergudang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.inv_transfergudang_barang
CREATE TABLE IF NOT EXISTS `inv_transfergudang_barang` (
  `id_transfergudang_detail` int(100) NOT NULL AUTO_INCREMENT,
  `kode_transfergudang` int(100) NOT NULL,
  `kode_barang` varchar(1000) NOT NULL,
  `nama_barang` varchar(100) NOT NULL,
  `jumlah` char(12) NOT NULL,
  `id_gudang` int(11) NOT NULL,
  `id_satuan` int(11) NOT NULL,
  `id_proses` int(11) NOT NULL,
  `id_komposisi` int(11) NOT NULL,
  `id_motif` int(11) NOT NULL,
  `id_motif_barang` int(11) NOT NULL,
  `id_label` int(11) NOT NULL,
  `id_kualitas` int(11) NOT NULL,
  `id_kualitas_dudul` int(11) NOT NULL,
  `id_kemasan` int(11) NOT NULL,
  `id_kemasansatuan` int(11) NOT NULL,
  `id_kemasansepuluh` int(11) NOT NULL,
  `id_kemasanseratus` int(11) NOT NULL,
  `id_workorder` int(11) NOT NULL,
  `id_workorder_barang` int(11) NOT NULL,
  `id_cap` int(11) NOT NULL,
  `id_kualitas_proses` int(11) NOT NULL,
  `id_kualitas_periksa` int(11) NOT NULL,
  `id_perubahansatuan` int(11) NOT NULL,
  `jumlah_rencana` double NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_transfergudang_detail`) USING BTREE,
  KEY `fk_transfer_id` (`kode_transfergudang`) USING BTREE,
  KEY `index_invtransfergudang_barang` (`kode_transfergudang`,`kode_barang`(767),`id_gudang`,`id_satuan`,`id_proses`,`id_komposisi`,`id_motif`,`id_motif_barang`,`id_workorder`,`id_workorder_barang`,`id_perubahansatuan`,`id_label`,`id_kualitas`,`id_kualitas_dudul`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.inv_transfergudang_barang: ~0 rows (lebih kurang)
DELETE FROM `inv_transfergudang_barang`;
/*!40000 ALTER TABLE `inv_transfergudang_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `inv_transfergudang_barang` ENABLE KEYS */;

-- membuang struktur untuk view si_sarung.jurnal_jurnal_lain
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_jurnal_lain` (
	`rows` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`keterangan` VARCHAR(6) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nominal` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(6) NULL COLLATE 'utf8mb4_general_ci',
	`lain` VARCHAR(6) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_kasbon
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_kasbon` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kd_rek_1` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`flag` VARCHAR(21) NOT NULL COLLATE 'utf8mb4_general_ci',
	`jenis_kasbon` BIGINT(20) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_kasbon_pegawai
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_kasbon_pegawai` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kd_rek_1` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NULL,
	`nomor_ref` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NULL,
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_orderservice
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_orderservice` (
	`rows` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kd_rek_1` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(100) NOT NULL,
	`nomor_ref` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_orderservice_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_orderservice_bayar` (
	`rows` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NULL,
	`keterangan` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_pembelian
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_pembelian` (
	`rows` BIGINT(20) NULL,
	`id_perkiraan` INT(100) NULL,
	`kd_rek_1` INT(100) NULL,
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(100) NOT NULL,
	`nomor_ref` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`nominal_pajak` DOUBLE NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`nominal_ongkir` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_pembelian_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_pembelian_bayar` (
	`rows` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NULL,
	`keterangan` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_penerimaan_pembayaran_kasbon
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_penerimaan_pembayaran_kasbon` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kd_rek_1` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(304) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`flag` VARCHAR(14) NOT NULL COLLATE 'utf8mb4_general_ci',
	`jenis_kasbon` BIGINT(20) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_penjualan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_penjualan` (
	`rows` BIGINT(20) NULL,
	`id_perkiraan` INT(100) NULL,
	`kd_rek_1` INT(100) NULL,
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(301) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(100) NOT NULL,
	`nomor_ref` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_pajak` DOUBLE NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`tipe_transaksi` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_penjualan_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_penjualan_bayar` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(301) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NULL,
	`keterangan` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_penjualan_retur
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_penjualan_retur` (
	`rows` BIGINT(20) NULL,
	`id_perkiraan` INT(100) NULL,
	`kd_rek_1` INT(100) NULL,
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(301) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` DOUBLE NULL,
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_pajak` DOUBLE NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`tipe_transaksi` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_penjualan_retur_nonfaktur
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_penjualan_retur_nonfaktur` (
	`rows` BIGINT(20) NULL,
	`id_perkiraan` INT(100) NULL,
	`kd_rek_1` INT(100) NULL,
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(301) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` BIGINT(20) NOT NULL,
	`nomor_ref` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` DOUBLE NULL,
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_pajak` DOUBLE NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`tipe_transaksi` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_penyesuaian_sewa
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_penyesuaian_sewa` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(25) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` BIGINT(20) NOT NULL,
	`kurs_jual` BIGINT(20) NOT NULL,
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk table si_sarung.jurnal_penyesuaian_sewa_detail
CREATE TABLE IF NOT EXISTS `jurnal_penyesuaian_sewa_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_jsh` int(11) NOT NULL,
  `id_akun` int(11) NOT NULL,
  `tipe_akun` enum('D','K') NOT NULL,
  `nominal` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id_jsh` (`id_jsh`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.jurnal_penyesuaian_sewa_detail: ~0 rows (lebih kurang)
DELETE FROM `jurnal_penyesuaian_sewa_detail`;
/*!40000 ALTER TABLE `jurnal_penyesuaian_sewa_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `jurnal_penyesuaian_sewa_detail` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.jurnal_penyesuaian_sewa_header
CREATE TABLE IF NOT EXISTS `jurnal_penyesuaian_sewa_header` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_sewa` int(11) NOT NULL,
  `user_id_create` int(11) NOT NULL,
  `user_id_update` int(11) NOT NULL,
  `nomor_jurnal` varchar(25) NOT NULL,
  `tanggal_jurnal` date NOT NULL,
  `keterangan` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `id_sewa` (`id_sewa`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.jurnal_penyesuaian_sewa_header: ~0 rows (lebih kurang)
DELETE FROM `jurnal_penyesuaian_sewa_header`;
/*!40000 ALTER TABLE `jurnal_penyesuaian_sewa_header` DISABLE KEYS */;
/*!40000 ALTER TABLE `jurnal_penyesuaian_sewa_header` ENABLE KEYS */;

-- membuang struktur untuk view si_sarung.jurnal_peny_piutang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_peny_piutang` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(301) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_perkiraan_saldo_awal
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_perkiraan_saldo_awal` (
	`ROWS` INT(0) NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`used` INT(100) NOT NULL,
	`id_ref` INT(100) NULL,
	`nomor_ref` VARCHAR(10) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NULL,
	`keterangan` VARCHAR(10) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`nominal` DOUBLE NOT NULL,
	`tipe_transaksi` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_piutangawal_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_piutangawal_bayar` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(301) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NULL,
	`keterangan` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`kurs_jual` BIGINT(20) NOT NULL,
	`nominal` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk table si_sarung.jurnal_piutang_detail
CREATE TABLE IF NOT EXISTS `jurnal_piutang_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_jph` int(11) NOT NULL,
  `id_akun` int(11) NOT NULL,
  `tipe_akun` enum('D','K') NOT NULL,
  `nominal` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.jurnal_piutang_detail: ~11 rows (lebih kurang)
DELETE FROM `jurnal_piutang_detail`;
/*!40000 ALTER TABLE `jurnal_piutang_detail` DISABLE KEYS */;
INSERT INTO `jurnal_piutang_detail` (`id`, `id_jph`, `id_akun`, `tipe_akun`, `nominal`) VALUES
	(15, 5, 172, 'D', '440000'),
	(17, 4, 144, 'D', '374400'),
	(18, 2, 172, 'D', '320000'),
	(19, 6, 172, 'D', '500000'),
	(24, 8, 143, 'D', '1200000'),
	(25, 8, 144, 'D', '250000'),
	(26, 3, 92, 'D', '4000000'),
	(27, 9, 92, 'D', '500000'),
	(29, 10, 144, 'D', '650000'),
	(30, 11, 146, 'D', '500000'),
	(31, 12, 144, 'D', '1200000');
/*!40000 ALTER TABLE `jurnal_piutang_detail` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.jurnal_piutang_header
CREATE TABLE IF NOT EXISTS `jurnal_piutang_header` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_penjualan` int(11) NOT NULL,
  `user_id_create` int(11) NOT NULL,
  `user_id_update` int(11) NOT NULL,
  `nomor_jurnal` varchar(50) DEFAULT NULL,
  `tanggal` date NOT NULL,
  `tanggal_jurnal` date NOT NULL,
  `keterangan` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.jurnal_piutang_header: ~10 rows (lebih kurang)
DELETE FROM `jurnal_piutang_header`;
/*!40000 ALTER TABLE `jurnal_piutang_header` DISABLE KEYS */;
INSERT INTO `jurnal_piutang_header` (`id`, `id_penjualan`, `user_id_create`, `user_id_update`, `nomor_jurnal`, `tanggal`, `tanggal_jurnal`, `keterangan`, `created_at`, `updated_at`) VALUES
	(2, 729, 5, 0, 'JPP2003001', '2020-03-16', '2020-03-16', '', '2020-03-23 11:57:58', '2020-03-23 11:57:58'),
	(3, 394, 5, 0, 'JPP2002001', '2020-03-18', '2020-02-17', '', '2020-03-23 11:57:48', '2020-03-23 11:57:48'),
	(4, 468, 1, 0, 'JPP2003002', '2020-03-26', '2020-03-26', '', '2020-03-26 11:38:04', '2020-03-26 11:38:04'),
	(5, 746, 1, 0, 'JPP2003003', '2020-03-26', '2020-03-18', '', '2020-03-26 11:51:40', '2020-03-26 11:51:40'),
	(6, 641, 5, 0, 'JPP2006001', '2020-08-27', '2020-06-19', '', '2020-08-27 11:34:49', '2020-08-27 11:34:49'),
	(8, 779, 5, 0, 'JPP2004001', '2020-08-27', '2020-04-09', '', '2020-08-27 12:24:57', '2020-08-27 12:24:57'),
	(9, 524, 5, 0, 'JPP2004002', '2020-08-29', '2020-04-21', '', '2020-08-29 11:39:16', '2020-08-29 11:39:16'),
	(10, 937, 5, 5, 'JPP2012001', '2020-12-30', '2020-07-01', '', '2020-12-30 09:54:32', '2020-12-30 09:54:32'),
	(11, 940, 5, 0, 'JPP2007001', '2020-12-30', '2020-07-14', '', '2020-12-30 10:00:05', '2020-12-30 10:00:05'),
	(12, 1098, 5, 0, 'JPP2008001', '2020-12-30', '2020-08-25', '', '2020-12-30 10:05:20', '2020-12-30 10:05:20');
/*!40000 ALTER TABLE `jurnal_piutang_header` ENABLE KEYS */;

-- membuang struktur untuk view si_sarung.jurnal_rtp
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_rtp` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` INT(100) NULL,
	`kd_rek_1` INT(100) NULL,
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(301) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_rtpa
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_rtpa` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` INT(100) NULL,
	`kd_rek_1` INT(100) NULL,
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(301) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_sales_contract_tagihan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_sales_contract_tagihan` (
	`rows` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_sewa
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_sewa` (
	`rows` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kd_rek_1` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`nominal` DOUBLE NOT NULL,
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_sewa_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_sewa_bayar` (
	`rows` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(201) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(53) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_sumber_dana
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_sumber_dana` (
	`rows` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` INT(100) NULL,
	`kd_rek_1` INT(100) NULL,
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`kode_perkiraan_dariakun` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan_dariakun` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`kode_perkiraan_keakun` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan_keakun` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_terima_pembayaran_kasbon_pegawai
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_terima_pembayaran_kasbon_pegawai` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kd_rek_1` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` VARCHAR(13) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nominal` VARCHAR(20) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`flag` VARCHAR(21) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_umum
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_umum` (
	`rows` VARCHAR(20) NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kd_rek_1` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(304) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` BIGINT(100) NULL,
	`nomor_ref` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NULL,
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keterangan_lain` VARCHAR(53) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_umum_1
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_umum_1` (
	`rows` BIGINT(20) NULL,
	`id_perkiraan` INT(100) NULL,
	`kd_rek_1` INT(100) NULL,
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(301) NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(100) NOT NULL,
	`nomor_ref` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan_lain` VARCHAR(16) NOT NULL COLLATE 'utf8mb4_unicode_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_upahproduksi
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_upahproduksi` (
	`rows` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(100) NOT NULL,
	`nomor_ref` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NULL,
	`keterangan` VARCHAR(153) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(53) NULL COLLATE 'utf8mb4_general_ci',
	`tipe_transaksi` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`flag` VARCHAR(7) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_upahproduksi_lainnya
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_upahproduksi_lainnya` (
	`rows` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` VARCHAR(153) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` DOUBLE NOT NULL,
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`flag` VARCHAR(7) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_upahtenun
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_upahtenun` (
	`rows` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(10) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NULL,
	`keterangan` VARCHAR(216) NULL COLLATE 'latin1_swedish_ci',
	`nominal` DOUBLE NOT NULL,
	`tipe_transaksi` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.jurnal_upah_harian
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `jurnal_upah_harian` (
	`rows` BIGINT(20) NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(201) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NOT NULL,
	`tanggal` DATE NOT NULL,
	`keterangan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nominal` DOUBLE NOT NULL,
	`tipe_transaksi` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk table si_sarung.keu_bop
CREATE TABLE IF NOT EXISTS `keu_bop` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tahun` int(4) NOT NULL DEFAULT '2018',
  `nomor_bop` varchar(50) NOT NULL DEFAULT '-',
  `tanggal_bop` date NOT NULL,
  `bulan_bop` int(11) NOT NULL DEFAULT '1',
  `id_akun` int(11) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(65) NOT NULL DEFAULT 'kredit',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `index_id` (`id`) USING BTREE,
  KEY `index_keubop` (`id_akun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_bop: ~0 rows (lebih kurang)
DELETE FROM `keu_bop`;
/*!40000 ALTER TABLE `keu_bop` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_bop` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_bop_detail
CREATE TABLE IF NOT EXISTS `keu_bop_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bop` int(11) NOT NULL,
  `id_akun` int(11) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `nominal` varchar(65) NOT NULL DEFAULT '0',
  `nominal_realisasi` varchar(65) NOT NULL DEFAULT '0',
  `tipe_id_akun_realisasi` varchar(65) NOT NULL DEFAULT 'debet',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `id_keu_sumber_dana` (`id_bop`) USING BTREE,
  KEY `index_keubop_detail` (`id_bop`,`id_akun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_bop_detail: ~0 rows (lebih kurang)
DELETE FROM `keu_bop_detail`;
/*!40000 ALTER TABLE `keu_bop_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_bop_detail` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_hutang
CREATE TABLE IF NOT EXISTS `keu_hutang` (
  `id_hutang` int(100) NOT NULL AUTO_INCREMENT,
  `no_faktur` varchar(100) NOT NULL,
  `tanggal` date NOT NULL,
  `tanggal_faktur` date NOT NULL,
  `id_penyedia` int(100) NOT NULL,
  `id_transaksi` int(100) NOT NULL,
  `nominal_potongan` decimal(11,0) NOT NULL DEFAULT '0',
  `pajak` int(1) NOT NULL DEFAULT '0' COMMENT '1=iya,0=tidak',
  `nominal_pajak` decimal(11,0) DEFAULT NULL,
  `nominal_ongkir` decimal(11,0) NOT NULL,
  `nominal_netto` decimal(11,0) NOT NULL,
  `nominal_total` decimal(11,0) NOT NULL,
  `id_carabayar` int(100) NOT NULL,
  `nominal_bayar` decimal(11,2) NOT NULL DEFAULT '0.00',
  `status` varchar(5) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `id_akun_potongan` int(11) DEFAULT '40',
  `tipe_id_akun_potongan` varchar(10) DEFAULT 'kredit',
  `id_akun_ongkir` int(11) DEFAULT '4',
  `tipe_id_akun_ongkir` varchar(10) DEFAULT 'debet',
  `id_akun_pajak` int(11) DEFAULT '41',
  `tipe_id_akun_pajak` varchar(10) DEFAULT 'debet',
  `id_akun_utang` int(11) DEFAULT '41',
  `tipe_id_akun_utang` varchar(10) DEFAULT 'debet',
  `id_akun_carabayar` int(11) DEFAULT NULL,
  `tipe_akun_carabayar` varchar(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_hutang`) USING BTREE,
  KEY `index_keuhutang` (`id_penyedia`,`id_transaksi`,`id_carabayar`,`id_akun_potongan`,`id_akun_ongkir`,`id_akun_pajak`,`id_akun_utang`,`id_akun_carabayar`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_hutang: ~0 rows (lebih kurang)
DELETE FROM `keu_hutang`;
/*!40000 ALTER TABLE `keu_hutang` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_hutang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_hutang_bayar
CREATE TABLE IF NOT EXISTS `keu_hutang_bayar` (
  `id_hutangbayar` int(11) NOT NULL AUTO_INCREMENT,
  `id_hutang` int(11) NOT NULL DEFAULT '0',
  `id_carabayar` int(11) DEFAULT NULL,
  `id_akun` int(11) DEFAULT NULL,
  `tgl_bayar` date NOT NULL,
  `jum_bayar` varchar(50) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_hutangbayar`) USING BTREE,
  KEY `fk_beli` (`id_hutang`) USING BTREE,
  KEY `index_keuhutang_bayar` (`id_hutang`,`id_carabayar`,`id_akun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_hutang_bayar: ~0 rows (lebih kurang)
DELETE FROM `keu_hutang_bayar`;
/*!40000 ALTER TABLE `keu_hutang_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_hutang_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_jurnal_lain
CREATE TABLE IF NOT EXISTS `keu_jurnal_lain` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tahun` int(4) NOT NULL DEFAULT '2018',
  `nomor_jurnal` varchar(50) NOT NULL DEFAULT '-',
  `tanggal_jurnal` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `index_id` (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_jurnal_lain: ~0 rows (lebih kurang)
DELETE FROM `keu_jurnal_lain`;
/*!40000 ALTER TABLE `keu_jurnal_lain` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_jurnal_lain` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_jurnal_lain_detail
CREATE TABLE IF NOT EXISTS `keu_jurnal_lain_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_jurnal_lain` int(11) NOT NULL,
  `id_akun` int(11) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `debet` varchar(65) NOT NULL DEFAULT '0',
  `kredit` varchar(65) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `id_keu_sumber_dana` (`id_jurnal_lain`) USING BTREE,
  KEY `index_keujurnallaindetail` (`id_jurnal_lain`,`id_akun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_jurnal_lain_detail: ~0 rows (lebih kurang)
DELETE FROM `keu_jurnal_lain_detail`;
/*!40000 ALTER TABLE `keu_jurnal_lain_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_jurnal_lain_detail` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_kasbon_pegawai
CREATE TABLE IF NOT EXISTS `keu_kasbon_pegawai` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL,
  `user_id_update` int(11) NOT NULL,
  `id_pegawai` int(11) NOT NULL,
  `nomor_transaksi` varchar(255) NOT NULL DEFAULT '0',
  `tanggal_transaksi` date NOT NULL,
  `dari_akun` int(11) NOT NULL,
  `tipe_dari_akun` varchar(10) NOT NULL DEFAULT 'K',
  `nominal` varchar(255) NOT NULL DEFAULT '0',
  `keterangan` varchar(255) NOT NULL DEFAULT '-',
  `tipe_id_akun_piutang` varchar(10) NOT NULL DEFAULT 'D',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_keukasbonpegawai` (`lokasi`,`user_id_create`,`user_id_update`,`id_pegawai`,`tipe_id_akun_piutang`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_kasbon_pegawai: ~0 rows (lebih kurang)
DELETE FROM `keu_kasbon_pegawai`;
/*!40000 ALTER TABLE `keu_kasbon_pegawai` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_kasbon_pegawai` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_kasbon_pegawai_bayar
CREATE TABLE IF NOT EXISTS `keu_kasbon_pegawai_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_transaksi_bayar` int(11) NOT NULL,
  `id_kasbon_pegawai` int(11) NOT NULL DEFAULT '0',
  `id_akun` int(11) DEFAULT NULL,
  `tgl_bayar` date NOT NULL,
  `jum_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(255) DEFAULT 'D',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_kasbon` (`id_kasbon_pegawai`) USING BTREE,
  KEY `fk_transaksi_kasbon` (`id_transaksi_bayar`) USING BTREE,
  KEY `index_keukasbonpegawai_bayar` (`id_transaksi_bayar`,`id_kasbon_pegawai`,`id_akun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_kasbon_pegawai_bayar: ~0 rows (lebih kurang)
DELETE FROM `keu_kasbon_pegawai_bayar`;
/*!40000 ALTER TABLE `keu_kasbon_pegawai_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_kasbon_pegawai_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_kasbon_pegawai_transaksi_bayar
CREATE TABLE IF NOT EXISTS `keu_kasbon_pegawai_transaksi_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `no_transaksi_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tanggal_bayar` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_keukasbonpegtrans_bayar` (`lokasi`,`user_id_create`,`user_id_update`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_kasbon_pegawai_transaksi_bayar: ~0 rows (lebih kurang)
DELETE FROM `keu_kasbon_pegawai_transaksi_bayar`;
/*!40000 ALTER TABLE `keu_kasbon_pegawai_transaksi_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_kasbon_pegawai_transaksi_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_kasbon_rekanan
CREATE TABLE IF NOT EXISTS `keu_kasbon_rekanan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL,
  `user_id_update` int(11) NOT NULL,
  `id_kelompok` int(11) NOT NULL DEFAULT '0',
  `id_rekanan` int(11) NOT NULL,
  `nomor_transaksi` varchar(255) NOT NULL DEFAULT '0',
  `tanggal_transaksi` date NOT NULL,
  `dari_akun` int(11) NOT NULL,
  `tipe_dari_akun` varchar(10) NOT NULL DEFAULT 'K',
  `nominal` varchar(255) NOT NULL DEFAULT '0',
  `keterangan` varchar(255) NOT NULL DEFAULT '-',
  `tipe_id_akun_piutang` varchar(10) NOT NULL DEFAULT 'D',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_kasbon_rekanan: ~0 rows (lebih kurang)
DELETE FROM `keu_kasbon_rekanan`;
/*!40000 ALTER TABLE `keu_kasbon_rekanan` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_kasbon_rekanan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_kasbon_rekanan_bayar
CREATE TABLE IF NOT EXISTS `keu_kasbon_rekanan_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_transaksi_bayar` int(11) NOT NULL,
  `id_kasbon_rekanan` int(11) NOT NULL DEFAULT '0',
  `id_akun` int(11) DEFAULT NULL,
  `tgl_bayar` date NOT NULL,
  `jum_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(255) DEFAULT 'D',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_kasbon_r` (`id_kasbon_rekanan`) USING BTREE,
  KEY `fk_transaksi_kasbon_r` (`id_transaksi_bayar`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_kasbon_rekanan_bayar: ~0 rows (lebih kurang)
DELETE FROM `keu_kasbon_rekanan_bayar`;
/*!40000 ALTER TABLE `keu_kasbon_rekanan_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_kasbon_rekanan_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_kasbon_rekanan_transaksi_bayar
CREATE TABLE IF NOT EXISTS `keu_kasbon_rekanan_transaksi_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `no_transaksi_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tanggal_bayar` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_kasbon_rekanan_transaksi_bayar: ~0 rows (lebih kurang)
DELETE FROM `keu_kasbon_rekanan_transaksi_bayar`;
/*!40000 ALTER TABLE `keu_kasbon_rekanan_transaksi_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_kasbon_rekanan_transaksi_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_sales_contract
CREATE TABLE IF NOT EXISTS `keu_sales_contract` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `cv` int(11) NOT NULL DEFAULT '1',
  `no_kontrak` varchar(255) NOT NULL,
  `tanggal` date NOT NULL,
  `tanggal_kontrak` date NOT NULL,
  `id_rekanan` int(100) NOT NULL,
  `status` varchar(5) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `syarat_bayar` varchar(255) DEFAULT NULL,
  `tanggal_kirim` date DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_keusalescontract` (`lokasi`,`user_id_create`,`user_id_update`,`id_rekanan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_sales_contract: ~0 rows (lebih kurang)
DELETE FROM `keu_sales_contract`;
/*!40000 ALTER TABLE `keu_sales_contract` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_sales_contract` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_sales_contract_detail
CREATE TABLE IF NOT EXISTS `keu_sales_contract_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_sales_contract` int(11) NOT NULL,
  `id_warna_komposisi` int(11) NOT NULL DEFAULT '0',
  `id_barang` int(11) NOT NULL,
  `jumlah` varchar(255) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `harga_satuan` varchar(255) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `termasuk_pajak` int(11) NOT NULL DEFAULT '0',
  `pajak` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `fk_id_sales_contract` (`id_sales_contract`),
  CONSTRAINT `fk_id_sales_contract` FOREIGN KEY (`id_sales_contract`) REFERENCES `keu_sales_contract` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_sales_contract_detail: ~0 rows (lebih kurang)
DELETE FROM `keu_sales_contract_detail`;
/*!40000 ALTER TABLE `keu_sales_contract_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_sales_contract_detail` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_sales_contract_tagihan
CREATE TABLE IF NOT EXISTS `keu_sales_contract_tagihan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tahun` int(4) NOT NULL DEFAULT '2018',
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `cv` int(11) DEFAULT NULL,
  `id_rekanan` int(11) DEFAULT NULL,
  `nomor_tagihan` varchar(50) NOT NULL DEFAULT '-',
  `tanggal` date DEFAULT NULL,
  `tanggal_tagihan` date NOT NULL,
  `id_sales_contract` int(11) NOT NULL DEFAULT '0',
  `id_barangmasuk` varchar(255) DEFAULT '',
  `nomor_transaksi` varchar(255) DEFAULT NULL,
  `dari_akun` int(11) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(65) DEFAULT 'K',
  `bayar_nanti` int(11) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `keterangan` text,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `index_id` (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_sales_contract_tagihan: ~0 rows (lebih kurang)
DELETE FROM `keu_sales_contract_tagihan`;
/*!40000 ALTER TABLE `keu_sales_contract_tagihan` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_sales_contract_tagihan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_sales_contract_tagihan_detail
CREATE TABLE IF NOT EXISTS `keu_sales_contract_tagihan_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_sales_contract_tagihan` int(11) NOT NULL,
  `ke_akun` int(11) NOT NULL DEFAULT '0',
  `nominal_transaksi` varchar(65) NOT NULL DEFAULT '0.00',
  `keterangan` text NOT NULL,
  `tipe_id_akun` varchar(65) DEFAULT 'D',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `id_keu_sumber_dana` (`id_sales_contract_tagihan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_sales_contract_tagihan_detail: ~0 rows (lebih kurang)
DELETE FROM `keu_sales_contract_tagihan_detail`;
/*!40000 ALTER TABLE `keu_sales_contract_tagihan_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_sales_contract_tagihan_detail` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_sumber_dana
CREATE TABLE IF NOT EXISTS `keu_sumber_dana` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tahun` int(4) NOT NULL DEFAULT '2018',
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `nomor_transaksi` varchar(50) NOT NULL DEFAULT '-',
  `tanggal_transaksi` date NOT NULL,
  `jenis_transaksi` int(11) NOT NULL DEFAULT '0',
  `dari_akun` int(11) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(65) DEFAULT 'K',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `penerima_transaksi` varchar(255) DEFAULT '-',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `index_id` (`id`) USING BTREE,
  KEY `index_keusumberdana` (`lokasi`,`user_id_create`,`user_id_update`,`dari_akun`,`tipe_id_akun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_sumber_dana: ~0 rows (lebih kurang)
DELETE FROM `keu_sumber_dana`;
/*!40000 ALTER TABLE `keu_sumber_dana` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_sumber_dana` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.keu_sumber_dana_detail
CREATE TABLE IF NOT EXISTS `keu_sumber_dana_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_keu_sumber_dana` int(11) NOT NULL,
  `ke_akun` int(11) NOT NULL DEFAULT '0',
  `nominal_transaksi` varchar(65) NOT NULL DEFAULT '0.00',
  `keterangan` text NOT NULL,
  `tipe_id_akun` varchar(65) DEFAULT 'D',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `id_keu_sumber_dana` (`id_keu_sumber_dana`) USING BTREE,
  KEY `index_keusumberdana_det` (`id_keu_sumber_dana`,`ke_akun`,`tipe_id_akun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.keu_sumber_dana_detail: ~0 rows (lebih kurang)
DELETE FROM `keu_sumber_dana_detail`;
/*!40000 ALTER TABLE `keu_sumber_dana_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `keu_sumber_dana_detail` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_akun
CREATE TABLE IF NOT EXISTS `ms_akun` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `kode_akun` char(12) NOT NULL,
  `nama_akun` varchar(100) NOT NULL,
  `sort_akun` int(11) NOT NULL,
  `parent_akun` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_akun: ~3 rows (lebih kurang)
DELETE FROM `ms_akun`;
/*!40000 ALTER TABLE `ms_akun` DISABLE KEYS */;
INSERT INTO `ms_akun` (`id`, `kode_akun`, `nama_akun`, `sort_akun`, `parent_akun`) VALUES
	(1, '1000', 'Aset', 1, 0),
	(2, '2000', 'Bank', 2, 0),
	(3, '1001', 'Aset Bank', 1, 1);
/*!40000 ALTER TABLE `ms_akun` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_barang
CREATE TABLE IF NOT EXISTS `ms_barang` (
  `id` int(50) NOT NULL AUTO_INCREMENT,
  `id_kb` int(11) NOT NULL,
  `id_warna` varchar(50) DEFAULT NULL,
  `kode_barang` varchar(100) NOT NULL,
  `nama_barang` varchar(100) NOT NULL,
  `ukuran_barang` varchar(100) DEFAULT '',
  `id_satuan` int(11) NOT NULL,
  `ket_barang` text NOT NULL,
  `min_stok` float NOT NULL DEFAULT '0',
  `id_akun_pembelian` int(11) NOT NULL DEFAULT '0',
  `id_akun_penjualan` int(11) NOT NULL DEFAULT '0',
  `id_akun` int(11) NOT NULL DEFAULT '0',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_msbarang` (`id_kb`,`id_warna`,`id_satuan`,`id_akun_pembelian`,`id_akun_penjualan`,`id_akun`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_barang: ~0 rows (lebih kurang)
DELETE FROM `ms_barang`;
/*!40000 ALTER TABLE `ms_barang` DISABLE KEYS */;
INSERT INTO `ms_barang` (`id`, `id_kb`, `id_warna`, `kode_barang`, `nama_barang`, `ukuran_barang`, `id_satuan`, `ket_barang`, `min_stok`, `id_akun_pembelian`, `id_akun_penjualan`, `id_akun`, `create_at`, `update_at`) VALUES
	(1, 2, '', '', 'Warna Agung Biru ', '', 125, '', 0, 134, 89, 25, '2021-01-01 09:46:32', '2021-01-01 09:46:32');
/*!40000 ALTER TABLE `ms_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_carabayar
CREATE TABLE IF NOT EXISTS `ms_carabayar` (
  `id_carabayar` int(100) NOT NULL AUTO_INCREMENT,
  `jenis_bayar` int(5) NOT NULL DEFAULT '0' COMMENT '0=>none, 1=>tunai, 2=>kredit, 3=>uang muka',
  `cara` varchar(100) NOT NULL,
  `kode_perkiraan` varchar(100) NOT NULL,
  `tipe` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_carabayar`) USING BTREE,
  KEY `index_mscarabayar` (`jenis_bayar`,`kode_perkiraan`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_carabayar: ~6 rows (lebih kurang)
DELETE FROM `ms_carabayar`;
/*!40000 ALTER TABLE `ms_carabayar` DISABLE KEYS */;
INSERT INTO `ms_carabayar` (`id_carabayar`, `jenis_bayar`, `cara`, `kode_perkiraan`, `tipe`, `created_at`, `updated_at`) VALUES
	(15, 1, 'Pembelian Tunai', '0', 'D', '2018-10-03 01:43:00', '2018-10-03 01:43:00'),
	(16, 1, 'Pembayaran Tunai', '0', 'K', '2018-10-03 03:34:55', '2018-10-03 03:34:55'),
	(17, 2, 'Pembelian Kredit', '58', 'K', '2018-10-03 03:49:43', '2018-10-03 03:49:43'),
	(20, 2, 'Penjualan Kredit', '21', 'D', '2018-10-03 05:09:23', '2018-10-03 05:09:23'),
	(21, 3, 'Pembayaran Uang Muka', '0', 'K', '2018-11-13 04:48:28', '2018-11-13 04:48:28'),
	(22, 3, 'Penerimaan Uang Muka', '0', 'D', '2018-11-13 04:48:51', '2018-11-13 04:48:51');
/*!40000 ALTER TABLE `ms_carabayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_departement
CREATE TABLE IF NOT EXISTS `ms_departement` (
  `id_departement` int(100) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `id_lokasi` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id_departement`) USING BTREE,
  KEY `index_msdepartement` (`id_lokasi`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_departement: ~1 rows (lebih kurang)
DELETE FROM `ms_departement`;
/*!40000 ALTER TABLE `ms_departement` DISABLE KEYS */;
INSERT INTO `ms_departement` (`id_departement`, `nama`, `id_lokasi`) VALUES
	(1, 'Operator', 1);
/*!40000 ALTER TABLE `ms_departement` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_gudang
CREATE TABLE IF NOT EXISTS `ms_gudang` (
  `id_gudang` int(11) NOT NULL AUTO_INCREMENT,
  `nama_gudang` varchar(100) DEFAULT '',
  `alamat` text,
  `keterangan` text NOT NULL,
  `id_lokasi` int(11) NOT NULL,
  PRIMARY KEY (`id_gudang`) USING BTREE,
  KEY `index_msgudang` (`id_lokasi`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_gudang: ~2 rows (lebih kurang)
DELETE FROM `ms_gudang`;
/*!40000 ALTER TABLE `ms_gudang` DISABLE KEYS */;
INSERT INTO `ms_gudang` (`id_gudang`, `nama_gudang`, `alamat`, `keterangan`, `id_lokasi`) VALUES
	(4, 'Gudang Bahan Baku', '-', 'Gudang Utama', 1),
	(5, 'Gudang Logistik', '-', '-', 1);
/*!40000 ALTER TABLE `ms_gudang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_hargabarang
CREATE TABLE IF NOT EXISTS `ms_hargabarang` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_lokasi` int(11) NOT NULL DEFAULT '1',
  `tanggal` date NOT NULL DEFAULT '0000-00-00',
  `id_barang` int(11) DEFAULT '0',
  `id_proses` int(11) DEFAULT '0',
  `id_corak` int(11) DEFAULT '0',
  `id_motif` int(11) DEFAULT '0',
  `id_warna` int(11) DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `harga` varchar(50) NOT NULL DEFAULT '0',
  `jenis` char(2) NOT NULL DEFAULT '0' COMMENT '0 -> barang di gudang 1 -> barang dalam proses',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_mshargabarang` (`id_lokasi`,`id_barang`,`id_proses`,`id_corak`,`id_motif`,`id_warna`,`id_satuan`,`jenis`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_hargabarang: 0 rows
DELETE FROM `ms_hargabarang`;
/*!40000 ALTER TABLE `ms_hargabarang` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_hargabarang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_kabupaten
CREATE TABLE IF NOT EXISTS `ms_kabupaten` (
  `id_kabupaten` int(11) NOT NULL AUTO_INCREMENT,
  `id_provinsi` int(11) DEFAULT '0',
  `nama` varchar(200) DEFAULT '0',
  PRIMARY KEY (`id_kabupaten`) USING BTREE,
  KEY `index_mskabupaten` (`id_provinsi`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3675 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_kabupaten: ~119 rows (lebih kurang)
DELETE FROM `ms_kabupaten`;
/*!40000 ALTER TABLE `ms_kabupaten` DISABLE KEYS */;
INSERT INTO `ms_kabupaten` (`id_kabupaten`, `id_provinsi`, `nama`) VALUES
	(3101, 31, 'KABUPATEN KEPULAUAN SERIBU'),
	(3171, 31, 'KOTA JAKARTA SELATAN'),
	(3172, 31, 'KOTA JAKARTA TIMUR'),
	(3173, 31, 'KOTA JAKARTA PUSAT'),
	(3174, 31, 'KOTA JAKARTA BARAT'),
	(3175, 31, 'KOTA JAKARTA UTARA'),
	(3201, 32, 'KABUPATEN BOGOR'),
	(3202, 32, 'KABUPATEN SUKABUMI'),
	(3203, 32, 'KABUPATEN CIANJUR'),
	(3204, 32, 'KABUPATEN BANDUNG'),
	(3205, 32, 'KABUPATEN GARUT'),
	(3206, 32, 'KABUPATEN TASIKMALAYA'),
	(3207, 32, 'KABUPATEN CIAMIS'),
	(3208, 32, 'KABUPATEN KUNINGAN'),
	(3209, 32, 'KABUPATEN CIREBON'),
	(3210, 32, 'KABUPATEN MAJALENGKA'),
	(3211, 32, 'KABUPATEN SUMEDANG'),
	(3212, 32, 'KABUPATEN INDRAMAYU'),
	(3213, 32, 'KABUPATEN SUBANG'),
	(3214, 32, 'KABUPATEN PURWAKARTA'),
	(3215, 32, 'KABUPATEN KARAWANG'),
	(3216, 32, 'KABUPATEN BEKASI'),
	(3217, 32, 'KABUPATEN BANDUNG BARAT'),
	(3218, 32, 'KABUPATEN PANGANDARAN'),
	(3271, 32, 'KOTA BOGOR'),
	(3272, 32, 'KOTA SUKABUMI'),
	(3273, 32, 'KOTA BANDUNG'),
	(3274, 32, 'KOTA CIREBON'),
	(3275, 32, 'KOTA BEKASI'),
	(3276, 32, 'KOTA DEPOK'),
	(3277, 32, 'KOTA CIMAHI'),
	(3278, 32, 'KOTA TASIKMALAYA'),
	(3279, 32, 'KOTA BANJAR'),
	(3301, 33, 'KABUPATEN CILACAP'),
	(3302, 33, 'KABUPATEN BANYUMAS'),
	(3303, 33, 'KABUPATEN PURBALINGGA'),
	(3304, 33, 'KABUPATEN BANJARNEGARA'),
	(3305, 33, 'KABUPATEN KEBUMEN'),
	(3306, 33, 'KABUPATEN PURWOREJO'),
	(3307, 33, 'KABUPATEN WONOSOBO'),
	(3308, 33, 'KABUPATEN MAGELANG'),
	(3309, 33, 'KABUPATEN BOYOLALI'),
	(3310, 33, 'KABUPATEN KLATEN'),
	(3311, 33, 'KABUPATEN SUKOHARJO'),
	(3312, 33, 'KABUPATEN WONOGIRI'),
	(3313, 33, 'KABUPATEN KARANGANYAR'),
	(3314, 33, 'KABUPATEN SRAGEN'),
	(3315, 33, 'KABUPATEN GROBOGAN'),
	(3316, 33, 'KABUPATEN BLORA'),
	(3317, 33, 'KABUPATEN REMBANG'),
	(3318, 33, 'KABUPATEN PATI'),
	(3319, 33, 'KABUPATEN KUDUS'),
	(3320, 33, 'KABUPATEN JEPARA'),
	(3321, 33, 'KABUPATEN DEMAK'),
	(3322, 33, 'KABUPATEN SEMARANG'),
	(3323, 33, 'KABUPATEN TEMANGGUNG'),
	(3324, 33, 'KABUPATEN KENDAL'),
	(3325, 33, 'KABUPATEN BATANG'),
	(3326, 33, 'KABUPATEN PEKALONGAN'),
	(3327, 33, 'KABUPATEN PEMALANG'),
	(3328, 33, 'KABUPATEN TEGAL'),
	(3329, 33, 'KABUPATEN BREBES'),
	(3371, 33, 'KOTA MAGELANG'),
	(3372, 33, 'KOTA SURAKARTA'),
	(3373, 33, 'KOTA SALATIGA'),
	(3374, 33, 'KOTA SEMARANG'),
	(3375, 33, 'KOTA PEKALONGAN'),
	(3376, 33, 'KOTA TEGAL'),
	(3401, 34, 'KABUPATEN KULON PROGO'),
	(3402, 34, 'KABUPATEN BANTUL'),
	(3403, 34, 'KABUPATEN GUNUNG KIDUL'),
	(3404, 34, 'KABUPATEN SLEMAN'),
	(3471, 34, 'KOTA YOGYAKARTA'),
	(3501, 35, 'KABUPATEN PACITAN'),
	(3502, 35, 'KABUPATEN PONOROGO'),
	(3503, 35, 'KABUPATEN TRENGGALEK'),
	(3504, 35, 'KABUPATEN TULUNGAGUNG'),
	(3505, 35, 'KABUPATEN BLITAR'),
	(3506, 35, 'KABUPATEN KEDIRI'),
	(3507, 35, 'KABUPATEN MALANG'),
	(3508, 35, 'KABUPATEN LUMAJANG'),
	(3509, 35, 'KABUPATEN JEMBER'),
	(3510, 35, 'KABUPATEN BANYUWANGI'),
	(3511, 35, 'KABUPATEN BONDOWOSO'),
	(3512, 35, 'KABUPATEN SITUBONDO'),
	(3513, 35, 'KABUPATEN PROBOLINGGO'),
	(3514, 35, 'KABUPATEN PASURUAN'),
	(3515, 35, 'KABUPATEN SIDOARJO'),
	(3516, 35, 'KABUPATEN MOJOKERTO'),
	(3517, 35, 'KABUPATEN JOMBANG'),
	(3518, 35, 'KABUPATEN NGANJUK'),
	(3519, 35, 'KABUPATEN MADIUN'),
	(3520, 35, 'KABUPATEN MAGETAN'),
	(3521, 35, 'KABUPATEN NGAWI'),
	(3522, 35, 'KABUPATEN BOJONEGORO'),
	(3523, 35, 'KABUPATEN TUBAN'),
	(3524, 35, 'KABUPATEN LAMONGAN'),
	(3525, 35, 'KABUPATEN GRESIK'),
	(3526, 35, 'KABUPATEN BANGKALAN'),
	(3527, 35, 'KABUPATEN SAMPANG'),
	(3528, 35, 'KABUPATEN PAMEKASAN'),
	(3529, 35, 'KABUPATEN SUMENEP'),
	(3571, 35, 'KOTA KEDIRI'),
	(3572, 35, 'KOTA BLITAR'),
	(3573, 35, 'KOTA MALANG'),
	(3574, 35, 'KOTA PROBOLINGGO'),
	(3575, 35, 'KOTA PASURUAN'),
	(3576, 35, 'KOTA MOJOKERTO'),
	(3577, 35, 'KOTA MADIUN'),
	(3578, 35, 'KOTA SURABAYA'),
	(3579, 35, 'KOTA BATU'),
	(3601, 36, 'KABUPATEN PANDEGLANG'),
	(3602, 36, 'KABUPATEN LEBAK'),
	(3603, 36, 'KABUPATEN TANGERANG'),
	(3604, 36, 'KABUPATEN SERANG'),
	(3671, 36, 'KOTA TANGERANG'),
	(3672, 36, 'KOTA CILEGON'),
	(3673, 36, 'KOTA SERANG'),
	(3674, 36, 'KOTA TANGERANG SELATAN');
/*!40000 ALTER TABLE `ms_kabupaten` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_kategori_barang
CREATE TABLE IF NOT EXISTS `ms_kategori_barang` (
  `id_kb` int(11) NOT NULL AUTO_INCREMENT,
  `id_kelompok` int(11) NOT NULL DEFAULT '1',
  `nama` varchar(200) NOT NULL DEFAULT '',
  `inisial` varchar(50) DEFAULT '',
  `induk_kb` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_kb`) USING BTREE,
  KEY `fk_idkelompok` (`id_kelompok`) USING BTREE,
  KEY `index_mskatbarang` (`id_kelompok`,`induk_kb`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_kategori_barang: ~0 rows (lebih kurang)
DELETE FROM `ms_kategori_barang`;
/*!40000 ALTER TABLE `ms_kategori_barang` DISABLE KEYS */;
INSERT INTO `ms_kategori_barang` (`id_kb`, `id_kelompok`, `nama`, `inisial`, `induk_kb`) VALUES
	(1, 1, 'CAT', '', 0),
	(2, 1, 'Kaleng', 'K', 1);
/*!40000 ALTER TABLE `ms_kategori_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_kelompok
CREATE TABLE IF NOT EXISTS `ms_kelompok` (
  `id_kelompok` int(11) NOT NULL AUTO_INCREMENT,
  `nama_kelompok` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_kelompok`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_kelompok: ~5 rows (lebih kurang)
DELETE FROM `ms_kelompok`;
/*!40000 ALTER TABLE `ms_kelompok` DISABLE KEYS */;
INSERT INTO `ms_kelompok` (`id_kelompok`, `nama_kelompok`, `created_at`, `updated_at`) VALUES
	(1, 'Bahan Baku', '2019-02-05 03:27:29', '2019-02-05 03:27:31'),
	(2, 'Barang Setengah Jadi', '2019-02-05 03:27:29', '2019-02-05 03:27:31'),
	(4, 'Barang Jadi', '2019-02-05 03:27:29', '2019-02-05 03:27:31'),
	(5, 'Bahan Pembantu', '2019-02-05 03:27:29', '2019-02-05 03:27:31'),
	(6, 'Aset', '2019-03-27 15:03:05', '2019-03-27 15:03:05');
/*!40000 ALTER TABLE `ms_kelompok` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_komposisi_produksi
CREATE TABLE IF NOT EXISTS `ms_komposisi_produksi` (
  `id_komposisi` int(11) NOT NULL AUTO_INCREMENT,
  `tanggal` date NOT NULL DEFAULT '0000-00-00',
  `id_lokasi` int(11) NOT NULL DEFAULT '0',
  `nama_komposisi` varchar(50) NOT NULL,
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `id_barang` int(11) NOT NULL DEFAULT '0',
  `id_motif` int(11) NOT NULL DEFAULT '0',
  `id_corak` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `jumlah` int(11) NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL DEFAULT '0',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_komposisi`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_komposisi_produksi: ~0 rows (lebih kurang)
DELETE FROM `ms_komposisi_produksi`;
/*!40000 ALTER TABLE `ms_komposisi_produksi` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_komposisi_produksi` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_komposisi_produksi_barang
CREATE TABLE IF NOT EXISTS `ms_komposisi_produksi_barang` (
  `id_` int(11) NOT NULL AUTO_INCREMENT,
  `id_komposisi` int(11) NOT NULL DEFAULT '0',
  `id_barang` int(11) NOT NULL DEFAULT '0',
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `id_gudang` int(11) NOT NULL DEFAULT '0',
  `jumlah` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `jumlah_hasil` int(11) NOT NULL DEFAULT '0',
  `id_satuanhasil` int(11) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_komposisi_produksi_barang: ~0 rows (lebih kurang)
DELETE FROM `ms_komposisi_produksi_barang`;
/*!40000 ALTER TABLE `ms_komposisi_produksi_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_komposisi_produksi_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_konversi
CREATE TABLE IF NOT EXISTS `ms_konversi` (
  `id_konversi` int(100) NOT NULL AUTO_INCREMENT,
  `kode` int(11) NOT NULL,
  `nama` varchar(100) DEFAULT NULL,
  `satuan_awal` int(11) NOT NULL,
  `satuan_akhir` int(11) NOT NULL,
  `nilai_awal` varchar(100) NOT NULL,
  `nilai_akhir` varchar(100) NOT NULL,
  PRIMARY KEY (`id_konversi`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_konversi: ~0 rows (lebih kurang)
DELETE FROM `ms_konversi`;
/*!40000 ALTER TABLE `ms_konversi` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_konversi` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_konversi_matauang
CREATE TABLE IF NOT EXISTS `ms_konversi_matauang` (
  `id_konversi_matauang` int(12) NOT NULL AUTO_INCREMENT,
  `nama_konversi` varchar(100) NOT NULL,
  `nama_matauang_awal` varchar(100) NOT NULL,
  `nilai_matauang_awal` int(12) NOT NULL,
  `nama_matauang_akhir` varchar(100) NOT NULL,
  `nilai_matauang_akhir` int(12) NOT NULL,
  PRIMARY KEY (`id_konversi_matauang`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_konversi_matauang: ~2 rows (lebih kurang)
DELETE FROM `ms_konversi_matauang`;
/*!40000 ALTER TABLE `ms_konversi_matauang` DISABLE KEYS */;
INSERT INTO `ms_konversi_matauang` (`id_konversi_matauang`, `nama_konversi`, `nama_matauang_awal`, `nilai_matauang_awal`, `nama_matauang_akhir`, `nilai_matauang_akhir`) VALUES
	(2, 'Rp to USD', '2', 15125, '1', 1),
	(3, 'USD to Rp', '1', 1, '2', 15000);
/*!40000 ALTER TABLE `ms_konversi_matauang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_kualitas
CREATE TABLE IF NOT EXISTS `ms_kualitas` (
  `id_kualitas` int(100) NOT NULL AUTO_INCREMENT,
  `nama_kualitas` varchar(100) NOT NULL,
  `jenis` int(11) NOT NULL DEFAULT '1' COMMENT '1 : Tenun, 2 : Produksi',
  `orderby` char(2) NOT NULL,
  PRIMARY KEY (`id_kualitas`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_kualitas: ~8 rows (lebih kurang)
DELETE FROM `ms_kualitas`;
/*!40000 ALTER TABLE `ms_kualitas` DISABLE KEYS */;
INSERT INTO `ms_kualitas` (`id_kualitas`, `nama_kualitas`, `jenis`, `orderby`) VALUES
	(1, 'Baik', 1, '1'),
	(3, 'D', 1, '2'),
	(4, 'N', 1, '3'),
	(5, 'BS', 1, '4'),
	(6, 'Baik', 2, '1'),
	(7, 'Jelek', 2, '2'),
	(8, 'Baik', 3, '1'),
	(9, 'Jelek', 3, '2');
/*!40000 ALTER TABLE `ms_kualitas` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_lokasi_produksi
CREATE TABLE IF NOT EXISTS `ms_lokasi_produksi` (
  `id_lokasi` int(11) NOT NULL AUTO_INCREMENT,
  `nama_lokasi` varchar(100) DEFAULT NULL,
  `alamat` text,
  `keterangan` text,
  PRIMARY KEY (`id_lokasi`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_lokasi_produksi: ~3 rows (lebih kurang)
DELETE FROM `ms_lokasi_produksi`;
/*!40000 ALTER TABLE `ms_lokasi_produksi` DISABLE KEYS */;
INSERT INTO `ms_lokasi_produksi` (`id_lokasi`, `nama_lokasi`, `alamat`, `keterangan`) VALUES
	(1, 'Surabaya', '-', '-'),
	(3, 'Solo', '-', '-');
/*!40000 ALTER TABLE `ms_lokasi_produksi` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_maping
CREATE TABLE IF NOT EXISTS `ms_maping` (
  `id_maping` int(100) NOT NULL AUTO_INCREMENT,
  `id_proses` int(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_maping`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_maping: ~3 rows (lebih kurang)
DELETE FROM `ms_maping`;
/*!40000 ALTER TABLE `ms_maping` DISABLE KEYS */;
INSERT INTO `ms_maping` (`id_maping`, `id_proses`, `created_at`, `update_at`) VALUES
	(1, 10, '2018-10-22 06:49:44', '2018-10-22 06:49:44'),
	(5, 10, '2018-10-23 04:11:02', '2018-10-23 04:11:02'),
	(6, 12, '2018-10-23 04:11:34', '2018-10-23 04:11:34');
/*!40000 ALTER TABLE `ms_maping` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_mapingtenun
CREATE TABLE IF NOT EXISTS `ms_mapingtenun` (
  `id_mapingupahtenun` int(255) NOT NULL AUTO_INCREMENT,
  `id_kelompok` int(255) DEFAULT NULL,
  `id_upahtenun` int(255) DEFAULT NULL,
  `id_pick` int(255) DEFAULT NULL,
  `tanggal` date DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_mapingupahtenun`),
  KEY `index_msmappingtenun` (`id_kelompok`,`id_upahtenun`,`id_pick`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_mapingtenun: ~0 rows (lebih kurang)
DELETE FROM `ms_mapingtenun`;
/*!40000 ALTER TABLE `ms_mapingtenun` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_mapingtenun` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_maping_barang
CREATE TABLE IF NOT EXISTS `ms_maping_barang` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `id_maping` int(100) NOT NULL,
  `id_barang` int(100) NOT NULL,
  `status` int(11) NOT NULL COMMENT '0 = Barang Keluar, 1 = Barang Masuk',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_maping_barang: ~7 rows (lebih kurang)
DELETE FROM `ms_maping_barang`;
/*!40000 ALTER TABLE `ms_maping_barang` DISABLE KEYS */;
INSERT INTO `ms_maping_barang` (`id`, `id_maping`, `id_barang`, `status`) VALUES
	(1, 1, 522, 0),
	(2, 1, 26, 1),
	(11, 5, 530, 0),
	(12, 6, 531, 0),
	(14, 6, 535, 0),
	(16, 6, 531, 1),
	(17, 6, 535, 1);
/*!40000 ALTER TABLE `ms_maping_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_matauang
CREATE TABLE IF NOT EXISTS `ms_matauang` (
  `id_matauang` int(100) NOT NULL AUTO_INCREMENT,
  `nama_matauang` varchar(100) NOT NULL,
  `inisial` varchar(11) NOT NULL,
  `simbol` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`id_matauang`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_matauang: ~2 rows (lebih kurang)
DELETE FROM `ms_matauang`;
/*!40000 ALTER TABLE `ms_matauang` DISABLE KEYS */;
INSERT INTO `ms_matauang` (`id_matauang`, `nama_matauang`, `inisial`, `simbol`) VALUES
	(1, 'Rupiah', 'IDR', 'Rp'),
	(2, 'Dollar (US)', 'USD', '$');
/*!40000 ALTER TABLE `ms_matauang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_mesin
CREATE TABLE IF NOT EXISTS `ms_mesin` (
  `id_mesin` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `id_lokasi` int(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_mesin`) USING BTREE,
  KEY `index_msmesin` (`id_lokasi`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_mesin: ~0 rows (lebih kurang)
DELETE FROM `ms_mesin`;
/*!40000 ALTER TABLE `ms_mesin` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_mesin` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_motif
CREATE TABLE IF NOT EXISTS `ms_motif` (
  `id_motif` int(100) NOT NULL AUTO_INCREMENT,
  `kode_motif` varchar(100) NOT NULL,
  `nama_motif` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_motif`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_motif: ~0 rows (lebih kurang)
DELETE FROM `ms_motif`;
/*!40000 ALTER TABLE `ms_motif` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_motif` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_motif_barang
CREATE TABLE IF NOT EXISTS `ms_motif_barang` (
  `id_motif_barang` int(100) NOT NULL AUTO_INCREMENT,
  `id_motif` int(100) NOT NULL,
  `motif_keterangan` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_motif_barang`) USING BTREE,
  KEY `fk_motifbarang` (`id_motif`) USING BTREE,
  KEY `index_msmotif_barang` (`id_motif`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_motif_barang: ~0 rows (lebih kurang)
DELETE FROM `ms_motif_barang`;
/*!40000 ALTER TABLE `ms_motif_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_motif_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_pegawai
CREATE TABLE IF NOT EXISTS `ms_pegawai` (
  `id_pegawai` int(100) NOT NULL AUTO_INCREMENT,
  `nomor_pegawai` varchar(255) NOT NULL DEFAULT '0',
  `id_departement` int(100) NOT NULL,
  `nama_pegawai` varchar(100) NOT NULL,
  `tahun_awal` date NOT NULL,
  `tahun_akhir` date NOT NULL,
  `status` int(12) NOT NULL,
  `id_akun_piutang` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_pegawai`) USING BTREE,
  KEY `index_mspegawai` (`id_departement`,`id_akun_piutang`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=272 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_pegawai: ~1 rows (lebih kurang)
DELETE FROM `ms_pegawai`;
/*!40000 ALTER TABLE `ms_pegawai` DISABLE KEYS */;
INSERT INTO `ms_pegawai` (`id_pegawai`, `nomor_pegawai`, `id_departement`, `nama_pegawai`, `tahun_awal`, `tahun_akhir`, `status`, `id_akun_piutang`, `created_at`, `updated_at`) VALUES
	(1, 'ID00039', 1, 'SARTIM', '2019-02-25', '2019-02-25', 1, 22, '2019-02-25 07:00:09', '2020-03-27 15:41:05');
/*!40000 ALTER TABLE `ms_pegawai` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_pegawai_riwayat
CREATE TABLE IF NOT EXISTS `ms_pegawai_riwayat` (
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `id_departement` int(12) NOT NULL,
  `id_pegawai` int(12) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_pegawai_riwayat: ~0 rows (lebih kurang)
DELETE FROM `ms_pegawai_riwayat`;
/*!40000 ALTER TABLE `ms_pegawai_riwayat` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_pegawai_riwayat` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_pelanggan
CREATE TABLE IF NOT EXISTS `ms_pelanggan` (
  `id_pelanggan` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(200) NOT NULL DEFAULT '0',
  `pic` varchar(100) NOT NULL,
  `npwp` varchar(200) DEFAULT '0',
  `email` varchar(200) DEFAULT '0',
  `telepon` varchar(200) DEFAULT '0',
  `no_rek` varchar(200) DEFAULT '0',
  `alamat` text,
  `status_pelanggan` char(50) NOT NULL DEFAULT '0' COMMENT '1. Agen / Distributor 2. Pelanggan Biasa',
  `id_kabupaten` varchar(100) NOT NULL,
  `id_akun_piutang` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_pelanggan`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_pelanggan: ~72 rows (lebih kurang)
DELETE FROM `ms_pelanggan`;
/*!40000 ALTER TABLE `ms_pelanggan` DISABLE KEYS */;
INSERT INTO `ms_pelanggan` (`id_pelanggan`, `nama`, `pic`, `npwp`, `email`, `telepon`, `no_rek`, `alamat`, `status_pelanggan`, `id_kabupaten`, `id_akun_piutang`, `created_at`, `updated_at`) VALUES
	(3, 'INTAN BAGADI', '', '', '', '', '', 'JL. HARUN RAYA NO. 26A\n', '1', 'JAKARTA BARAT', 257, '2019-03-06 10:41:44', '2020-08-26 10:38:20');
/*!40000 ALTER TABLE `ms_pelanggan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_penggunaan_produksi
CREATE TABLE IF NOT EXISTS `ms_penggunaan_produksi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_lokasi` int(11) NOT NULL DEFAULT '1',
  `tanggal` date DEFAULT NULL,
  `id_barang` int(11) NOT NULL DEFAULT '0',
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `id_motif` int(11) NOT NULL DEFAULT '0',
  `id_corak` int(11) NOT NULL DEFAULT '0',
  `id_warna` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `jumlah` int(11) NOT NULL DEFAULT '0',
  `id_barangkeluar` int(11) NOT NULL DEFAULT '0',
  `id_satuankeluar` int(11) NOT NULL DEFAULT '0',
  `id_gudangkeluar` int(11) NOT NULL DEFAULT '0',
  `jumlahkeluar` varchar(25) NOT NULL DEFAULT '0',
  `is_aktif` int(11) NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_penggunaan_produksi: ~0 rows (lebih kurang)
DELETE FROM `ms_penggunaan_produksi`;
/*!40000 ALTER TABLE `ms_penggunaan_produksi` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_penggunaan_produksi` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_penyedia
CREATE TABLE IF NOT EXISTS `ms_penyedia` (
  `id_penyedia` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) DEFAULT NULL,
  `pic` varchar(100) DEFAULT NULL,
  `alamat` text,
  `npwp` text,
  `email` text,
  `telepon` text,
  `no_rek` text,
  `id_kab` varchar(100) DEFAULT NULL,
  `id_akun_hutang` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_penyedia`) USING BTREE,
  KEY `index_mspenyedia` (`id_akun_hutang`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=385 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_penyedia: ~6 rows (lebih kurang)
DELETE FROM `ms_penyedia`;
/*!40000 ALTER TABLE `ms_penyedia` DISABLE KEYS */;
INSERT INTO `ms_penyedia` (`id_penyedia`, `nama`, `pic`, `alamat`, `npwp`, `email`, `telepon`, `no_rek`, `id_kab`, `id_akun_hutang`, `created_at`, `updated_at`) VALUES
	(2, 'CV. Aman Jaya', 'Ahmad Rofik', '', '', '', '', '', 'KABUPATEN KEPULAUAN SERIBU', 58, '2018-10-01 03:20:22', '2021-01-01 09:48:00'),
	(7, 'PT.PANCA BINTANG TUNGGAL SEJAHTERA', 'HANDONO', '-', '-', '-', '-', '-', 'KABUPATEN SUKOHARJO', 703, '2019-03-12 01:16:57', '2020-10-13 13:42:30'),
	(383, 'CENTRAL IT', '', 'JL. PAHLAWAN NO.52C', '', '', '', '', 'KABUPATEN GRESIK', 58, '2020-12-10 11:02:31', '2021-01-01 09:47:47'),
	(384, 'SSIL', 'SSIL', 'SUKOHARJO', '', '', '', 'BCA 0152944517', 'KABUPATEN SUKOHARJO', 60, '2020-12-17 12:00:52', '2020-12-17 12:00:52');
/*!40000 ALTER TABLE `ms_penyedia` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_perkiraan
CREATE TABLE IF NOT EXISTS `ms_perkiraan` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `kd_rek_1` int(100) NOT NULL DEFAULT '1',
  `kode_perkiraan` varchar(100) NOT NULL,
  `nama_perkiraan` varchar(100) NOT NULL,
  `level` int(12) NOT NULL,
  `saldo_normal` varchar(50) NOT NULL,
  `used` int(100) NOT NULL,
  `parent` varchar(100) DEFAULT '0',
  `locked` int(100) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_msperkiraan` (`parent`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1303 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_perkiraan: ~1.338 rows (lebih kurang)
DELETE FROM `ms_perkiraan`;
/*!40000 ALTER TABLE `ms_perkiraan` DISABLE KEYS */;
INSERT INTO `ms_perkiraan` (`id`, `kd_rek_1`, `kode_perkiraan`, `nama_perkiraan`, `level`, `saldo_normal`, `used`, `parent`, `locked`, `created_at`, `updated_at`) VALUES
	(1, 1, '10000', 'Aktiva', 1, 'D', 0, '0', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
	(2, 1, '11000', 'Aktiva Lancar', 2, 'D', 0, '1', 1, '0000-00-00 00:00:00', '2020-03-18 10:09:01'),
	(3, 1, '11100', 'Kas', 3, 'D', 0, '2', 1, '0000-00-00 00:00:00', '2020-03-18 10:09:35'),
	(4, 1, '11101', 'Kas ATBM', 4, 'D', 1, '3', 1, '0000-00-00 00:00:00', '2020-03-18 10:10:04'),
	(5, 1, '11102', 'Kas ATM Gresik', 4, 'D', 1, '3', 1, '0000-00-00 00:00:00', '2020-03-18 10:15:55'),
	(6, 1, '11103', 'Kas ATM Solo', 4, 'D', 1, '3', 1, '0000-00-00 00:00:00', '2020-03-18 10:16:02'),
	(7, 1, '11200', 'Bank', 3, 'D', 0, '2', 1, '0000-00-00 00:00:00', '2020-03-18 10:16:21'),
	(8, 1, '11201', 'BCA 790-093-1161 Munif Bahasuan', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:17:04'),
	(9, 1, '11202', 'BCA 150-081-7000 CV.Ketjubung', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:17:26'),
	(10, 1, '11203', 'BCA 150-086-5934 Thoriq Bahasuan', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:17:48'),
	(11, 1, '11204', 'BCA 150-086-5942 Tholib Bahasuan', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:18:15'),
	(12, 1, '11205', 'BCA 790-093-7924 Misman', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:18:31'),
	(13, 1, '11206', 'BCA 790-088-5321 Mahmud Bahasuan', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:21:22'),
	(14, 1, '11207', 'BCA USD 150-112-2331 CV.Ketjubung', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:21:59'),
	(15, 1, '11208', 'BRI 0026-01-001953-30-9 CV.Ketjubung', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:22:46'),
	(16, 1, '11209', 'BRI 0512-01-000331-30-1 Hafid Bahasuan', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:23:09'),
	(17, 1, '11210', 'BNI 043-336-6292 CV. Ketjubung', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:24:39'),
	(18, 1, '11211', 'Mandiri 140-00-1475329-8 Mahmud Bahasuan', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-03-18 10:24:57'),
	(19, 1, '11223', 'Wesel Tagih', 4, 'D', 1, '7', 1, '0000-00-00 00:00:00', '2020-12-21 13:21:30'),
	(20, 1, '11300', 'Piutang', 3, 'D', 0, '2', 1, '0000-00-00 00:00:00', '2020-03-18 10:34:17'),
	(21, 1, '11301', 'Piutang Usaha', 4, 'D', 0, '20', 1, '0000-00-00 00:00:00', '2020-03-31 08:07:47'),
	(22, 1, '11302', 'Piutang Karyawan', 4, 'D', 0, '20', 1, '0000-00-00 00:00:00', '2020-09-18 10:31:12'),
	(23, 1, '11304', 'Piutang Pihak Istimewa', 4, 'D', 0, '20', 1, '0000-00-00 00:00:00', '2020-03-18 10:37:49'),
	(24, 1, '11305', 'Piutang Lainnya', 4, 'D', 1, '20', 1, '0000-00-00 00:00:00', '2020-03-18 10:40:45'),
	(25, 1, '11400', 'Persediaan', 3, 'D', 0, '2', 1, '0000-00-00 00:00:00', '2020-03-18 10:41:23'),
	(26, 1, '11401', 'Persediaan Barang Jadi', 4, 'D', 0, '25', 1, '0000-00-00 00:00:00', '2020-03-31 08:46:03'),
	(27, 1, '11402', 'Persediaan Bahan Baku', 4, 'D', 0, '25', 1, '0000-00-00 00:00:00', '2020-04-02 08:57:48'),
	(28, 1, '11403', 'Persediaan Bahan Pembantu', 4, 'D', 0, '25', 1, '0000-00-00 00:00:00', '2020-04-02 09:11:54'),
	(29, 1, '11404', 'Persediaan Barang Dalam Proses', 4, 'D', 0, '25', 1, '0000-00-00 00:00:00', '2020-04-02 09:16:23'),
	(30, 1, '11405', 'Perlengkapan Kantor', 4, 'D', 1, '25', 1, '0000-00-00 00:00:00', '2020-03-23 14:04:05'),
	(31, 1, '11500', 'Uang Muka', 3, 'D', 0, '2', 1, '0000-00-00 00:00:00', '2020-03-23 14:05:10'),
	(32, 1, '11501', 'Sewa Dibayar Dimuka', 4, 'D', 1, '31', 1, '0000-00-00 00:00:00', '2020-03-23 14:05:53'),
	(33, 1, '11502', 'Asuransi Dibayar Dimuka', 4, 'D', 1, '31', 1, '0000-00-00 00:00:00', '2020-03-23 14:06:12'),
	(34, 1, '11503', 'Pajak Dibayar Dimuka', 4, 'D', 1, '31', 1, '0000-00-00 00:00:00', '2020-03-23 14:06:21'),
	(35, 1, '11505', 'Uang Muka Pembelian', 4, 'D', 1, '31', 1, '0000-00-00 00:00:00', '2020-03-23 14:09:24'),
	(36, 1, '11506', 'Uang Muka Bangunan', 4, 'D', 1, '31', 1, '0000-00-00 00:00:00', '2020-03-23 14:09:15'),
	(37, 1, '11507', 'Uang Muka Lain-Lain', 4, 'D', 1, '31', 1, '0000-00-00 00:00:00', '2020-03-23 14:09:07'),
	(39, 1, '12000', 'Aktiva Tetap', 2, 'D', 0, '1', 1, '0000-00-00 00:00:00', '2020-03-23 14:11:11'),
	(40, 1, '12001', 'Tanah', 3, 'D', 0, '39', 1, '0000-00-00 00:00:00', '2020-04-04 11:59:45'),
	(41, 1, '12002', 'Gedung', 3, 'D', 0, '39', 1, '0000-00-00 00:00:00', '2020-04-04 12:03:21'),
	(42, 1, '15001', 'Akumulasi Penyusutan Gedung', 3, 'K', 0, '39', 1, '0000-00-00 00:00:00', '2020-04-04 12:06:07'),
	(43, 1, '12003', 'Mesin', 3, 'D', 0, '39', 1, '0000-00-00 00:00:00', '2020-04-04 12:08:17'),
	(44, 1, '15002', 'Akumulasi Penyusutan Mesin', 3, 'K', 0, '39', 1, '0000-00-00 00:00:00', '2020-04-04 12:10:30'),
	(45, 1, '12004', 'Kendaraan', 3, 'D', 0, '39', 1, '0000-00-00 00:00:00', '2020-04-04 12:12:23'),
	(46, 1, '15003', 'Akumulasi Penyusutan Kendaraan', 3, 'K', 0, '39', 1, '0000-00-00 00:00:00', '2020-04-04 12:13:42'),
	(47, 1, '12005', 'Inventaris Kantor', 3, 'D', 1, '39', 1, '0000-00-00 00:00:00', '2020-03-23 14:16:47'),
	(48, 1, '15004', 'Akumulasi Penyusutan Inventaris Kantor', 3, 'K', 1, '39', 1, '0000-00-00 00:00:00', '2020-03-23 14:18:08'),
	(49, 1, '13000', 'Aktiva Tetap Lainnya', 2, 'D', 0, '1', 1, '0000-00-00 00:00:00', '2020-03-23 14:11:30'),
	(50, 1, '13001', 'Bangunan Dalam Konstruksi', 3, 'D', 1, '49', 1, '0000-00-00 00:00:00', '2020-03-23 14:20:16'),
	(51, 1, '14000', 'Aktiva Tidak Berwujud', 2, 'D', 0, '1', 1, '0000-00-00 00:00:00', '2020-03-23 14:11:40'),
	(52, 1, '14001', 'Merk Dagang', 3, 'D', 1, '51', 1, '0000-00-00 00:00:00', '2020-03-23 14:21:41'),
	(53, 1, '14002', 'Hak Cipta', 3, 'D', 1, '51', 1, '0000-00-00 00:00:00', '2020-03-23 14:21:58'),
	(54, 1, '14003', 'Goodwill', 3, 'D', 1, '51', 1, '0000-00-00 00:00:00', '2020-03-23 14:22:18'),
	(56, 2, '20000', 'Kewajiban', 1, 'K', 0, '0', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
	(57, 2, '21000', 'Kewajiban Lancar', 2, 'K', 0, '56', 1, '0000-00-00 00:00:00', '2020-03-23 14:28:54'),
	(58, 2, '20101', 'Hutang Usaha', 3, 'K', 1, '205', 1, '0000-00-00 00:00:00', '2019-07-11 11:49:35'),
	(59, 2, '21002', 'Hutang Bank', 3, 'K', 0, '57', 1, '0000-00-00 00:00:00', '2020-03-23 14:32:25'),
	(60, 2, '21003', 'Hutang Lain-Lain', 3, 'K', 1, '57', 1, '0000-00-00 00:00:00', '2020-04-04 12:16:30'),
	(61, 2, '21004', 'Hutang Pihak Istimewa', 4, 'K', 0, '57', 1, '0000-00-00 00:00:00', '2020-03-23 14:35:57'),
	(62, 2, '21005', 'Hutang Lainnya', 4, 'K', 0, '57', 1, '0000-00-00 00:00:00', '2020-03-23 14:44:15'),
	(63, 2, '21006', 'Hutang Pajak', 3, 'K', 0, '57', 1, '0000-00-00 00:00:00', '2020-03-23 14:51:43'),
	(64, 2, '21006-01', 'Hutang PPN', 4, 'K', 1, '63', 1, '0000-00-00 00:00:00', '2020-03-23 15:04:24'),
	(65, 2, '21006-02', 'PPN Keluaran', 5, 'K', 1, '63', 1, '0000-00-00 00:00:00', '2020-03-23 14:56:10'),
	(66, 2, '21006-03', 'PPN Masukan', 5, 'K', 1, '63', 1, '0000-00-00 00:00:00', '2020-03-23 14:56:32'),
	(67, 2, '21006-04', 'Hutang Pajak PPh 21', 4, 'K', 1, '63', 1, '0000-00-00 00:00:00', '2020-03-23 15:07:48'),
	(68, 2, '21006-05', 'Hutang Pajak PPh 23', 4, 'K', 1, '63', 1, '0000-00-00 00:00:00', '2020-03-23 15:09:18'),
	(69, 2, '21006-06', 'Hutang Pajak PPh 25', 4, 'K', 1, '63', 1, '0000-00-00 00:00:00', '2020-03-23 15:09:40'),
	(70, 2, '21006-07', 'Hutang Pajak PPh 26', 4, 'K', 1, '63', 1, '0000-00-00 00:00:00', '2020-03-23 15:14:43'),
	(71, 2, '21006-08', 'Hutang Pajak PPh 29', 4, 'K', 1, '63', 1, '0000-00-00 00:00:00', '2020-03-23 15:18:25'),
	(72, 2, '21006-09', 'Hutang Pajak Final PP 46', 4, 'K', 1, '63', 1, '0000-00-00 00:00:00', '2020-03-23 15:18:46'),
	(73, 2, '21007', 'Hutang Biaya', 3, 'K', 0, '57', 1, '0000-00-00 00:00:00', '2020-03-23 15:21:59'),
	(74, 2, '21007-01', 'Hutang Gaji & Upah', 4, 'K', 1, '73', 1, '0000-00-00 00:00:00', '2020-03-23 15:22:49'),
	(75, 2, '21007-02', 'Hutang Utilitas', 4, 'K', 1, '73', 1, '0000-00-00 00:00:00', '2020-03-23 15:24:16'),
	(76, 2, '21007-03', 'Hutang Biaya Lainnya', 4, 'K', 1, '73', 1, '0000-00-00 00:00:00', '2020-03-23 15:24:51'),
	(77, 2, '21008', 'Uang Muka Penjualan', 3, 'K', 0, '57', 1, '0000-00-00 00:00:00', '2020-03-23 15:25:43'),
	(78, 2, '21008-01', 'Uang Muka Penjualan', 4, 'K', 1, '77', 1, '0000-00-00 00:00:00', '2020-03-23 15:26:09'),
	(79, 2, '22000', 'Kewajiban Jangka Panjang', 2, 'K', 0, '56', 1, '0000-00-00 00:00:00', '2020-03-23 14:29:12'),
	(80, 2, '22001', 'Hutang Bank BNI 066-872-5542 CV.Ketjubung', 3, 'K', 1, '79', 1, '0000-00-00 00:00:00', '2020-03-24 08:25:37'),
	(81, 2, '22003', 'Hutang Jangka Panjang Lainnya', 3, 'K', 1, '79', 1, '0000-00-00 00:00:00', '2020-03-24 08:27:32'),
	(83, 3, '30000', 'Ekuitas', 1, 'K', 0, '0', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
	(84, 3, '31000', 'Modal', 2, 'K', 1, '83', 1, '0000-00-00 00:00:00', '2020-03-24 08:28:31'),
	(85, 3, '32000', 'Laba Ditahan', 2, 'K', 1, '83', 1, '0000-00-00 00:00:00', '2020-03-24 08:28:49'),
	(86, 3, '33000', 'Prive', 2, 'K', 1, '83', 1, '0000-00-00 00:00:00', '2020-03-24 08:29:10'),
	(87, 3, '34000', 'Laba Periode Berjalan', 2, 'K', 1, '83', 1, '0000-00-00 00:00:00', '2020-03-24 08:29:19'),
	(89, 4, '40000', 'Pendapatan', 1, 'K', 0, '0', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
	(90, 4, '41000', 'Penjualan', 2, 'K', 0, '89', 1, '0000-00-00 00:00:00', '2020-04-03 18:56:49'),
	(91, 4, '42000', 'Retur Penjualan', 2, 'D', 1, '89', 1, '0000-00-00 00:00:00', '2020-03-24 08:31:30'),
	(92, 4, '43000', 'Potongan Penjualan', 2, 'D', 1, '89', 1, '0000-00-00 00:00:00', '2020-03-24 08:31:54'),
	(93, 5, '50000', 'Harga Pokok Penjualan (HPP)', 1, 'D', 0, '0', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
	(94, 5, '51000', 'Barang Jadi Awal', 2, 'D', 1, '93', 1, '0000-00-00 00:00:00', '2020-03-24 08:32:38'),
	(95, 5, '52000', 'Pembelian', 2, 'D', 0, '93', 1, '0000-00-00 00:00:00', '2020-03-24 08:32:55'),
	(96, 5, '520001', 'Pembelian Bahan Baku', 3, 'D', 0, '95', 1, '0000-00-00 00:00:00', '2020-04-03 22:17:29'),
	(97, 5, '52003', 'Pembelian Bahan Pembantu', 3, 'D', 0, '95', 1, '0000-00-00 00:00:00', '2020-04-03 22:34:16'),
	(98, 5, '52004', 'Potongan Pembelian', 2, 'K', 1, '95', 1, '0000-00-00 00:00:00', '2020-03-24 08:37:47'),
	(99, 5, '52005', 'Retur Pembelian', 2, 'K', 1, '95', 1, '0000-00-00 00:00:00', '2020-03-24 08:38:00'),
	(100, 5, '52006', 'Ongkos Angkut Pembelian', 2, 'D', 1, '95', 1, '0000-00-00 00:00:00', '2020-03-24 08:38:13'),
	(101, 5, '53000', 'Biaya Produksi', 2, 'D', 0, '93', 1, '0000-00-00 00:00:00', '2020-03-24 08:38:37'),
	(102, 5, '53001', 'Biaya Pemakaian Bahan Baku', 3, 'D', 0, '101', 1, '0000-00-00 00:00:00', '2020-04-03 22:39:01'),
	(103, 5, '53002', 'Biaya Tenaga Kerja Langsung (BTKL)', 3, 'D', 0, '101', 1, '0000-00-00 00:00:00', '2020-04-04 11:03:57'),
	(104, 5, '53003', 'Biaya Pengerjaan Maklon/Celup', 3, 'D', 1, '101', 1, '0000-00-00 00:00:00', '2020-03-24 08:40:36'),
	(105, 5, '53004', 'Biaya Pengerjaan Cabut', 3, 'D', 1, '101', 1, '0000-00-00 00:00:00', '2020-03-24 08:41:11'),
	(106, 5, '53005', 'Biaya Pengerjaan/Jasa Lainnya', 3, 'D', 1, '101', 1, '0000-00-00 00:00:00', '2020-03-24 08:41:26'),
	(107, 5, '54000', 'Biaya Overhead Pabrik', 2, 'D', 0, '93', 1, '0000-00-00 00:00:00', '2020-03-24 08:41:48'),
	(108, 5, '54001', 'Barang Dalam Proses Awal', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:42:20'),
	(109, 5, '54002', 'Barang Dalam Proses Akhir', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:42:33'),
	(110, 5, '54003', 'BOP - Biaya Gaji & Upah Tidak Langsung', 3, 'D', 0, '107', 1, '0000-00-00 00:00:00', '2020-04-04 11:34:51'),
	(111, 5, '54004', 'BOP - Pemakaian Bahan Pembantu Produksi', 3, 'D', 0, '107', 1, '0000-00-00 00:00:00', '2020-04-04 11:42:09'),
	(112, 5, '54005', 'BOP - Pemeliharaan & Perbaikan Gedung', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:45:31'),
	(113, 5, '54006', 'BOP - Pemeliharaan & Perbaikan Mesin', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:45:44'),
	(114, 5, '54007', 'BOP - Pemeliharaan & Perbaikan Kendaraan', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:46:31'),
	(115, 5, '54008', 'BOP - Pemeliharaan & Perbaikan Inventaris', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:47:03'),
	(116, 5, '54009', 'BOP - Pemakaian Perlengkapan', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:47:17'),
	(117, 5, '54010', 'BOP - Biaya Depresiasi Gedung', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:47:35'),
	(118, 5, '54011', 'BOP - Biaya Depresiasi Mesin', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:47:48'),
	(119, 5, '54012', 'BOP - Biaya Depresiasi Kendaraan', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:48:03'),
	(120, 5, '54013', 'BOP - Biaya Depresiasi Inventaris Kantor', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:48:19'),
	(121, 5, '54014', 'BOP - Asuransi Gedung', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:48:44'),
	(122, 5, '54015', 'BOP - Asuransi Mesin', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:48:57'),
	(123, 5, '54016', 'BOP - Asuransi Kendaraan', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:49:11'),
	(124, 5, '54017', 'BOP - Asuransi Inventaris', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:49:25'),
	(125, 5, '54018', 'BOP - Asuransi Lainnya', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:49:42'),
	(126, 5, '54019', 'BOP - Kesehatan, BPJS Kesehatan & Ketenagakerjaan Kary. Produksi', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:50:07'),
	(127, 5, '54020', 'BOP - Transportasi/Ekspedisi/Pengiriman Barang Dalam Proses', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:50:27'),
	(128, 5, '54021', 'BOP - Listrik', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:50:45'),
	(129, 5, '54022', 'BOP - Air', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:51:04'),
	(130, 5, '54023', 'BOP - Mekanik & Sparepart Mesin', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:52:04'),
	(131, 5, '54024', 'BOP - Lainnya', 3, 'D', 1, '107', 1, '0000-00-00 00:00:00', '2020-03-24 08:52:23'),
	(133, 5, '55000', 'Barang Jadi Akhir', 2, 'D', 0, '93', 1, '0000-00-00 00:00:00', '2020-03-24 08:52:46'),
	(134, 5, '55001', 'HPP Barang Jadi', 3, 'D', 1, '133', 1, '0000-00-00 00:00:00', '2020-03-24 08:53:09'),
	(135, 5, '55002', 'Work In Process (WIP) Barang Jadi', 3, 'D', 1, '133', 1, '0000-00-00 00:00:00', '2020-03-24 08:53:25'),
	(136, 5, '56000', 'HPP Lainnya', 2, 'D', 0, '93', 1, '0000-00-00 00:00:00', '2020-03-24 08:53:55'),
	(137, 5, '56001', 'HPP Bahan Baku', 3, 'D', 1, '136', 1, '0000-00-00 00:00:00', '2020-03-24 08:54:13'),
	(138, 5, '56002', 'HPP Lainnya', 3, 'D', 1, '136', 1, '0000-00-00 00:00:00', '2020-03-24 08:54:29'),
	(140, 6, '60000', 'Beban Usaha', 1, 'D', 0, '0', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
	(141, 6, '61000', 'Beban Penjualan dan Pemasaran', 2, 'D', 0, '140', 1, '0000-00-00 00:00:00', '2020-03-24 08:56:05'),
	(142, 6, '61001', 'Biaya Gaji Penjualan', 3, 'D', 1, '141', 1, '0000-00-00 00:00:00', '2020-03-24 08:56:31'),
	(143, 6, '61002', 'Biaya Komisi & Bonus Penjualan', 3, 'D', 1, '141', 1, '0000-00-00 00:00:00', '2020-03-24 08:56:49'),
	(144, 6, '61003', 'Biaya Transportasi/Pengiriman Penjualan', 3, 'D', 1, '141', 1, '0000-00-00 00:00:00', '2020-03-24 08:57:11'),
	(145, 6, '61004', 'Biaya Entertainment Penjualan', 3, 'D', 1, '141', 1, '0000-00-00 00:00:00', '2020-03-24 08:57:45'),
	(146, 6, '61005', 'Biaya Penjualan & Pemasaran Lain-Lain', 3, 'D', 1, '141', 1, '0000-00-00 00:00:00', '2020-03-24 08:58:02'),
	(147, 6, '61006', 'Kerugian Piutang', 3, 'D', 1, '141', 1, '0000-00-00 00:00:00', '2020-03-24 08:58:20'),
	(148, 6, '62000', 'Beban Promosi dan Iklan', 2, 'D', 0, '140', 1, '0000-00-00 00:00:00', '2020-03-24 09:02:53'),
	(149, 6, '62001', 'Biaya Iklan & Promosi', 3, 'D', 1, '148', 1, '0000-00-00 00:00:00', '2020-03-24 09:03:10'),
	(150, 6, '62002', 'Biaya Promosi Lain-Lain', 3, 'D', 1, '148', 1, '0000-00-00 00:00:00', '2020-03-24 09:03:23'),
	(151, 6, '63000', 'Beban Administrasi dan Umum', 2, 'D', 0, '140', 1, '0000-00-00 00:00:00', '2020-03-24 09:04:06'),
	(152, 6, '63001', 'Bi. Adm & Umum - Gaji & Upah', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:04:38'),
	(153, 6, '63002', 'Bi. Adm & Umum - Lembur/Overtime', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:05:29'),
	(154, 6, '63003', 'Bi. Adm & Umum - THR/Bonus/Tunjangan & Intensif', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:06:30'),
	(155, 6, '63004', 'Bi. Adm & Umum - Kesehatan, BPJS Kesehatan & Ketenagakerjaan', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:07:09'),
	(156, 6, '63005', 'Bi. Adm & Umum - Administrasi Bank', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:07:59'),
	(157, 6, '63006', 'Bi. Adm & Umum - Bunga Kredit Bank', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:08:26'),
	(158, 6, '63007', 'Bi. Adm & Umum - Provisi Bank', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:08:42'),
	(159, 6, '63008', 'Bi. Adm & Umum - Jasa Profesi/Konsultan/Programer/Tenaga Ahli', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:11:15'),
	(160, 6, '63009', 'Bi. Adm & Umum - Permit', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:11:34'),
	(161, 6, '63010', 'Bi. Adm & Umum - Perjalanan Dinas, Akomodasi & Transportasi', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:11:52'),
	(162, 6, '63011', 'Bi. Adm & Umum - Transportasi, Toll & Parkir', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:12:58'),
	(163, 6, '63012', 'Bi. Adm & Umum - BBM', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:13:23'),
	(164, 6, '63013', 'Bi. Adm & Umum - IT, Software, Hardware & Lainnya', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-04-04 11:59:02'),
	(165, 6, '63014', 'Bi. Adm & Umum - Alat Tulis Kantor', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:14:36'),
	(166, 6, '63015', 'Bi, Adm & Umum - Foto Copy', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:14:51'),
	(167, 6, '63016', 'Bi. Adm & Umum - Entertainment', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-08-29 10:06:12'),
	(168, 6, '63017', 'Bi. Adm & Umum - Makan/Minum', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:15:24'),
	(169, 6, '63018', 'Bi. Adm & Umum - Keperluan Dapur/Kantor Lainnya', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:17:20'),
	(170, 6, '63019', 'Bi. Adm & Umum - Ekspedisi & Pengiriman Dokumen & Barang', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:18:39'),
	(171, 6, '63020', 'Bi. Adm & Umum - Pajak, PBB, PKB & Lainnya', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:19:16'),
	(172, 6, '63021', 'Bi. Adm & Umum - Sumbangan & Shodaqoh', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:20:09'),
	(173, 6, '63022', 'Bi. Adm & Umum - Kebersihan & Keamanan', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:21:30'),
	(174, 6, '63023', 'Bi. Adm & Umum - Pos, Surat & Materai', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:21:51'),
	(175, 6, '63024', 'Bi. Adm & Umum - Cetakan, Majalah & Surat Kabar', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:22:08'),
	(176, 6, '63025', 'Bi. Adm & Umum - Keperluan Keluarga Pribadi', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:22:40'),
	(177, 6, '63027', 'Bi. Adm & Umum - Lain-Lain', 3, 'D', 1, '151', 1, '0000-00-00 00:00:00', '2020-03-24 09:23:26'),
	(178, 6, '64000', 'Beban Utilitas', 2, 'D', 0, '140', 1, '0000-00-00 00:00:00', '2020-03-24 09:30:38'),
	(179, 6, '64001', 'Listrik', 3, 'D', 1, '178', 1, '0000-00-00 00:00:00', '2020-03-24 09:30:57'),
	(180, 6, '64002', 'Air', 3, 'D', 1, '178', 1, '0000-00-00 00:00:00', '2020-03-24 09:31:11'),
	(181, 6, '64003', 'Telephone', 3, 'D', 1, '178', 1, '0000-00-00 00:00:00', '2020-03-24 09:31:24'),
	(182, 6, '64004', 'Internet', 3, 'D', 1, '178', 1, '0000-00-00 00:00:00', '2020-03-24 09:31:37'),
	(184, 7, '70000', 'Pendapatan Diluar Usaha', 1, 'K', 0, '0', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
	(185, 7, '71000', 'Bunga Jasa Giro', 2, 'K', 1, '184', 1, '0000-00-00 00:00:00', '2020-03-24 09:32:51'),
	(186, 7, '72000', 'Laba Penjualan Aktiva Tetap', 2, 'K', 1, '184', 1, '0000-00-00 00:00:00', '2020-03-24 09:33:36'),
	(187, 7, '73000', 'Laba Selisih Kurs', 2, 'K', 1, '184', 1, '0000-00-00 00:00:00', '2020-03-24 09:34:32'),
	(188, 7, '74000', 'Pendapatan Lain-Lain', 2, 'K', 1, '184', 1, '0000-00-00 00:00:00', '2020-03-24 09:34:46'),
	(190, 8, '80000', 'Biaya Diluar Usaha', 1, 'D', 0, '0', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
	(191, 8, '81000', 'Pajak Jasa Giro', 2, 'D', 1, '190', 1, '0000-00-00 00:00:00', '2020-03-24 09:35:38'),
	(192, 8, '82000', 'Biaya Administrasi Jasa Giro', 2, 'D', 1, '190', 1, '0000-00-00 00:00:00', '2020-03-24 09:35:52'),
	(193, 8, '83000', 'Rugi Penjualan Aktiva Tetap', 2, 'D', 1, '190', 1, '0000-00-00 00:00:00', '2020-03-24 09:36:05'),
	(194, 8, '84000', 'Rugi Selisih Kurs', 2, 'D', 1, '190', 1, '0000-00-00 00:00:00', '2020-03-24 09:36:20'),
	(195, 8, '85000', 'Biaya Lain-Lain', 2, 'D', 1, '190', 1, '0000-00-00 00:00:00', '2020-03-24 09:36:33'),
	(197, 9, '90000', 'Ikhtisar Laba/Rugi', 1, 'K', 0, '0', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
	(198, 9, '91000', 'Ikhtisar Laba/Rugi', 2, 'K', 1, '197', 1, '0000-00-00 00:00:00', '2020-03-24 09:36:59'),
	(199, 9, '92000', 'Waste/Loss Production', 2, 'D', 1, '197', 1, '0000-00-00 00:00:00', '2020-03-24 09:37:09'),
	(201, 6, '63026', 'Bi. Adm & Umum - Electrical, Lampu, Perawatan AC & Lainnya', 3, 'D', 1, '151', 0, '2019-05-22 09:17:56', '2020-03-24 09:23:07'),
	(202, 2, '21002-01', 'Hutang Bank BRI 0026-01-502007-15-6 CV.Ketjubung', 4, 'K', 1, '59', 0, '2019-07-02 15:28:11', '2020-03-23 14:32:55'),
	(203, 2, '21002-02', 'Hutang Bank BNI 043-349-0729 CV.Ketjubung', 4, 'K', 1, '59', 0, '2019-07-02 15:28:51', '2020-03-23 14:33:06'),
	(204, 1, '11304-01', 'Piutang ABD', 5, 'D', 1, '23', 0, '2019-07-11 11:37:22', '2020-03-18 10:38:51'),
	(205, 2, '21001', 'Hutang Usaha', 3, 'K', 0, '57', 0, '2019-07-11 11:49:27', '2020-03-23 14:29:47'),
	(206, 2, '21004-01', 'HPI - ABD', 5, 'K', 1, '61', 0, '2019-07-11 11:57:34', '2020-03-23 14:40:21'),
	(207, 1, '11212', 'BCA 790-144-5552 Halim Bahasuan', 4, 'D', 1, '7', 0, '2019-09-03 13:17:05', '2020-03-18 10:25:25'),
	(208, 1, '11213', 'BCA 790-311-2222 Hafid Bahasuan', 4, 'D', 1, '7', 0, '2019-09-03 13:18:51', '2020-03-18 10:26:45'),
	(209, 1, '11214', 'BCA 790-098-5732 Lailah Bahasuan', 4, 'D', 1, '7', 0, '2019-11-28 14:33:57', '2020-03-18 10:27:07'),
	(210, 1, '11215', 'BCA 816-175-7276 Balgis Bahasuan', 4, 'D', 1, '7', 0, '2019-11-28 14:35:49', '2020-03-18 10:28:12'),
	(211, 1, '11216', 'BCA 790-222-4443 CV Niaga Abadi Bersama', 4, 'D', 1, '7', 0, '2019-12-04 09:54:40', '2020-03-18 10:28:45'),
	(212, 1, '11217', 'BCA USD 790-313-1316 CV Niaga Abadi Bersama', 4, 'D', 1, '7', 0, '2019-12-04 09:56:37', '2020-03-18 10:29:25'),
	(213, 1, '11218', 'BCA 150-094-3960 Munif Bahasuan', 4, 'D', 1, '7', 0, '2019-12-24 13:59:05', '2020-03-18 10:30:07'),
	(214, 1, '11219', 'BCA 150-991-9991 Munif Bahasuan', 4, 'D', 1, '7', 0, '2020-03-17 13:17:32', '2020-03-18 10:30:23'),
	(215, 1, '11220', 'BCA 824-069-2784 Huda Naufal', 4, 'D', 1, '7', 0, '2020-03-18 10:32:44', '2020-03-18 10:32:44'),
	(216, 1, '11303', 'Piutang Rekanan/Borongan', 4, 'D', 1, '20', 0, '2020-03-18 10:37:21', '2020-03-18 10:37:21'),
	(217, 1, '11304-02', 'Piutang Pihak Istimewa - Keluarga', 5, 'D', 1, '23', 0, '2020-03-18 10:40:10', '2020-03-18 10:40:10'),
	(218, 1, '11504', 'PPn Belum Difakturkan', 4, 'D', 1, '31', 0, '2020-03-23 14:09:46', '2020-03-23 14:09:46'),
	(219, 1, '13002', 'Inventaris Dalam Konstruksi', 3, 'D', 1, '49', 0, '2020-03-23 14:20:58', '2020-03-23 14:20:58'),
	(220, 2, '21004-02', 'HPI - Amak Bamaryam', 5, 'K', 1, '61', 0, '2020-03-23 14:41:06', '2020-03-23 14:41:06'),
	(221, 2, '21004-03', 'HPI - Keluarga', 5, 'K', 1, '61', 0, '2020-03-23 14:41:49', '2020-03-23 14:41:49'),
	(222, 2, '21004-04', 'HPI - Lainnya', 5, 'K', 1, '61', 0, '2020-03-23 14:43:32', '2020-03-23 14:43:32'),
	(223, 2, '21005-01', 'Hutang Lainnya - Sewa Gedung/Gudang', 5, 'K', 1, '62', 0, '2020-03-23 14:45:37', '2020-03-23 14:45:37'),
	(224, 2, '21005-02', 'Hutang Lainnya - Sewa Mesin', 5, 'K', 1, '62', 0, '2020-03-23 14:46:33', '2020-03-23 14:46:33'),
	(225, 2, '21005-03', 'Hutang Lainnya - Sewa Kendaraan', 5, 'K', 1, '62', 0, '2020-03-23 14:47:12', '2020-03-23 14:47:12'),
	(226, 2, '21005-04', 'Hutang Lainnya - Sewa Lainnya', 5, 'K', 1, '62', 0, '2020-03-23 14:47:48', '2020-03-23 14:47:48'),
	(227, 2, '21005-05', 'Hutang Lainnya - Lain-lain', 5, 'K', 1, '62', 0, '2020-03-23 14:48:43', '2020-03-23 14:48:43'),
	(228, 2, '21006-10', 'Hutang Pajak Lainnya', 4, 'K', 1, '63', 0, '2020-03-23 15:21:34', '2020-03-23 15:21:34'),
	(229, 1, '21008-02', 'Uang Muka Penjualan Lainnya', 4, 'K', 1, '77', 0, '2020-03-23 15:27:03', '2020-03-24 08:24:08'),
	(230, 2, '22002', 'Hutang Bank BNI 5M CV. Ketjubung', 3, 'K', 1, '79', 0, '2020-03-24 08:27:05', '2020-03-24 08:27:05'),
	(231, 6, '63028', 'Bi. Adm & Umum - Project Luar', 3, 'D', 0, '151', 0, '2020-03-24 09:24:53', '2020-03-24 09:24:53'),
	(232, 6, '63028-01', 'Bi. Adm & Umum - Project Luar Gunung Wijil', 4, 'D', 1, '231', 0, '2020-03-24 09:25:45', '2020-03-24 09:25:45'),
	(233, 6, '63028-02', 'Bi. Adm & Umum - Project Luar Lima Waktu Kopi', 4, 'D', 1, '231', 0, '2020-03-24 09:26:21', '2020-03-24 09:26:21'),
	(234, 6, '63029', 'Bi. Adm & Umum - R&D', 3, 'D', 1, '151', 0, '2020-03-24 09:27:26', '2020-03-24 09:27:26'),
	(235, 6, '63030', 'Bi. Adm & Umum - Sewa', 3, 'D', 0, '151', 0, '2020-03-24 09:28:03', '2020-04-04 11:49:15'),
	(236, 6, '63030-01', 'Bi. Adm & Umum - Sewa Gedung/Gudang', 4, 'D', 1, '235', 0, '2020-03-24 09:28:53', '2020-03-24 09:28:53'),
	(237, 6, '63030-02', 'Bi. Adm & Umum - Sewa Mesin', 4, 'D', 1, '235', 0, '2020-03-24 09:29:22', '2020-03-24 09:29:22'),
	(238, 6, '63030-03', 'Bi. Adm & Umum - Sewa Kendaraan', 4, 'D', 1, '235', 0, '2020-03-24 09:29:51', '2020-03-24 09:29:51'),
	(239, 6, '63030-04', 'Bi. Adm & Umum - Sewa Lainnya', 4, 'D', 1, '235', 0, '2020-03-24 09:30:17', '2020-03-24 09:30:17'),
	(240, 1, '11301-01', 'Piutang Usaha - Abdullah Alatas', 5, 'D', 1, '21', 0, '2020-03-31 08:08:42', '2020-03-31 08:08:42'),
	(241, 1, '11301-02', 'Piutang Usaha - Achmad Baduhun Badawi', 5, 'D', 1, '21', 0, '2020-03-31 08:09:21', '2020-03-31 08:09:21'),
	(242, 1, '11301-03', 'Piutang Usaha - Achmad Zubaidi', 5, 'D', 1, '21', 0, '2020-03-31 08:10:09', '2020-03-31 08:10:09'),
	(243, 1, '11301-04', 'Piutang Usaha - Akim', 5, 'D', 1, '21', 0, '2020-03-31 08:11:14', '2020-03-31 08:11:14'),
	(244, 1, '11301-05', 'Piutang Usaha - Alaix Munakamala', 5, 'D', 1, '21', 0, '2020-03-31 08:11:58', '2020-03-31 08:11:58'),
	(245, 1, '11301-06', 'Piutang Usaha - Alwi Bil Feqih', 5, 'D', 1, '21', 0, '2020-03-31 08:13:14', '2020-03-31 08:13:14'),
	(246, 1, '11301-07', 'Piutang Usaha - Anis Bahasuan', 5, 'D', 1, '21', 0, '2020-03-31 08:13:54', '2020-03-31 08:13:54'),
	(247, 1, '11301-08', 'Piutang Usaha - Altara', 5, 'D', 1, '21', 0, '2020-03-31 08:14:33', '2020-03-31 08:14:33'),
	(248, 1, '11301-09', 'Piutang Usaha - Altara Royal', 5, 'D', 1, '21', 0, '2020-03-31 08:15:10', '2020-03-31 08:15:10'),
	(249, 1, '11301-10', 'Piutang Usaha - Balgis Bahasuan', 5, 'D', 1, '21', 0, '2020-03-31 08:15:37', '2020-03-31 08:15:37'),
	(250, 1, '11301-11', 'Piutang Usaha - Suryadi', 5, 'D', 1, '21', 0, '2020-03-31 08:16:18', '2020-09-19 11:43:54'),
	(251, 1, '11301-12', 'Piutang Usaha - Chandra Widiyanto', 5, 'D', 1, '21', 0, '2020-03-31 08:18:10', '2020-03-31 08:18:10'),
	(252, 1, '11301-13', 'Piutang Usaha - Choirul Bachtiar', 5, 'D', 1, '21', 0, '2020-03-31 08:18:40', '2020-09-14 11:12:06'),
	(253, 1, '11301-14', 'Piutang Usaha - Edo', 5, 'D', 1, '21', 0, '2020-03-31 08:19:16', '2020-03-31 08:19:16'),
	(254, 1, '11301-15', 'Piutang Usaha - Ges Bala\'mas', 5, 'D', 1, '21', 0, '2020-03-31 08:19:46', '2020-03-31 08:19:46'),
	(255, 1, '11301-16', 'Piutang Usaha - H. Muhammad Nuh', 5, 'D', 1, '21', 0, '2020-03-31 08:20:12', '2020-03-31 08:20:12'),
	(256, 1, '11301-17', 'Piutang Usaha - Ilham Munif Bahasuan', 5, 'D', 1, '21', 0, '2020-03-31 08:20:37', '2020-03-31 08:20:37'),
	(257, 1, '11301-18', 'Piutang Usaha - Intan Baghdadi', 5, 'D', 1, '21', 0, '2020-03-31 08:21:03', '2020-03-31 08:21:03'),
	(258, 1, '11301-19', 'Piutang Usaha - Kadir Haneman', 5, 'D', 1, '21', 0, '2020-03-31 08:21:38', '2020-03-31 08:21:38'),
	(259, 1, '11301-20', 'Piutang Usaha - Mahmud Faqih', 5, 'D', 1, '21', 0, '2020-03-31 08:22:07', '2020-03-31 08:22:07'),
	(260, 1, '11301-21', 'Piutang Usaha - Marjaya', 5, 'D', 1, '21', 0, '2020-03-31 08:22:32', '2020-03-31 08:22:32'),
	(261, 1, '11301-22', 'Piutang Usaha - Misman Tunai', 5, 'D', 1, '21', 0, '2020-03-31 08:24:03', '2020-03-31 08:24:03'),
	(262, 1, '11301-23', 'Piutang Usaha - Moch. Assegaf', 5, 'D', 1, '21', 0, '2020-03-31 08:24:43', '2020-03-31 08:24:43'),
	(263, 1, '11301-24', 'Piutang Usaha - Moch. Assegaf (Yek Gaben/bangil)', 5, 'D', 1, '21', 0, '2020-03-31 08:26:32', '2020-03-31 08:26:32'),
	(264, 1, '11301-25', 'Piutang Usaha - Moch. Bala\'mas', 5, 'D', 1, '21', 0, '2020-03-31 08:27:22', '2020-03-31 08:27:22'),
	(265, 1, '11301-26', 'Piutang Usaha - Moch. Nashri', 5, 'D', 1, '21', 0, '2020-03-31 08:27:52', '2020-03-31 08:27:52'),
	(266, 1, '11301-27', 'Piutang Usaha - Modern Point Est (Future)', 5, 'D', 1, '21', 0, '2020-03-31 08:28:25', '2020-03-31 08:28:25'),
	(267, 1, '11301-28', 'Piutang Usaha - Nabila Ahmad', 5, 'D', 1, '21', 0, '2020-03-31 08:29:02', '2020-03-31 08:29:02'),
	(268, 1, '11301-29', 'Piutang Usaha - Pand\'s Collection', 5, 'D', 1, '21', 0, '2020-03-31 08:30:04', '2020-03-31 08:30:04'),
	(269, 1, '11301-30', 'Piutang Usaha - Rusjdi Bahasuan ', 5, 'D', 1, '21', 0, '2020-03-31 08:30:50', '2020-09-14 13:25:02'),
	(270, 1, '11301-31', 'Piutang Usaha - Satar', 5, 'D', 1, '21', 0, '2020-03-31 08:31:11', '2020-03-31 08:31:11'),
	(271, 1, '11301-32', 'Piutang Usaha - Sonia Mandiri Tekstile, PT.', 5, 'D', 1, '21', 0, '2020-03-31 08:31:49', '2020-03-31 08:31:49'),
	(272, 1, '11301-33', 'Piutang Usaha - Surya Baru', 5, 'D', 1, '21', 0, '2020-03-31 08:32:18', '2020-03-31 08:32:18'),
	(273, 1, '11301-34', 'Piutang Usaha - Toko Aditya Tex', 5, 'D', 1, '21', 0, '2020-03-31 08:32:49', '2020-03-31 08:32:49'),
	(274, 1, '11301-35', 'Piutang Usaha - Toko Arofah', 5, 'D', 1, '21', 0, '2020-03-31 08:33:28', '2020-03-31 08:33:28'),
	(275, 1, '11301-36', 'Piutang Usaha - Toko WK', 5, 'D', 1, '21', 0, '2020-03-31 08:33:59', '2020-09-15 12:00:51'),
	(276, 1, '11301-37', 'Piutang Usaha - Toko Bintang Mas', 5, 'D', 1, '21', 0, '2020-03-31 08:34:24', '2020-03-31 08:34:24'),
	(277, 1, '11301-38', 'Piutang Usaha - Toko H. Ramli', 5, 'D', 1, '21', 0, '2020-03-31 08:34:46', '2020-03-31 08:34:46'),
	(278, 1, '11301-39', 'Piutang Usaha - Toko HMW', 5, 'D', 1, '21', 0, '2020-03-31 08:35:22', '2020-03-31 08:35:22'),
	(279, 1, '11301-40', 'Piutang Usaha - Toko Jakarta', 5, 'D', 1, '21', 0, '2020-03-31 08:35:49', '2020-03-31 08:35:49'),
	(280, 1, '11301-41', 'Piutang Usaha - Toko Nazla', 5, 'D', 1, '21', 0, '2020-03-31 08:36:15', '2020-03-31 08:36:15'),
	(281, 1, '11301-42', 'Piutang Usaha - Toko Rizquna', 5, 'D', 1, '21', 0, '2020-03-31 08:36:55', '2020-03-31 08:36:55'),
	(282, 1, '11301-43', 'Piutang Usaha - Toko Sofia', 5, 'D', 1, '21', 0, '2020-03-31 08:37:22', '2020-03-31 08:37:22'),
	(283, 1, '11301-44', 'Piutang Usaha - OXL', 5, 'D', 1, '21', 0, '2020-03-31 08:37:49', '2020-09-14 11:14:53'),
	(284, 1, '11301-45', 'Piutang Usaha - Usman Gatneh', 5, 'D', 1, '21', 0, '2020-03-31 08:38:13', '2020-09-18 09:53:48'),
	(285, 1, '11301-46', 'Piutang Usaha - Ust. Zubaidi Harfi', 5, 'D', 1, '21', 0, '2020-03-31 08:38:40', '2020-03-31 08:38:40'),
	(286, 1, '11301-47', 'Piutang Usaha - ABZ', 5, 'D', 1, '21', 0, '2020-03-31 08:39:04', '2020-03-31 08:39:04'),
	(287, 1, '11301-48', 'Piutang Usaha - Ali Attamimi', 5, 'D', 1, '21', 0, '2020-03-31 08:39:28', '2020-03-31 08:39:28'),
	(288, 1, '11301-49', 'Piutang Usaha - Hisyam Barajak', 5, 'D', 1, '21', 0, '2020-03-31 08:39:55', '2020-03-31 08:39:55'),
	(289, 1, '11301-50', 'Piutang Usaha - SBZ', 5, 'D', 1, '21', 0, '2020-03-31 08:40:19', '2020-03-31 08:40:19'),
	(290, 1, '11301-51', 'Piutang Usaha - ZSZ', 5, 'D', 1, '21', 0, '2020-03-31 08:40:46', '2020-03-31 08:40:46'),
	(291, 1, '11301-52', 'Piutang Usaha - ZZZ', 5, 'D', 1, '21', 0, '2020-03-31 08:41:20', '2020-03-31 08:41:20'),
	(292, 1, '11301-53', 'Piutang Usaha - Lainnya', 5, 'D', 1, '21', 0, '2020-03-31 08:41:43', '2020-03-31 08:41:43'),
	(293, 1, '11401-01', 'Persediaan Barang Jadi - MRS', 5, 'D', 0, '26', 0, '2020-03-31 08:47:09', '2020-03-31 08:47:09'),
	(294, 1, '11401-01-01', 'Persediaan Barang Jadi - MRS PGR', 6, 'D', 1, '293', 0, '2020-03-31 08:47:55', '2020-03-31 08:47:55'),
	(295, 1, '11401-01-02', 'Persediaan Barang Jadi - MRS KWG', 6, 'D', 1, '293', 0, '2020-03-31 08:48:53', '2020-03-31 08:48:53'),
	(296, 1, '11401-01-03', 'Persediaan Barang Jadi - MRS PLS', 6, 'D', 1, '293', 0, '2020-03-31 08:49:31', '2020-03-31 08:49:31'),
	(297, 1, '11401-01-04', 'Persediaan Barang Jadi - MRS MST', 6, 'D', 1, '293', 0, '2020-03-31 08:50:06', '2020-03-31 08:50:06'),
	(298, 1, '11401-01-05', 'Persediaan Barang Jadi - MRS GLL', 6, 'D', 1, '293', 0, '2020-03-31 08:52:03', '2020-03-31 08:52:03'),
	(299, 1, '11401-01-06', 'Persediaan Barang Jadi - MRS TSK', 6, 'D', 1, '293', 0, '2020-03-31 08:52:35', '2020-03-31 08:52:35'),
	(300, 1, '11401-01-07', 'Persediaan Barang Jadi - MRS BTN', 6, 'D', 1, '293', 0, '2020-03-31 08:53:14', '2020-03-31 08:53:14'),
	(301, 1, '11401-01-08', 'Persediaan Barang Jadi - MRS SKG', 6, 'D', 1, '293', 0, '2020-03-31 08:53:49', '2020-03-31 08:53:49'),
	(302, 1, '11401-01-09', 'Persediaan Barang Jadi - MRS TJM', 6, 'D', 1, '293', 0, '2020-03-31 08:54:20', '2020-03-31 08:54:20'),
	(303, 1, '11401-01-10', 'Persediaan Barang Jadi - MRS TDP', 6, 'D', 1, '293', 0, '2020-03-31 08:55:13', '2020-03-31 08:55:13'),
	(304, 1, '11401-01-11', 'Persediaan Barang Jadi - MRS TSL', 6, 'D', 1, '293', 0, '2020-03-31 08:55:54', '2020-03-31 08:55:54'),
	(305, 1, '11401-01-12', 'Persediaan Barang Jadi - MRS STE', 6, 'D', 1, '293', 0, '2020-03-31 08:56:23', '2020-03-31 08:56:23'),
	(306, 1, '11401-01-13', 'Persediaan Barang Jadi - MRS TCD', 6, 'D', 1, '293', 0, '2020-03-31 08:56:59', '2020-03-31 08:56:59'),
	(307, 1, '11401-01-14', 'Persediaan Barang Jadi - MRS PKC', 6, 'D', 1, '293', 0, '2020-03-31 08:57:33', '2020-03-31 08:57:33'),
	(308, 1, '11401-01-15', 'Persediaan Barang Jadi - MRS SGD', 6, 'D', 1, '293', 0, '2020-03-31 08:58:07', '2020-03-31 08:58:07'),
	(309, 1, '11401-01-16', 'Persediaan Barang Jadi - MRS JQS', 6, 'D', 1, '293', 0, '2020-03-31 08:59:05', '2020-03-31 08:59:05'),
	(310, 1, '11401-01-17', 'Persediaan Barang Jadi - MRS TCC', 6, 'D', 1, '293', 0, '2020-03-31 08:59:33', '2020-03-31 08:59:33'),
	(311, 1, '11401-01-18', 'Persediaan Barang Jadi - MRS TCW', 6, 'D', 1, '293', 0, '2020-03-31 09:00:00', '2020-03-31 09:00:00'),
	(312, 1, '11401-01-19', 'Persediaan Barang Jadi - MRS STC', 6, 'D', 1, '293', 0, '2020-03-31 09:00:28', '2020-03-31 09:00:28'),
	(313, 1, '11401-01-20', 'Persediaan Barang Jadi - MRS DPS', 6, 'D', 1, '293', 0, '2020-03-31 09:00:57', '2020-03-31 09:00:57'),
	(314, 1, '11401-01-21', 'Persediaan Barang Jadi - MRS SGW', 6, 'D', 1, '293', 0, '2020-03-31 09:01:32', '2020-03-31 09:01:32'),
	(315, 1, '11401-01-22', 'Persediaan Barang Jadi - MRS SKJ', 6, 'D', 1, '293', 0, '2020-03-31 09:02:43', '2020-03-31 09:02:43'),
	(316, 1, '11401-01-23', 'Persediaan Barang Jadi - MRS TPI', 6, 'D', 1, '293', 0, '2020-03-31 09:03:25', '2020-03-31 09:03:25'),
	(317, 1, '11401-01-24', 'Persediaan Barang Jadi - MRS KSJ', 6, 'D', 1, '293', 0, '2020-03-31 09:03:59', '2020-03-31 09:03:59'),
	(318, 1, '11401-01-25', 'Persediaan Barang Jadi - MRS JMJ', 6, 'D', 1, '293', 0, '2020-03-31 09:06:15', '2020-03-31 09:06:15'),
	(319, 1, '11401-01-26', 'Persediaan Barang Jadi - MRS SDI', 6, 'D', 1, '293', 0, '2020-03-31 09:06:54', '2020-03-31 09:06:54'),
	(320, 1, '11401-01-27', 'Persediaan Barang Jadi - MRS SSI', 6, 'D', 1, '293', 0, '2020-03-31 09:07:36', '2020-03-31 09:07:36'),
	(321, 1, '11401-01-28', 'Persediaan Barang Jadi - MRS ALF 100', 6, 'D', 1, '293', 0, '2020-03-31 09:08:14', '2020-03-31 09:08:14'),
	(322, 1, '11401-01-29', 'Persediaan Barang Jadi - MRS GNK', 6, 'D', 1, '293', 0, '2020-03-31 09:09:28', '2020-03-31 09:09:28'),
	(323, 1, '11401-01-30', 'Persediaan Barang Jadi - MRS TSI', 6, 'D', 1, '293', 0, '2020-03-31 09:10:02', '2020-03-31 09:10:02'),
	(324, 1, '11401-01-31', 'Persediaan Barang Jadi - MRS GRJ', 6, 'D', 1, '293', 0, '2020-03-31 09:10:41', '2020-03-31 09:10:41'),
	(325, 1, '11401-01-32', 'Persediaan Barang Jadi - MRS ICE', 6, 'D', 1, '293', 0, '2020-03-31 09:11:27', '2020-03-31 09:11:27'),
	(326, 1, '11401-01-33', 'Persediaan Barang Jadi - MRS GTI', 6, 'D', 1, '293', 0, '2020-03-31 09:11:58', '2020-03-31 09:11:58'),
	(327, 1, '11401-01-34', 'Persediaan Barang Jadi - MRS JSI', 6, 'D', 1, '293', 0, '2020-03-31 09:12:32', '2020-03-31 09:12:32'),
	(328, 1, '11401-01-35', 'Persediaan Barang Jadi - MRS SGI', 6, 'D', 1, '293', 0, '2020-03-31 09:13:19', '2020-03-31 09:13:19'),
	(329, 1, '11401-01-36', 'Persediaan Barang Jadi - MRS SKC', 6, 'D', 1, '293', 0, '2020-03-31 09:13:48', '2020-03-31 09:13:48'),
	(330, 1, '11401-01-37', 'Persediaan Barang Jadi - MRS SPC', 6, 'D', 1, '293', 0, '2020-03-31 09:14:17', '2020-03-31 09:14:17'),
	(331, 1, '11401-01-38', 'Persediaan Barang Jadi - MRS SPD', 6, 'D', 1, '293', 0, '2020-03-31 09:15:02', '2020-03-31 09:15:02'),
	(332, 1, '11401-01-39', 'Persediaan Barang Jadi - MRS DPC', 6, 'D', 1, '293', 0, '2020-03-31 09:15:39', '2020-03-31 09:15:39'),
	(333, 1, '11401-01-40', 'Persediaan Barang Jadi - MRS SPP', 6, 'D', 1, '293', 0, '2020-03-31 09:16:09', '2020-03-31 09:16:09'),
	(334, 1, '11401-02', 'Persediaan Barang Jadi - TR', 5, 'D', 0, '26', 0, '2020-03-31 09:23:50', '2020-03-31 09:23:50'),
	(335, 1, '11401-02-01', 'Persediaan Barang Jadi - TR Zuhal', 6, 'D', 1, '334', 0, '2020-03-31 09:24:28', '2020-03-31 09:24:28'),
	(336, 1, '11401-02-02', 'Persediaan Barang Jadi - TR Zuhal 30S', 6, 'D', 1, '334', 0, '2020-03-31 09:25:01', '2020-03-31 09:25:01'),
	(337, 1, '11401-02-03', 'Persediaan Barang Jadi - TR Ardan SKJ', 6, 'D', 1, '334', 0, '2020-03-31 09:25:33', '2020-03-31 09:25:33'),
	(338, 1, '11401-02-04', 'Persediaan Barang Jadi - TR Ardan SKD', 6, 'D', 1, '334', 0, '2020-03-31 09:26:03', '2020-03-31 09:26:03'),
	(339, 1, '11401-02-05', 'Persediaan Barang Jadi - TR Ardan PSD', 6, 'D', 1, '334', 0, '2020-03-31 09:26:35', '2020-03-31 09:26:35'),
	(340, 1, '11401-02-06', 'Persediaan Barang Jadi - TR Ardan SGJ', 6, 'D', 1, '334', 0, '2020-03-31 09:27:09', '2020-03-31 09:27:09'),
	(341, 1, '11401-02-07', 'Persediaan Barang Jadi - TR Ardan SGD', 6, 'D', 1, '334', 0, '2020-03-31 09:27:35', '2020-03-31 09:27:35'),
	(342, 1, '11401-02-08', 'Persediaan Barang Jadi - TR Ardan SDT', 6, 'D', 1, '334', 0, '2020-03-31 09:28:05', '2020-03-31 09:28:05'),
	(343, 1, '11401-02-09', 'Persediaan Barang Jadi - TR Ardan DPC', 6, 'D', 1, '334', 0, '2020-03-31 09:28:34', '2020-03-31 09:28:34'),
	(344, 1, '11401-02-10', 'Persediaan Barang Jadi - TR Ardan JSP', 6, 'D', 1, '334', 0, '2020-03-31 09:28:59', '2020-03-31 09:28:59'),
	(345, 1, '11401-02-11', 'Persediaan Barang Jadi - TR Ardan SGS', 6, 'D', 1, '334', 0, '2020-03-31 09:29:25', '2020-03-31 09:29:25'),
	(346, 1, '11401-02-12', 'Persediaan Barang Jadi - TR Tanpa Tumpal', 6, 'D', 1, '334', 0, '2020-03-31 09:29:52', '2020-03-31 09:29:52'),
	(347, 1, '11401-03', 'Persediaan Barang Jadi - Fiber', 5, 'D', 0, '26', 0, '2020-03-31 09:30:22', '2020-03-31 09:30:22'),
	(348, 1, '11401-03-01', 'Persediaan Barang Jadi - Fiber FBT K', 6, 'D', 1, '347', 0, '2020-03-31 09:30:54', '2020-03-31 09:30:54'),
	(349, 1, '11401-03-02', 'Persediaan Barang Jadi - Fiber FBR Abu Kafar', 6, 'D', 1, '347', 0, '2020-03-31 09:31:20', '2020-03-31 09:31:20'),
	(350, 1, '11401-04', 'Persediaan Barang Jadi - Sutra', 5, 'D', 0, '26', 0, '2020-03-31 09:31:59', '2020-03-31 09:31:59'),
	(351, 1, '11401-04-01', 'Persediaan Barang Jadi - Sutra SSG.210', 6, 'D', 1, '350', 0, '2020-03-31 09:33:26', '2020-03-31 09:33:26'),
	(352, 1, '11401-04-02', 'Persediaan Barang Jadi - Sutra ALF.210', 6, 'D', 1, '350', 0, '2020-03-31 09:33:53', '2020-03-31 09:33:53'),
	(353, 1, '11401-04-03', 'Persediaan Barang Jadi - Sutra SKJ.210 K', 6, 'D', 1, '350', 0, '2020-03-31 09:34:23', '2020-03-31 09:34:23'),
	(354, 1, '11401-04-04', 'Persediaan Barang Jadi - Sutra CTI.210', 6, 'D', 1, '350', 0, '2020-03-31 09:34:53', '2020-03-31 09:34:53'),
	(355, 1, '11401-04-05', 'Persediaan Barang Jadi - Sutra SPI.210', 6, 'D', 1, '350', 0, '2020-03-31 09:35:22', '2020-03-31 09:35:22'),
	(356, 1, '11401-04-06', 'Persediaan Barang Jadi - Sutra TCD.210', 6, 'D', 1, '350', 0, '2020-03-31 09:35:52', '2020-03-31 09:35:52'),
	(357, 1, '11401-04-07', 'Persediaan Barang Jadi - Sutra GSC.210', 6, 'D', 1, '350', 0, '2020-03-31 09:36:18', '2020-03-31 09:36:18'),
	(358, 1, '11401-04-08', 'Persediaan Barang Jadi - Sutra ALF.MR 210 (50%)', 6, 'D', 1, '350', 0, '2020-03-31 09:36:47', '2020-03-31 09:36:47'),
	(359, 1, '11401-04-09', 'Persediaan Barang Jadi - Sutra SPP 210 (50%)', 6, 'D', 1, '350', 0, '2020-03-31 09:37:11', '2020-03-31 09:37:11'),
	(360, 1, '11401-04-10', 'Persediaan Barang Jadi - Sutra SKJ MR 210 (50%)', 6, 'D', 1, '350', 0, '2020-03-31 09:37:34', '2020-03-31 09:37:34'),
	(361, 1, '11401-05', 'Persediaan Barang Jadi - MRS BS', 5, 'D', 0, '26', 0, '2020-03-31 09:38:10', '2020-03-31 09:38:10'),
	(362, 1, '11401-05-01', 'Persediaan Barang Jadi - MRS PGR BS', 6, 'D', 1, '361', 0, '2020-03-31 09:38:42', '2020-03-31 09:38:42'),
	(363, 1, '11401-05-02', 'Persediaan Barang Jadi - MRS KWG BS', 6, 'D', 1, '361', 0, '2020-03-31 09:46:47', '2020-03-31 09:46:47'),
	(364, 1, '11401-05-03', 'Persediaan Barang Jadi - MRS PLS BS', 6, 'D', 1, '361', 0, '2020-03-31 09:47:20', '2020-03-31 09:47:20'),
	(365, 1, '11401-05-04', 'Persediaan Barang Jadi - MRS MST BS', 6, 'D', 1, '361', 0, '2020-03-31 09:49:53', '2020-03-31 09:49:53'),
	(366, 1, '11401-05-05', 'Persediaan Barang Jadi - MRS GLL BS', 6, 'D', 1, '361', 0, '2020-03-31 09:50:24', '2020-03-31 09:50:24'),
	(367, 1, '11401-05-06', 'Persediaan Barang Jadi - MRS TSK BS', 6, 'D', 1, '361', 0, '2020-03-31 09:51:58', '2020-03-31 09:51:58'),
	(368, 1, '11401-05-07', 'Persediaan Barang Jadi - MRS BTN BS', 6, 'D', 1, '361', 0, '2020-03-31 09:52:55', '2020-03-31 09:52:55'),
	(369, 1, '11401-05-08', 'Persediaan Barang Jadi - MRS SKG BS', 6, 'D', 1, '361', 0, '2020-03-31 09:53:30', '2020-03-31 09:53:30'),
	(370, 1, '11401-05-09', 'Persediaan Barang Jadi - MRS TJM BS', 6, 'D', 1, '361', 0, '2020-03-31 09:53:57', '2020-03-31 09:53:57'),
	(371, 1, '11401-05-10', 'Persediaan Barang Jadi - MRS TDP BS', 6, 'D', 1, '361', 0, '2020-03-31 09:54:23', '2020-03-31 09:54:23'),
	(372, 1, '11401-05-11', 'Persediaan Barang Jadi - MRS TSL BS', 6, 'D', 1, '361', 0, '2020-03-31 09:54:48', '2020-03-31 09:54:48'),
	(373, 1, '11401-05-12', 'Persediaan Barang Jadi - MRS STE BS', 6, 'D', 1, '361', 0, '2020-03-31 09:57:29', '2020-03-31 09:57:29'),
	(374, 1, '11401-05-13', 'Persediaan Barang Jadi - MRS TCD BS', 6, 'D', 1, '361', 0, '2020-03-31 09:58:02', '2020-03-31 09:58:02'),
	(375, 1, '11401-05-14', 'Persediaan Barang Jadi - MRS PKC BS', 6, 'D', 1, '361', 0, '2020-03-31 09:58:34', '2020-03-31 09:58:34'),
	(376, 1, '11401-05-15', 'Persediaan Barang Jadi - MRS SGD BS', 6, 'D', 1, '361', 0, '2020-03-31 09:58:58', '2020-03-31 09:58:58'),
	(377, 1, '11401-05-16', 'Persediaan Barang Jadi - MRS JQS BS', 6, 'D', 1, '361', 0, '2020-03-31 09:59:49', '2020-03-31 09:59:49'),
	(378, 1, '11401-05-17', 'Persediaan Barang Jadi - MRS TCC BS', 6, 'D', 1, '361', 0, '2020-03-31 10:03:45', '2020-03-31 10:03:45'),
	(379, 1, '11401-05-18', 'Persediaan Barang Jadi - MRS TCW BS', 6, 'D', 1, '361', 0, '2020-03-31 10:04:19', '2020-03-31 10:04:19'),
	(380, 1, '11401-05-19', 'Persediaan Barang Jadi - MRS STC BS', 6, 'D', 1, '361', 0, '2020-03-31 10:04:46', '2020-03-31 10:04:46'),
	(381, 1, '11401-05-20', 'Persediaan Barang Jadi - MRS DPS BS', 6, 'D', 1, '361', 0, '2020-03-31 10:05:13', '2020-03-31 10:05:13'),
	(382, 1, '11401-05-21', 'Persediaan Barang Jadi - MRS SGW BS', 6, 'D', 1, '361', 0, '2020-03-31 10:05:57', '2020-03-31 10:05:57'),
	(383, 1, '11401-05-22', 'Persediaan Barang Jadi - MRS SKJ BS', 6, 'D', 1, '361', 0, '2020-03-31 10:06:28', '2020-03-31 10:06:28'),
	(384, 1, '11401-05-23', 'Persediaan Barang Jadi - MRS TPI BS', 6, 'D', 1, '361', 0, '2020-03-31 10:07:11', '2020-03-31 10:07:11'),
	(385, 1, '11401-05-24', 'Persediaan Barang Jadi - MRS KSJ BS', 6, 'D', 1, '361', 0, '2020-03-31 10:07:48', '2020-03-31 10:07:48'),
	(386, 1, '11401-05-25', 'Persediaan Barang Jadi - MRS JMJ BS', 6, 'D', 1, '361', 0, '2020-03-31 10:08:16', '2020-03-31 10:08:16'),
	(387, 1, '11401-05-26', 'Persediaan Barang Jadi - MRS SDI BS', 6, 'D', 1, '361', 0, '2020-03-31 10:08:42', '2020-03-31 10:08:42'),
	(388, 1, '11401-05-27', 'Persediaan Barang Jadi - MRS SSI BS', 6, 'D', 1, '361', 0, '2020-03-31 10:09:13', '2020-03-31 10:09:13'),
	(389, 1, '11401-05-28', 'Persediaan Barang Jadi - MRS ALF 100 BS', 6, 'D', 1, '361', 0, '2020-03-31 10:09:37', '2020-03-31 10:09:37'),
	(390, 1, '11401-05-29', 'Persediaan Barang Jadi - MRS GNK BS', 6, 'D', 1, '361', 0, '2020-03-31 10:10:00', '2020-03-31 10:10:00'),
	(391, 1, '11401-05-30', 'Persediaan Barang Jadi - MRS TSI BS', 6, 'D', 1, '361', 0, '2020-03-31 10:10:25', '2020-03-31 10:10:25'),
	(392, 1, '11401-05-31', 'Persediaan Barang Jadi - MRS GRJ BS', 6, 'D', 1, '361', 0, '2020-03-31 10:10:52', '2020-03-31 10:10:52'),
	(393, 1, '11401-05-32', 'Persediaan Barang Jadi - MRS ICE BS', 6, 'D', 1, '361', 0, '2020-03-31 10:11:17', '2020-03-31 10:11:17'),
	(394, 1, '11401-05-33', 'Persediaan Barang Jadi - MRS GTI BS', 6, 'D', 1, '361', 0, '2020-03-31 10:11:46', '2020-03-31 10:11:46'),
	(395, 1, '11401-05-34', 'Persediaan Barang Jadi - MRS JSI BS', 6, 'D', 1, '361', 0, '2020-03-31 10:12:13', '2020-03-31 10:12:13'),
	(396, 1, '11401-05-35', 'Persediaan Barang Jadi - MRS SGI BS', 6, 'D', 1, '361', 0, '2020-03-31 10:12:48', '2020-03-31 10:12:48'),
	(397, 1, '11401-05-36', 'Persediaan Barang Jadi - MRS SKC BS', 6, 'D', 1, '361', 0, '2020-03-31 10:13:18', '2020-03-31 10:13:18'),
	(398, 1, '11401-05-37', 'Persediaan Barang Jadi - MRS SPC BS', 6, 'D', 1, '361', 0, '2020-03-31 10:13:53', '2020-03-31 10:13:53'),
	(399, 1, '11401-05-38', 'Persediaan Barang Jadi - MRS SPD BS', 6, 'D', 1, '361', 0, '2020-03-31 10:14:20', '2020-03-31 10:14:20'),
	(400, 1, '11401-05-39', 'Persediaan Barang Jadi - MRS DPC BS', 6, 'D', 1, '361', 0, '2020-03-31 10:14:48', '2020-03-31 10:14:48'),
	(401, 1, '11401-05-40', 'Persediaan Barang Jadi - MRS SPP BS', 6, 'D', 1, '361', 0, '2020-03-31 10:15:20', '2020-03-31 10:15:20'),
	(402, 1, '11401-06', 'Persediaan Barang Jadi - TR BS', 5, 'D', 0, '26', 0, '2020-03-31 10:16:17', '2020-03-31 10:16:17'),
	(403, 1, '11401-06-01', 'Persediaan Barang Jadi - TR Zuhal BS', 6, 'D', 1, '402', 0, '2020-03-31 10:53:52', '2020-03-31 10:53:52'),
	(404, 1, '11401-06-02', 'Persediaan Barang Jadi - TR Zuhal 30S BS', 6, 'D', 1, '402', 0, '2020-03-31 10:54:30', '2020-03-31 10:54:30'),
	(405, 1, '11401-06-03', 'Persediaan Barang Jadi - TR Ardan SKJ BS', 6, 'D', 1, '402', 0, '2020-03-31 10:55:01', '2020-03-31 10:55:01'),
	(406, 1, '11401-06-04', 'Persediaan Barang Jadi - TR Ardan SKD BS', 6, 'D', 1, '402', 0, '2020-03-31 10:55:30', '2020-03-31 10:55:30'),
	(407, 1, '11401-06-05', 'Persediaan Barang Jadi - TR Ardan PSD BS', 6, 'D', 1, '402', 0, '2020-03-31 10:56:01', '2020-03-31 10:56:01'),
	(408, 1, '11401-06-06', 'Persediaan Barang Jadi - TR Ardan SGJ BS', 6, 'D', 1, '402', 0, '2020-03-31 10:56:28', '2020-03-31 10:56:28'),
	(409, 1, '11401-06-07', 'Persediaan Barang Jadi - TR Ardan SGD BS', 6, 'D', 1, '402', 0, '2020-03-31 10:56:56', '2020-03-31 10:56:56'),
	(410, 1, '11401-06-08', 'Persediaan Barang Jadi - TR Ardan SDT BS', 6, 'D', 1, '402', 0, '2020-03-31 10:57:22', '2020-03-31 10:57:22'),
	(411, 1, '11401-06-09', 'Persediaan Barang Jadi - TR Ardan DPC BS', 6, 'D', 1, '402', 0, '2020-03-31 10:57:48', '2020-03-31 10:57:48'),
	(412, 1, '11401-06-10', 'Persediaan Barang Jadi - TR Ardan JSP BS', 6, 'D', 1, '402', 0, '2020-03-31 10:58:15', '2020-03-31 10:58:15'),
	(413, 1, '11401-06-11', 'Persediaan Barang Jadi - TR Ardan SGS BS', 6, 'D', 1, '402', 0, '2020-03-31 10:58:44', '2020-03-31 10:58:44'),
	(414, 1, '11401-06-12', 'Persediaan Barang Jadi - TR Tanpa Tumpal BS', 6, 'D', 1, '402', 0, '2020-03-31 10:59:11', '2020-03-31 10:59:11'),
	(415, 1, '11401-07', 'Persediaan Barang Jadi - Fiber BS', 5, 'D', 0, '26', 0, '2020-03-31 10:59:46', '2020-03-31 10:59:46'),
	(416, 1, '11401-07-01', 'Persediaan Barang Jadi - Fiber FBT K BS', 6, 'D', 1, '415', 0, '2020-03-31 11:00:57', '2020-03-31 11:00:57'),
	(417, 1, '11401-07-02', 'Persediaan Barang Jadi - Fiber FBR Abu Kafar BS', 6, 'D', 1, '415', 0, '2020-03-31 11:01:46', '2020-03-31 11:01:46'),
	(418, 1, '11401-08', 'Persediaan Barang Jadi - Sutra BS', 5, 'D', 0, '26', 0, '2020-03-31 11:02:18', '2020-03-31 11:02:18'),
	(419, 1, '11401-08-01', 'Persediaan Barang Jadi - Sutra SSG.210 BS', 6, 'D', 1, '418', 0, '2020-03-31 11:02:56', '2020-03-31 11:02:56'),
	(420, 1, '11401-08-02', 'Persediaan Barang Jadi - Sutra ALF.210 BS', 6, 'D', 1, '418', 0, '2020-03-31 11:03:34', '2020-03-31 11:03:34'),
	(421, 1, '11401-08-03', 'Persediaan Barang Jadi - Sutra SKJ.210 K BS', 6, 'D', 1, '418', 0, '2020-03-31 11:04:07', '2020-03-31 11:04:07'),
	(422, 1, '11401-08-04', 'Persediaan Barang Jadi - Sutra CTI.210 BS', 6, 'D', 1, '418', 0, '2020-03-31 11:04:36', '2020-03-31 11:04:36'),
	(423, 1, '11401-08-05', 'Persediaan Barang Jadi - Sutra SPI.210 BS', 6, 'D', 1, '418', 0, '2020-03-31 11:05:15', '2020-03-31 11:05:15'),
	(424, 1, '11401-08-06', 'Persediaan Barang Jadi - Sutra TCD.210 BS', 6, 'D', 1, '418', 0, '2020-03-31 11:05:47', '2020-03-31 11:05:47'),
	(425, 1, '11401-08-07', 'Persediaan Barang Jadi - Sutra GSC.210 BS', 6, 'D', 1, '418', 0, '2020-03-31 11:06:19', '2020-03-31 11:06:19'),
	(426, 1, '11401-08-08', 'Persediaan Barang Jadi - Sutra ALF.MR 210 (50%) BS', 6, 'D', 1, '418', 0, '2020-03-31 11:06:52', '2020-03-31 11:06:52'),
	(427, 1, '11401-08-09', 'Persediaan Barang Jadi - Sutra SPP 210 (50%) BS', 6, 'D', 1, '418', 0, '2020-03-31 11:07:19', '2020-03-31 11:07:19'),
	(428, 1, '11401-08-10', 'Persediaan Barang Jadi - Sutra SKJ MR 210 (50%) BS', 6, 'D', 1, '418', 0, '2020-03-31 11:08:17', '2020-03-31 11:08:17'),
	(429, 1, '11401-09', 'Persediaan Barang Jadi - MRS BS Parah', 5, 'D', 0, '26', 0, '2020-03-31 11:09:43', '2020-03-31 11:09:43'),
	(430, 1, '11401-09-01', 'Persediaan Barang Jadi - MRS PGR BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:10:59', '2020-03-31 11:10:59'),
	(431, 1, '11401-09-02', 'Persediaan Barang Jadi - MRS KWG BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:11:31', '2020-03-31 11:11:31'),
	(432, 1, '11401-09-03', 'Persediaan Barang Jadi - MRS PLS BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:12:07', '2020-03-31 11:12:07'),
	(433, 1, '11401-09-04', 'Persediaan Barang Jadi - MRS MST BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:13:01', '2020-03-31 11:13:01'),
	(434, 1, '11401-09-05', 'Persediaan Barang Jadi - MRS GLL BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:13:42', '2020-03-31 11:13:42'),
	(435, 1, '11401-09-06', 'Persediaan Barang Jadi - MRS TSK BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:14:10', '2020-03-31 11:14:10'),
	(436, 1, '11401-09-07', 'Persediaan Barang Jadi - MRS BTN BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:14:36', '2020-03-31 11:14:36'),
	(437, 1, '11401-09-08', 'Persediaan Barang Jadi - MRS SKG BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:15:33', '2020-03-31 11:15:33'),
	(438, 1, '11401-09-09', 'Persediaan Barang Jadi - MRS TJM BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:16:10', '2020-03-31 11:16:10'),
	(439, 1, '11401-09-10', 'Persediaan Barang Jadi - MRS TDP BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:16:50', '2020-03-31 11:16:50'),
	(440, 1, '11401-09-11', 'Persediaan Barang Jadi - MRS TSL BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:17:30', '2020-03-31 11:17:30'),
	(441, 1, '11401-09-12', 'Persediaan Barang Jadi - MRS STE BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:18:07', '2020-03-31 11:18:07'),
	(442, 1, '11401-09-13', 'Persediaan Barang Jadi - MRS TCD BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:18:47', '2020-03-31 11:18:47'),
	(443, 1, '11401-09-14', 'Persediaan Barang Jadi - MRS PKC BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:19:22', '2020-03-31 11:19:22'),
	(444, 1, '11401-09-15', 'Persediaan Barang Jadi - MRS SGD BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:19:54', '2020-03-31 11:19:54'),
	(445, 1, '11401-09-16', 'Persediaan Barang Jadi - MRS JQS BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:20:21', '2020-03-31 11:20:21'),
	(446, 1, '11401-09-17', 'Persediaan Barang Jadi - MRS TCC BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:20:54', '2020-03-31 11:20:54'),
	(447, 1, '11401-09-18', 'Persediaan Barang Jadi - MRS TCW BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:21:20', '2020-03-31 11:21:20'),
	(448, 1, '11401-09-19', 'Persediaan Barang Jadi - MRS STC BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:21:50', '2020-03-31 11:21:50'),
	(449, 1, '11401-09-20', 'Persediaan Barang Jadi - MRS DPS BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:22:21', '2020-03-31 11:22:21'),
	(450, 1, '11401-09-21', 'Persediaan Barang Jadi - MRS SGW BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:24:48', '2020-03-31 11:24:48'),
	(451, 1, '11401-09-22', 'Persediaan Barang Jadi - MRS SKJ BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:25:16', '2020-03-31 11:25:16'),
	(452, 1, '11401-09-23', 'Persediaan Barang Jadi - MRS TPI BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:25:42', '2020-03-31 11:25:42'),
	(453, 1, '11401-09-24', 'Persediaan Barang Jadi - MRS KSJ BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:26:09', '2020-03-31 11:26:09'),
	(454, 1, '11401-09-25', 'Persediaan Barang Jadi - MRS JMJ BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:26:34', '2020-03-31 11:26:34'),
	(455, 1, '11401-09-26', 'Persediaan Barang Jadi - MRS SDI BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:27:02', '2020-03-31 11:27:02'),
	(456, 1, '11401-09-27', 'Persediaan Barang Jadi - MRS SSI BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:27:26', '2020-03-31 11:27:26'),
	(457, 1, '11401-09-28', 'Persediaan Barang Jadi - MRS ALF 100 BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:27:53', '2020-03-31 11:28:37'),
	(458, 1, '11401-09-29', 'Persediaan Barang Jadi - MRS GNK BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:29:10', '2020-03-31 11:29:10'),
	(459, 1, '11401-09-30', 'Persediaan Barang Jadi - MRS TSI BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:29:42', '2020-03-31 11:29:42'),
	(460, 1, '11401-09-31', 'Persediaan Barang Jadi - MRS GRJ BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:30:37', '2020-03-31 11:30:37'),
	(461, 1, '11401-09-32', 'Persediaan Barang Jadi - MRS ICE BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:31:09', '2020-03-31 11:31:09'),
	(462, 1, '11401-09-33', 'Persediaan Barang Jadi - MRS GTI BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:31:35', '2020-03-31 11:31:35'),
	(463, 1, '11401-09-34', 'Persediaan Barang Jadi - MRS JSI BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:31:59', '2020-03-31 11:31:59'),
	(464, 1, '11401-09-35', 'Persediaan Barang Jadi - MRS SGI BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:32:25', '2020-03-31 11:32:25'),
	(465, 1, '11401-09-36', 'Persediaan Barang Jadi - MRS SKC BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:32:57', '2020-03-31 11:32:57'),
	(466, 1, '11401-09-37', 'Persediaan Barang Jadi - MRS SPC BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:33:22', '2020-03-31 11:33:22'),
	(467, 1, '11401-09-38', 'Persediaan Barang Jadi - MRS SPD BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:33:47', '2020-03-31 11:33:47'),
	(468, 1, '11401-09-39', 'Persediaan Barang Jadi - MRS DPC BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:34:11', '2020-03-31 11:34:11'),
	(469, 1, '11401-09-40', 'Persediaan Barang Jadi - MRS SPP BS Parah', 6, 'D', 1, '429', 0, '2020-03-31 11:34:35', '2020-03-31 11:34:35'),
	(470, 1, '11401-10', 'Persediaan Barang Jadi - TR BS Parah', 5, 'D', 0, '26', 0, '2020-03-31 11:35:37', '2020-03-31 11:35:37'),
	(471, 1, '11401-10-01', 'Persediaan Barang Jadi - TR Zuhal BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:36:14', '2020-03-31 11:36:14'),
	(472, 1, '11401-10-02', 'Persediaan Barang Jadi - TR Zuhal 30S BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:36:38', '2020-03-31 11:36:38'),
	(473, 1, '11401-10-03', 'Persediaan Barang Jadi - TR Ardan SKJ BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:37:04', '2020-03-31 11:37:04'),
	(474, 1, '11401-10-04', 'Persediaan Barang Jadi - TR Ardan SKD BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:37:36', '2020-03-31 11:37:36'),
	(475, 1, '11401-10-05', 'Persediaan Barang Jadi - TR Ardan PSD BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:38:04', '2020-03-31 11:38:04'),
	(476, 1, '11401-10-06', 'Persediaan Barang Jadi - TR Ardan SGJ BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:38:31', '2020-03-31 11:38:31'),
	(477, 1, '11401-10-07', 'Persediaan Barang Jadi - TR Ardan SGD BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:38:58', '2020-03-31 11:38:58'),
	(478, 1, '11401-10-08', 'Persediaan Barang Jadi - TR Ardan SDT BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:39:30', '2020-03-31 11:39:30'),
	(479, 1, '11401-10-09', 'Persediaan Barang Jadi - TR Ardan DPC BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:39:56', '2020-03-31 11:39:56'),
	(480, 1, '11401-10-10', 'Persediaan Barang Jadi - TR Ardan JSP BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:40:20', '2020-03-31 11:40:20'),
	(481, 1, '11401-10-11', 'Persediaan Barang Jadi - TR Ardan SGS BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:40:43', '2020-03-31 11:40:43'),
	(482, 1, '11401-10-12', 'Persediaan Barang Jadi - TR Tanpa Tumpal BS Parah', 6, 'D', 1, '470', 0, '2020-03-31 11:41:10', '2020-03-31 11:41:10'),
	(483, 1, '11401-11', 'Persediaan Barang Jadi - Fiber BS Parah', 5, 'D', 0, '26', 0, '2020-03-31 11:42:04', '2020-03-31 11:42:04'),
	(484, 1, '11401-11-01', 'Persediaan Barang Jadi - Fiber FBT K BS Parah', 6, 'D', 1, '483', 0, '2020-03-31 11:42:31', '2020-03-31 11:42:31'),
	(485, 1, '11401-11-02', 'Persediaan Barang Jadi - Fiber FBR Abu Kafar BS Parah', 6, 'D', 1, '483', 0, '2020-03-31 11:43:31', '2020-03-31 11:43:31'),
	(486, 1, '11401-12', 'Persediaan Barang Jadi - Sutra BS Parah', 5, 'D', 0, '26', 0, '2020-03-31 11:44:06', '2020-03-31 11:44:06'),
	(487, 1, '11401-12-01', 'Persediaan Barang Jadi - Sutra SSG.210 BS Parah', 6, 'D', 1, '486', 0, '2020-03-31 11:44:44', '2020-03-31 11:44:44'),
	(488, 1, '11401-12-02', 'Persediaan Barang Jadi - Sutra ALF.210 BS Parah', 6, 'D', 1, '486', 0, '2020-03-31 11:45:24', '2020-03-31 11:45:24'),
	(489, 1, '11401-12-03', 'Persediaan Barang Jadi - Sutra SKJ.210 K BS Parah', 6, 'D', 1, '486', 0, '2020-03-31 11:45:50', '2020-03-31 11:45:50'),
	(490, 1, '11401-12-04', 'Persediaan Barang Jadi - Sutra CTI.210 BS Parah', 6, 'D', 1, '486', 0, '2020-03-31 11:46:52', '2020-03-31 11:46:52'),
	(491, 1, '11401-12-05', 'Persediaan Barang Jadi - Sutra SPI.210 BS Parah', 6, 'D', 1, '486', 0, '2020-03-31 11:47:17', '2020-03-31 11:47:17'),
	(492, 1, '11401-12-06', 'Persediaan Barang Jadi - Sutra TCD.210 BS Parah', 6, 'D', 1, '486', 0, '2020-03-31 11:47:44', '2020-03-31 11:47:51'),
	(493, 1, '11401-12-07', 'Persediaan Barang Jadi - Sutra GSC.210 BS Parah', 6, 'D', 1, '486', 0, '2020-03-31 11:48:22', '2020-03-31 11:48:22'),
	(494, 1, '11401-12-08', 'Persediaan Barang Jadi - Sutra ALF.MR 210 (50%) BS Parah', 6, 'D', 1, '486', 0, '2020-03-31 11:49:10', '2020-03-31 11:49:10'),
	(495, 1, '11401-12-09', 'Persediaan Barang Jadi - Sutra SPP 210 (50%) BS Parah', 6, 'D', 1, '486', 0, '2020-03-31 11:49:45', '2020-03-31 11:49:45'),
	(496, 1, '11401-12-10', 'Persediaan Barang Jadi - Sutra SKJ MR 210 (50%) BS Parah', 6, 'D', 1, '486', 0, '2020-03-31 11:50:09', '2020-03-31 11:50:09'),
	(497, 1, '11402-01', 'Persediaan Bahan Baku - Benang', 5, 'D', 0, '27', 0, '2020-04-02 08:58:51', '2020-04-02 08:58:51'),
	(498, 1, '11402-01-01', 'Persediaan Bahan Baku - Benang 40/2', 6, 'D', 1, '497', 0, '2020-04-02 08:59:35', '2020-04-02 08:59:35'),
	(499, 1, '11402-01-02', 'Persediaan Bahan Baku - Benang 60/2', 6, 'D', 1, '497', 0, '2020-04-02 09:00:08', '2020-04-02 09:00:08'),
	(500, 1, '11402-01-03', 'Persediaan Bahan Baku - Benang 64/2', 6, 'D', 1, '497', 0, '2020-04-02 09:00:41', '2020-04-02 09:00:41'),
	(501, 1, '11402-01-04', 'Persediaan Bahan Baku - Benang 80/2', 6, 'D', 1, '497', 0, '2020-04-02 09:01:19', '2020-04-02 09:01:19'),
	(502, 1, '11402-01-05', 'Persediaan Bahan Baku - Benang 100/2', 6, 'D', 1, '497', 0, '2020-04-02 09:02:01', '2020-04-02 09:02:01'),
	(503, 1, '11402-01-06', 'Persediaan Bahan Baku - Benang 140/2', 6, 'D', 1, '497', 0, '2020-04-02 09:02:34', '2020-04-02 09:02:34'),
	(504, 1, '11402-01-07', 'Persediaan Bahan Baku - Benang 210/2', 6, 'D', 1, '497', 0, '2020-04-02 09:03:06', '2020-04-02 09:03:06'),
	(505, 1, '11402-01-08', 'Persediaan Bahan Baku - Benang Rayon NE 30S', 6, 'D', 1, '497', 0, '2020-04-02 09:03:40', '2020-04-02 09:03:40'),
	(506, 1, '11402-01-09', 'Persediaan Bahan Baku - Benang Rayon NE 40S', 6, 'D', 1, '497', 0, '2020-04-02 09:04:12', '2020-04-02 09:04:12'),
	(507, 1, '11402-01-10', 'Persediaan Bahan Baku - Benang TR 30', 6, 'D', 1, '497', 0, '2020-04-02 09:04:50', '2020-04-02 09:04:50'),
	(508, 1, '11402-01-11', 'Persediaan Bahan Baku - Benang TR 40', 6, 'D', 1, '497', 0, '2020-04-02 09:05:22', '2020-04-02 09:05:22'),
	(509, 1, '11402-01-12', 'Persediaan Bahan Baku - Benang TR 50/2', 6, 'D', 1, '497', 0, '2020-04-02 09:05:55', '2020-04-02 09:05:55'),
	(510, 1, '11402-01-14', 'Persediaan Bahan Baku - Benang Lainnya', 6, 'D', 1, '497', 0, '2020-04-02 09:06:28', '2020-12-21 14:55:55'),
	(511, 1, '11402-02', 'Persediaan Bahan Baku - Chemical/Obat/Pewarna', 5, 'D', 0, '27', 0, '2020-04-02 09:07:15', '2020-04-02 09:07:15'),
	(512, 1, '11402-02-01', 'Persediaan Bahan Baku - Obat Direk', 6, 'D', 1, '511', 0, '2020-04-02 09:08:06', '2020-04-02 09:08:06'),
	(513, 1, '11402-02-02', 'Persediaan Bahan Baku - Obat Garem', 6, 'D', 1, '511', 0, '2020-04-02 09:08:52', '2020-04-02 09:08:52'),
	(514, 1, '11402-02-03', 'Persediaan Bahan Baku - Obat Indantren', 6, 'D', 1, '511', 0, '2020-04-02 09:09:25', '2020-04-02 09:09:25'),
	(515, 1, '11402-02-04', 'Persediaan Bahan Baku - Obat Naptol', 6, 'D', 1, '511', 0, '2020-04-02 09:09:55', '2020-04-02 09:09:55'),
	(516, 1, '11402-02-05', 'Persediaan Bahan Baku - Obat Reaktif', 6, 'D', 1, '511', 0, '2020-04-02 09:10:23', '2020-04-02 09:10:23'),
	(517, 1, '11402-02-06', 'Persediaan Bahan Baku - Obat Silver', 6, 'D', 1, '511', 0, '2020-04-02 09:10:55', '2020-04-02 09:10:55'),
	(518, 1, '11402-02-07', 'Persediaan Bahan Baku - Obat Lainnya', 6, 'D', 1, '511', 0, '2020-04-02 09:11:23', '2020-04-02 09:11:23'),
	(519, 1, '11403-01', 'Persediaan Bahan Pembantu - Accessories', 5, 'D', 1, '28', 0, '2020-04-02 09:12:41', '2020-04-02 09:12:41'),
	(520, 1, '11403-02', 'Persediaan Bahan Pembantu - Bahan Bakar Batu Bara, Minyak & Kayu', 5, 'D', 1, '28', 0, '2020-04-02 09:13:20', '2020-04-02 09:13:20'),
	(521, 1, '11403-03', 'Persediaan Bahan Pembantu - Benang', 5, 'D', 1, '28', 0, '2020-04-02 09:13:49', '2020-04-02 09:13:49'),
	(522, 1, '11403-04', 'Persediaan Bahan Pembantu - Chemical/Obat', 5, 'D', 1, '28', 0, '2020-04-02 09:15:28', '2020-04-02 09:15:28'),
	(523, 1, '11403-05', 'Persediaan Bahan Pembantu - Lainnya', 5, 'D', 1, '28', 0, '2020-04-02 09:16:03', '2020-04-02 09:16:03'),
	(524, 1, '11404-01', 'Persediaan Barang Dalam Proses - Celup Sangat Damai Sejahtera', 5, 'D', 1, '29', 0, '2020-04-02 09:17:13', '2020-04-02 09:17:13'),
	(525, 1, '11404-02', 'Persediaan Barang Dalam Proses - Celup Javatex Internusa Perkasa', 5, 'D', 1, '29', 0, '2020-04-02 09:17:58', '2020-04-02 09:17:58'),
	(526, 1, '11404-03', 'Persediaan Barang Dalam Proses - Celup Nagamas Kurnia Sejahtera', 5, 'D', 1, '29', 0, '2020-04-02 09:20:49', '2020-04-02 09:20:49'),
	(527, 1, '11404-04', 'Persediaan Barang Dalam Proses - Celup Sumber Agung', 5, 'D', 1, '29', 0, '2020-04-02 09:21:22', '2020-04-02 09:21:22'),
	(528, 1, '11404-05', 'Persediaan Barang Dalam Proses - Finishing Avantex, CV.', 5, 'D', 1, '29', 0, '2020-04-02 09:22:12', '2020-04-02 09:22:12'),
	(529, 1, '11404-06', 'Persediaan Barang Dalam Proses - Finishing Sekar Lima', 5, 'D', 1, '29', 0, '2020-04-02 09:23:18', '2020-04-02 09:23:18'),
	(530, 1, '11404-07', 'Persediaan Barang Dalam Proses - Kanjian Harkatex', 5, 'D', 1, '29', 0, '2020-04-02 09:23:53', '2020-04-02 09:23:53'),
	(531, 1, '11404-08', 'Persediaan Barang Dalam Proses - Kanjian Maratex', 5, 'D', 1, '29', 0, '2020-04-02 09:28:28', '2020-04-02 09:28:28'),
	(532, 1, '11404-09', 'Persediaan Barang Dalam Proses - Cabut Pak Eko', 5, 'D', 1, '29', 0, '2020-04-02 09:31:30', '2020-04-02 09:31:30'),
	(533, 1, '11404-10', 'Persediaan Barang Dalam Proses - Barang Gudang 2', 5, 'D', 1, '29', 0, '2020-04-02 09:32:21', '2020-04-02 09:32:21'),
	(534, 1, '11404-11', 'Persediaan Barang Dalam Proses - Barang Gudang 3', 5, 'D', 1, '29', 0, '2020-04-02 09:33:03', '2020-04-02 09:33:03'),
	(535, 1, '11404-12', 'Persediaan Barang Dalam Proses - Barang Gudang 4', 5, 'D', 1, '29', 0, '2020-04-02 09:33:38', '2020-04-02 09:33:38'),
	(536, 1, '11404-13', 'Persediaan Barang Dalam Proses - Barang Proses Kelos', 5, 'D', 1, '29', 0, '2020-04-02 09:34:11', '2020-04-02 09:34:11'),
	(537, 1, '11404-14', 'Persediaan Barang Dalam Proses - Barang Proses Medang', 5, 'D', 1, '29', 0, '2020-04-02 09:34:48', '2020-04-02 09:34:48'),
	(538, 1, '11404-15', 'Persediaan Barang Dalam Proses - Barang Proses Gambar', 5, 'D', 1, '29', 0, '2020-04-02 09:35:21', '2020-04-02 09:35:21'),
	(539, 1, '11404-16', 'Persediaan Barang Dalam Proses - Barang Proses Iket', 5, 'D', 1, '29', 0, '2020-04-02 09:35:59', '2020-04-02 09:35:59'),
	(540, 1, '11404-17', 'Persediaan Barang Dalam Proses - Barang Proses Ngelir', 5, 'D', 1, '29', 0, '2020-04-02 09:36:31', '2020-04-02 09:36:31'),
	(541, 1, '11404-18', 'Persediaan Barang Dalam Proses - Barang Proses Nutup', 5, 'D', 1, '29', 0, '2020-04-02 09:37:08', '2020-04-02 09:37:08'),
	(542, 1, '11404-19', 'Persediaan Barang Dalam Proses - Barang Proses Klocor', 5, 'D', 1, '29', 0, '2020-04-02 09:37:47', '2020-04-02 09:37:47'),
	(543, 1, '11404-20', 'Persediaan Barang Dalam Proses - Barang Proses Celup 2', 5, 'D', 1, '29', 0, '2020-04-02 09:38:34', '2020-04-02 09:38:34'),
	(544, 1, '11404-21', 'Persediaan Barang Dalam Proses - Barang Proses Netel', 5, 'D', 1, '29', 0, '2020-04-02 09:39:06', '2020-04-02 09:39:06'),
	(545, 1, '11404-22', 'Persediaan Barang Dalam Proses - Barang Proses Buka', 5, 'D', 1, '29', 0, '2020-04-02 09:39:42', '2020-04-02 09:39:42'),
	(546, 1, '11404-23', 'Persediaan Barang Dalam Proses - Barang Proses Sekir', 5, 'D', 1, '29', 0, '2020-04-02 09:40:27', '2020-04-02 09:40:27'),
	(547, 1, '11404-24', 'Persediaan Barang Dalam Proses - Barang Proses Beem', 5, 'D', 1, '29', 0, '2020-04-02 09:41:51', '2020-04-02 09:41:51'),
	(548, 1, '11404-25', 'Persediaan Barang Dalam Proses - Barang Proses Pakan, Dasar, Corak, dll', 5, 'D', 1, '29', 0, '2020-04-02 09:42:24', '2020-04-02 09:42:24'),
	(549, 1, '11404-26', 'Persediaan Barang Dalam Proses - Barang Gudang 5', 5, 'D', 1, '29', 0, '2020-04-02 09:42:55', '2020-04-02 09:42:55'),
	(550, 1, '11404-27', 'Persediaan Barang Dalam Proses - Barang Proses Tenun', 5, 'D', 1, '29', 0, '2020-04-02 09:43:28', '2020-04-02 09:43:28'),
	(551, 1, '11404-28', 'Persediaan Barang Dalam Proses - Barang Gudang 6', 5, 'D', 1, '29', 0, '2020-04-02 09:47:01', '2020-04-02 09:47:01'),
	(552, 1, '11404-29', 'Persediaan Barang Dalam Proses - Barang Gudang 7', 5, 'D', 1, '29', 0, '2020-04-02 09:47:47', '2020-04-02 09:47:47'),
	(553, 1, '11404-30', 'Persediaan Barang Dalam Proses - Barang Proses Dudulan', 5, 'D', 1, '29', 0, '2020-04-02 09:48:51', '2020-04-02 09:48:51'),
	(554, 1, '11404-31', 'Persediaan Barang Dalam Proses - Barang Proses Sambung', 5, 'D', 1, '29', 0, '2020-04-02 09:49:42', '2020-04-02 09:49:42'),
	(555, 1, '11404-32', 'Persediaan Barang Dalam Proses - Barang Proses Finishing 1', 5, 'D', 1, '29', 0, '2020-04-02 09:50:44', '2020-04-02 09:50:44'),
	(556, 1, '11404-33', 'Persediaan Barang Dalam Proses - Barang Proses Finishing Cabut', 5, 'D', 1, '29', 0, '2020-04-02 09:51:24', '2020-04-02 09:51:24'),
	(557, 1, '11404-34', 'Persediaan Barang Dalam Proses - Barang Proses Perbaikan', 5, 'D', 1, '29', 0, '2020-04-02 09:52:20', '2020-04-02 09:52:20'),
	(558, 1, '11404-35', 'Persediaan Barang Dalam Proses - Barang Proses Cucian', 5, 'D', 1, '29', 0, '2020-04-02 09:52:55', '2020-04-02 09:52:55'),
	(559, 1, '11404-36', 'Persediaan Barang Dalam Proses - Barang Proses Finishing 2', 5, 'D', 1, '29', 0, '2020-04-02 09:53:31', '2020-04-02 09:53:31'),
	(560, 1, '11404-37', 'Persediaan Barang Dalam Proses - Barang Proses Potong', 5, 'D', 1, '29', 0, '2020-04-02 09:54:10', '2020-04-02 09:54:10'),
	(561, 1, '11404-38', 'Persediaan Barang Dalam Proses - Barang Proses Gudang 8', 5, 'D', 1, '29', 0, '2020-04-02 09:54:44', '2020-04-02 09:54:44'),
	(562, 1, '11404-39', 'Persediaan Barang Dalam Proses - Barang Proses Jahit Sarung', 5, 'D', 1, '29', 0, '2020-04-02 09:55:16', '2020-04-02 09:55:16'),
	(563, 1, '11404-40', 'Persediaan Barang Dalam Proses - Barang Proses Kebas', 5, 'D', 1, '29', 0, '2020-04-02 09:55:50', '2020-04-02 09:55:50'),
	(564, 1, '11404-41', 'Persediaan Barang Dalam Proses - Barang Proses Periksa Ulang', 5, 'D', 1, '29', 0, '2020-04-02 09:56:22', '2020-04-02 09:56:22'),
	(565, 1, '11404-42', 'Persediaan Barang Dalam Proses - Barang Gudang 9', 5, 'D', 1, '29', 0, '2020-04-02 09:56:51', '2020-04-02 09:56:51'),
	(566, 1, '11404-43', 'Persediaan Barang Dalam Proses - Barang Proses label', 5, 'D', 1, '29', 0, '2020-04-02 09:57:22', '2020-04-02 09:57:22'),
	(567, 1, '11404-44', 'Persediaan Barang Dalam Proses - Barang Proses Seterika', 5, 'D', 1, '29', 0, '2020-04-02 09:57:58', '2020-04-02 09:57:58'),
	(568, 1, '11404-45', 'Persediaan Barang Dalam Proses - Barang Proses Pres', 5, 'D', 1, '29', 0, '2020-04-02 10:02:17', '2020-04-02 10:02:17'),
	(569, 1, '11404-46', 'Persediaan Barang Dalam Proses - Barang Proses Cap/Sablon', 5, 'D', 1, '29', 0, '2020-04-02 10:02:51', '2020-04-02 10:02:51'),
	(570, 1, '11404-47', 'Persediaan Barang Dalam Proses - Barang Proses Gudang 10', 5, 'D', 1, '29', 0, '2020-04-02 10:05:08', '2020-04-02 10:05:08'),
	(571, 1, '11404-48', 'Persediaan Barang Dalam Proses - Barang Proses di ATM Solo', 5, 'D', 0, '29', 0, '2020-04-02 10:05:53', '2020-04-02 10:05:53'),
	(572, 1, '11404-48-01', 'Persediaan Barang Dalam Proses - Barang Proses di ATM Solo Finishing', 6, 'D', 1, '571', 0, '2020-04-02 10:06:50', '2020-04-02 10:06:50'),
	(573, 1, '11404-48-02', 'Persediaan Barang Dalam Proses - Barang Proses di ATM Solo Cabut', 6, 'D', 1, '571', 0, '2020-04-02 10:07:29', '2020-04-02 10:07:29'),
	(574, 1, '11404-48-03', 'Persediaan Barang Dalam Proses - Barang Proses di ATM Solo Cuci', 6, 'D', 1, '571', 0, '2020-04-02 10:08:04', '2020-04-02 10:08:04'),
	(575, 1, '11404-48-04', 'Persediaan Barang Dalam Proses - Barang Proses di ATM Solo Finishing 2', 6, 'D', 1, '571', 0, '2020-04-02 10:08:55', '2020-04-02 10:08:55'),
	(576, 1, '11404-48-05', 'Persediaan Barang Dalam Proses - Barang Proses di ATM Solo Produksi', 6, 'D', 1, '571', 0, '2020-04-02 10:09:41', '2020-04-02 10:09:41'),
	(577, 1, '11404-48-06', 'Persediaan Barang Dalam Proses - Barang Proses di ATM Solo Lainnya', 6, 'D', 1, '571', 0, '2020-04-02 10:10:12', '2020-04-02 10:10:12'),
	(578, 1, '11404-49', 'Persediaan Barang Dalam Proses - Barang Proses di ATM Gresik', 5, 'D', 0, '29', 0, '2020-04-02 10:11:08', '2020-04-02 10:11:08'),
	(579, 1, '11404-49-01', 'Persediaan Barang Dalam Proses - Barang Proses di ATM Gresik Produksi', 6, 'D', 1, '578', 0, '2020-04-02 10:14:27', '2020-04-02 10:14:27'),
	(580, 1, '11404-49-02', 'Persediaan Barang Dalam Proses - Barang Proses di ATM Gresik Lainnya', 6, 'D', 1, '578', 0, '2020-04-02 10:15:02', '2020-04-02 10:15:02'),
	(581, 1, '11404-50', 'Persediaan Barang Dalam Proses - Barang Proses Lainnya', 5, 'D', 1, '29', 0, '2020-04-02 10:16:46', '2020-04-02 10:16:46'),
	(582, 2, '21001-01', 'Hutang Usaha - Abdullah Said', 4, 'K', 1, '205', 0, '2020-04-02 10:19:51', '2020-04-02 10:19:51'),
	(583, 2, '21001-02', 'Hutang Usaha - Abidin', 4, 'K', 1, '205', 0, '2020-04-02 10:20:45', '2020-04-02 10:20:45'),
	(584, 2, '21001-03', 'Hutang Usaha - Ace Hardware', 4, 'K', 1, '205', 0, '2020-04-02 10:21:15', '2020-04-02 10:21:15'),
	(585, 2, '21001-04', 'Hutang Usaha - AG Satu', 4, 'K', 1, '205', 0, '2020-04-02 10:21:44', '2020-04-02 10:21:44'),
	(586, 2, '21001-05', 'Hutang Usaha - Agus', 4, 'K', 1, '205', 0, '2020-04-02 10:22:21', '2020-04-02 10:22:21'),
	(587, 2, '21001-06', 'Hutang Usaha - PT. Dian Kimia Putra', 4, 'K', 1, '205', 0, '2020-04-02 11:00:40', '2020-04-02 11:03:32'),
	(588, 2, '21001-07', 'Hutang Usaha - Agus Zaenal Bandung', 4, 'K', 1, '205', 0, '2020-04-02 11:01:38', '2020-04-02 11:03:41'),
	(589, 2, '21001-08', 'Hutang Usaha - Aimo (Wahyu)', 4, 'K', 1, '205', 0, '2020-04-02 11:02:03', '2020-04-02 11:03:50'),
	(590, 2, '21001-09', 'Hutang Usaha - Aira Advertaising', 4, 'K', 1, '205', 0, '2020-04-02 11:02:34', '2020-04-02 11:03:57'),
	(591, 2, '21001-10', 'Hutang Usaha - Ali Assegaff', 4, 'K', 1, '205', 0, '2020-04-02 11:04:30', '2020-04-02 11:04:30'),
	(592, 2, '21001-11', 'Hutang Usaha - Amak Bamaryam', 4, 'K', 1, '205', 0, '2020-04-02 11:04:56', '2020-04-02 11:04:56'),
	(593, 2, '21001-12', 'Hutang Usaha - Amak Bamaryam (Pendanaan)', 4, 'K', 1, '205', 0, '2020-04-02 11:05:21', '2020-04-02 11:05:31'),
	(594, 2, '21001-13', 'Hutang Usaha - Arie Masita', 4, 'K', 1, '205', 0, '2020-04-02 11:06:01', '2020-04-02 11:06:01'),
	(595, 2, '21001-14', 'Hutang Usaha - Arimbi', 4, 'K', 1, '205', 0, '2020-04-02 11:06:32', '2020-04-02 11:06:32'),
	(596, 2, '21001-15', 'Hutang Usaha - Ax Teknik', 4, 'K', 1, '205', 0, '2020-04-02 11:07:03', '2020-04-02 11:07:03'),
	(597, 2, '21001-16', 'Hutang Usaha - Badjuber Pratama', 4, 'K', 1, '205', 0, '2020-04-02 11:07:37', '2020-04-02 11:07:37'),
	(598, 2, '21001-17', 'Hutang Usaha - Bahagia Bearing', 4, 'K', 1, '205', 0, '2020-04-02 11:08:20', '2020-04-02 11:08:20'),
	(599, 2, '21001-18', 'Hutang Usaha - Bengkel Besi M Udin', 4, 'K', 1, '205', 0, '2020-04-02 11:09:02', '2020-04-02 11:09:02'),
	(600, 2, '21001-19', 'Hutang Usaha - Bengkel Las', 4, 'K', 1, '205', 0, '2020-04-02 11:09:36', '2020-04-02 11:09:36'),
	(601, 2, '21001-20', 'Hutang Usaha - Bpk Gino', 4, 'K', 1, '205', 0, '2020-04-02 11:10:03', '2020-04-02 11:10:03'),
	(602, 2, '21001-21', 'Hutang Usaha - Bpk Hafid', 4, 'K', 1, '205', 0, '2020-04-02 11:10:51', '2020-04-02 11:10:51'),
	(603, 2, '21001-22', 'Hutang Usaha - Bpk Halim', 4, 'K', 1, '205', 0, '2020-04-02 11:11:17', '2020-04-02 11:11:17'),
	(604, 2, '21001-23', 'Hutang Usaha - Bpk Imam', 4, 'K', 1, '205', 0, '2020-04-02 11:12:17', '2020-04-02 11:12:17'),
	(605, 2, '21001-24', 'Hutang Usaha - Bpk. H. Dullah Maki', 4, 'K', 1, '205', 0, '2020-04-02 11:12:43', '2020-11-18 11:26:00'),
	(606, 2, '21001-25', 'Hutang Usaha - Bpk Iwan', 4, 'K', 1, '205', 0, '2020-04-02 11:13:13', '2020-04-02 11:13:13'),
	(607, 2, '21001-26', 'Hutang Usaha - Bpk Pari', 4, 'K', 1, '205', 0, '2020-04-02 11:13:38', '2020-04-02 11:13:38'),
	(608, 2, '21001-27', 'Hutang Usaha - Bpk Parman', 4, 'K', 1, '205', 0, '2020-04-02 11:14:18', '2020-04-02 11:14:18'),
	(609, 2, '21001-28', 'Hutang Usaha - Bpk Sandi', 4, 'K', 1, '205', 0, '2020-04-02 11:15:03', '2020-04-02 11:15:03'),
	(610, 2, '21001-29', 'Hutang Usaha - Bpk Sujari', 4, 'K', 1, '205', 0, '2020-04-02 11:15:38', '2020-04-02 11:15:38'),
	(611, 2, '21001-30', 'Hutang Usaha - Bpk Tadi Jamus', 4, 'K', 1, '205', 0, '2020-04-02 11:16:51', '2020-04-02 11:16:51'),
	(612, 2, '21001-31', 'Hutang Usaha - Bpk Uday', 4, 'K', 1, '205', 0, '2020-04-02 11:17:29', '2020-04-02 11:17:29'),
	(613, 2, '21001-32', 'Hutang Usaha - Bpk Wit Pujo Wiji', 4, 'K', 1, '205', 0, '2020-04-02 11:17:56', '2020-04-02 11:17:56'),
	(614, 2, '21001-33', 'Hutang Usaha - Bpk. Lajim Gresik', 4, 'K', 1, '205', 0, '2020-04-02 11:18:25', '2020-04-02 11:18:25'),
	(615, 2, '21001-34', 'Hutang Usaha - Bpk. Mahmudin', 4, 'K', 1, '205', 0, '2020-04-02 11:19:13', '2020-04-02 11:19:13'),
	(616, 2, '21001-35', 'Hutang Usaha - Bpk. Pri', 4, 'K', 1, '205', 0, '2020-04-02 11:19:43', '2020-04-02 11:19:43'),
	(617, 2, '21001-36', 'Hutang Usaha - Bpk. Sarjito', 4, 'K', 1, '205', 0, '2020-04-02 11:20:13', '2020-04-02 11:20:13'),
	(618, 2, '21001-37', 'Hutang Usaha - Bpk. Sukandar', 4, 'K', 1, '205', 0, '2020-04-02 11:20:39', '2020-04-02 11:20:39'),
	(619, 2, '21001-38', 'Hutang Usaha - Cash', 4, 'K', 1, '205', 0, '2020-04-02 11:21:20', '2020-04-02 11:21:20'),
	(620, 2, '21001-39', 'Hutang Usaha - Cash (Edy Purwanto)', 4, 'K', 1, '205', 0, '2020-04-02 11:21:48', '2020-04-02 11:21:48'),
	(621, 2, '21001-40', 'Hutang Usaha - Cash (Eko)', 4, 'K', 1, '205', 0, '2020-04-02 11:22:34', '2020-04-02 11:22:34'),
	(622, 2, '21001-41', 'Hutang Usaha - Cash (Heru Imam Sayudi)', 4, 'K', 1, '205', 0, '2020-04-02 11:23:22', '2020-04-02 11:23:22'),
	(623, 2, '21001-42', 'Hutang Usaha - Cash (Ridho)', 4, 'K', 1, '205', 0, '2020-04-02 11:23:51', '2020-04-02 11:23:51'),
	(624, 2, '21001-43', 'Hutang Usaha - Cash (Zamroni)', 4, 'K', 1, '205', 0, '2020-04-02 11:24:28', '2020-04-02 11:24:28'),
	(625, 2, '21001-44', 'Hutang Usaha - CV. Ajis Watu Kosek', 4, 'K', 1, '205', 0, '2020-04-02 11:28:06', '2020-04-02 11:28:06'),
	(626, 2, '21001-45', 'Hutang Usaha - CV. Alpha Indotama', 4, 'K', 1, '205', 0, '2020-04-02 11:28:36', '2020-04-02 11:28:36'),
	(627, 2, '21001-46', 'Hutang Usaha - CV. Anugrah Teknik', 4, 'K', 1, '205', 0, '2020-04-02 11:30:56', '2020-04-02 11:30:56'),
	(628, 2, '21001-47', 'Hutang Usaha - CV. Archindo Jaya', 4, 'K', 1, '205', 0, '2020-04-02 11:32:55', '2020-04-02 11:32:55'),
	(629, 2, '21001-48', 'Hutang Usaha - CV. Bengawan', 4, 'K', 1, '205', 0, '2020-04-02 11:33:26', '2020-04-02 11:33:26'),
	(630, 2, '21001-49', 'Hutang Usaha - CV. Buana Patrayasa Warna', 4, 'K', 1, '205', 0, '2020-04-02 11:33:54', '2020-04-02 11:33:54'),
	(631, 2, '21001-50', 'Hutang Usaha - PT. Javatex Internusa Perkasa', 4, 'K', 1, '205', 0, '2020-04-02 11:34:20', '2020-11-18 09:11:28'),
	(632, 2, '21001-51', 'Hutang Usaha - CV. Dita Karya', 4, 'K', 1, '205', 0, '2020-04-02 11:34:49', '2020-04-02 11:34:49'),
	(633, 2, '21001-52', 'Hutang Usaha - CV. Eko Puji Lestari', 4, 'K', 1, '205', 0, '2020-04-02 11:35:19', '2020-04-02 11:35:19'),
	(634, 2, '21001-53', 'Hutang Usaha - CV. Fajar Hamdani', 4, 'K', 1, '205', 0, '2020-04-02 11:35:49', '2020-04-02 11:35:49'),
	(635, 2, '21001-54', 'Hutang Usaha - CV. Gemilang Harapan', 4, 'K', 1, '205', 0, '2020-04-02 11:36:22', '2020-04-02 11:36:22'),
	(636, 2, '21001-55', 'Hutang Usaha - CV. Gendai Niaga', 4, 'K', 1, '205', 0, '2020-04-02 11:36:54', '2020-04-02 11:36:54'),
	(637, 2, '21001-56', 'Hutang Usaha - Rahardjo Bengkel', 4, 'K', 1, '205', 0, '2020-04-02 11:37:50', '2020-04-02 11:37:50'),
	(638, 2, '21001-57', 'Hutang Usaha - CV. Heryanto', 4, 'K', 1, '205', 0, '2020-04-02 11:38:56', '2020-04-02 11:38:56'),
	(639, 2, '21001-58', 'Hutang Usaha - Degree Inspire', 4, 'K', 1, '205', 0, '2020-04-02 11:39:21', '2020-04-02 11:39:21'),
	(640, 2, '21001-59', 'Hutang Usaha - Dwi Bengkel Putra Besi Barokah', 4, 'K', 1, '205', 0, '2020-04-02 11:40:09', '2020-04-02 11:40:09'),
	(641, 2, '21001-60', 'Hutang Usaha - Dystar (Bpk Pradana Waskhita Adi)', 4, 'K', 1, '205', 0, '2020-04-02 11:40:46', '2020-04-02 11:40:46'),
	(642, 2, '21001-61', 'Hutang Usaha - Eka Jaya Ban', 4, 'K', 1, '205', 0, '2020-04-02 11:41:40', '2020-04-02 11:41:40'),
	(643, 2, '21001-62', 'Hutang Usaha - El\'s Computer', 4, 'K', 1, '205', 0, '2020-04-02 11:42:08', '2020-04-02 11:42:08'),
	(644, 2, '21001-63', 'Hutang Usaha - Epson Gallery', 4, 'K', 1, '205', 0, '2020-04-02 11:42:35', '2020-04-02 11:42:35'),
	(645, 2, '21001-64', 'Hutang Usaha - Fauzi Bajuber', 4, 'K', 1, '205', 0, '2020-04-02 11:43:02', '2020-04-02 11:43:02'),
	(646, 2, '21001-65', 'Hutang Usaha - Finishing Avantex', 4, 'K', 1, '205', 0, '2020-04-02 11:43:26', '2020-04-02 11:43:26'),
	(647, 2, '21001-66', 'Hutang Usaha - Finishing Sekar Lima', 4, 'K', 1, '205', 0, '2020-04-02 11:43:54', '2020-04-02 11:43:54'),
	(648, 2, '21001-67', 'Hutang Usaha - Gahtan Bahasuan', 4, 'K', 1, '205', 0, '2020-04-02 11:44:46', '2020-04-02 11:44:46'),
	(649, 2, '21001-68', 'Hutang Usaha - CV. Garuda Mas Lestari', 4, 'K', 1, '205', 0, '2020-04-02 11:45:19', '2020-11-09 14:04:08'),
	(650, 2, '21001-69', 'Hutang Usaha - Gemilang', 4, 'K', 1, '205', 0, '2020-04-02 11:45:49', '2020-04-02 11:45:49'),
	(651, 2, '21001-70', 'Hutang Usaha - Haji Heru', 4, 'K', 1, '205', 0, '2020-04-02 11:46:43', '2020-04-02 11:46:43'),
	(652, 2, '21001-71', 'Hutang Usaha - Hariyanto Santoso', 4, 'K', 1, '205', 0, '2020-04-02 11:47:17', '2020-04-02 11:47:17'),
	(653, 2, '21001-72', 'Hutang Usaha - Hasan Warna', 4, 'K', 1, '205', 0, '2020-04-02 11:47:45', '2020-04-02 11:47:45'),
	(654, 2, '21001-73', 'Hutang Usaha - Herson Enterprise', 4, 'K', 1, '205', 0, '2020-04-02 11:54:50', '2020-04-02 11:54:50'),
	(655, 2, '21001-74', 'Hutang Usaha - Husin Alkhatib', 4, 'K', 1, '205', 0, '2020-04-02 11:55:26', '2020-04-02 11:55:26'),
	(656, 2, '21001-75', 'Hutang Usaha - Ibrahim Bajuber', 4, 'K', 1, '205', 0, '2020-04-02 11:55:51', '2020-04-02 11:55:51'),
	(657, 2, '21001-76', 'Hutang Usaha - Imam Agus', 4, 'K', 1, '205', 0, '2020-04-02 11:56:15', '2020-04-02 11:56:15'),
	(658, 2, '21001-77', 'Hutang Usaha - Induk Warna', 4, 'K', 1, '205', 0, '2020-04-02 11:56:46', '2020-04-02 11:56:46'),
	(659, 2, '21001-78', 'Hutang Usaha - Interactive', 4, 'K', 1, '205', 0, '2020-04-02 11:57:14', '2020-04-02 11:57:14'),
	(660, 2, '21001-79', 'Hutang Usaha - Ira Print', 4, 'K', 1, '205', 0, '2020-04-02 11:58:07', '2020-04-02 11:58:07'),
	(661, 2, '21001-80', 'Hutang Usaha - Jasa Cabut Bpk. Eko', 4, 'K', 1, '205', 0, '2020-04-02 11:58:45', '2020-04-02 11:58:45'),
	(662, 2, '21001-81', 'Hutang Usaha - John Suhartono', 4, 'K', 1, '205', 0, '2020-04-02 11:59:11', '2020-04-02 11:59:11'),
	(663, 2, '21001-82', 'Hutang Usaha - Kayu Wangi', 4, 'K', 1, '205', 0, '2020-04-02 11:59:45', '2020-04-02 11:59:45'),
	(664, 2, '21001-83', 'Hutang Usaha - Lina Bakti Jaya', 4, 'K', 1, '205', 0, '2020-04-02 12:00:27', '2020-04-02 12:00:27'),
	(665, 2, '21001-84', 'Hutang Usaha - Mahmud Mahdami', 4, 'K', 1, '205', 0, '2020-04-02 12:01:26', '2020-04-02 12:01:26'),
	(666, 2, '21001-85', 'Hutang Usaha - Manfaat Gresik', 4, 'K', 1, '205', 0, '2020-04-02 12:02:02', '2020-04-02 12:02:02'),
	(667, 2, '21001-86', 'Hutang Usaha - Mapan Persada Teknik', 4, 'K', 1, '205', 0, '2020-04-02 12:04:33', '2020-04-02 12:04:33'),
	(668, 2, '21001-87', 'Hutang Usaha - Masykur', 4, 'K', 1, '205', 0, '2020-04-02 12:05:16', '2020-04-02 12:05:16'),
	(669, 2, '21001-88', 'Hutang Usaha - Metal Bearing', 4, 'K', 1, '205', 0, '2020-04-02 12:05:43', '2020-04-02 12:05:43'),
	(670, 2, '21001-89', 'Hutang Usaha - Misran Jaya Teknik', 4, 'K', 1, '205', 0, '2020-04-02 12:06:09', '2020-04-02 12:06:09'),
	(671, 2, '21001-90', 'Hutang Usaha - Mitra Jaya/Bpk Tardi', 4, 'K', 1, '205', 0, '2020-04-02 12:06:33', '2020-04-02 12:06:33'),
	(672, 2, '21001-91', 'Hutang Usaha - Mitsubishi Motors', 4, 'K', 1, '205', 0, '2020-04-02 12:07:09', '2020-04-02 12:07:09'),
	(673, 2, '21001-92', 'Hutang Usaha - MMT', 4, 'K', 1, '205', 0, '2020-04-02 12:07:34', '2020-04-02 12:07:34'),
	(674, 2, '21001-93', 'Hutang Usaha - Morowudi', 4, 'K', 1, '205', 0, '2020-04-02 12:08:04', '2020-04-02 12:08:04'),
	(675, 2, '21001-94', 'Hutang Usaha - Mulia Jaya Gresik', 4, 'K', 1, '205', 0, '2020-04-02 12:08:38', '2020-04-02 12:08:38'),
	(676, 2, '21001-95', 'Hutang Usaha - Mutiara Motor', 4, 'K', 1, '205', 0, '2020-04-02 12:09:27', '2020-04-02 12:09:27'),
	(677, 2, '21001-96', 'Hutang Usaha - Optik Dua Putri', 4, 'K', 1, '205', 0, '2020-04-02 12:09:51', '2020-04-02 12:09:51'),
	(678, 2, '21001-97', 'Hutang Usaha - PD Prisma', 4, 'K', 1, '205', 0, '2020-04-02 12:10:38', '2020-04-02 12:10:38'),
	(679, 2, '21001-98', 'Hutang Usaha - Percetakan Merdeka', 4, 'K', 1, '205', 0, '2020-04-02 12:11:18', '2020-04-02 12:11:18'),
	(680, 2, '21001-99', 'Hutang Usaha - Perdana Cell Gresik', 4, 'K', 1, '205', 0, '2020-04-02 12:11:42', '2020-04-02 12:11:42'),
	(681, 2, '21001-100', 'Hutang Usaha - Pertamina Gresik', 4, 'K', 1, '205', 0, '2020-04-02 12:12:15', '2020-04-02 12:12:15'),
	(682, 2, '21001-101', 'Hutang Usaha - Proyek Gunung Wijil', 4, 'K', 1, '205', 0, '2020-04-02 12:12:43', '2020-04-02 12:12:43'),
	(683, 2, '21001-102', 'Hutang Usaha - Proyek Pabrik Solo', 4, 'K', 1, '205', 0, '2020-04-02 12:13:25', '2020-04-02 12:13:25'),
	(684, 2, '21001-103', 'Hutang Usaha - PT. Adiwijaya Sejati Texindo', 4, 'K', 1, '205', 0, '2020-04-02 12:13:51', '2020-04-02 12:13:51'),
	(685, 2, '21001-104', 'Hutang Usaha - PT. Agung Sejahtera Sidoraharjatex', 4, 'K', 1, '205', 0, '2020-04-02 12:14:23', '2020-04-02 12:14:23'),
	(686, 2, '21001-105', 'Hutang Usaha - PT. Angkurbuhmi Madyapratama', 4, 'K', 1, '205', 0, '2020-04-02 12:17:12', '2020-04-02 12:17:12'),
	(687, 2, '21001-106', 'Hutang Usaha - PT. Antika Bengawan Perkasa', 4, 'K', 1, '205', 0, '2020-04-02 12:18:10', '2020-04-02 12:18:10'),
	(688, 2, '21001-107', 'Hutang Usaha - PT. Anugrah Tritunggal Perkasa Sejati', 4, 'K', 1, '205', 0, '2020-04-02 12:20:09', '2020-04-02 12:20:09'),
	(689, 2, '21001-108', 'Hutang Usaha - PT. Berlian Gunung Mas', 4, 'K', 1, '205', 0, '2020-04-02 12:20:44', '2020-04-02 12:20:44'),
	(690, 2, '21001-109', 'Hutang Usaha - PT. Bintang Pioner Makmur', 4, 'K', 1, '205', 0, '2020-04-02 12:21:13', '2020-04-02 12:21:13'),
	(691, 2, '21001-110', 'Hutang Usaha - PT. Brataco', 4, 'K', 1, '205', 0, '2020-04-02 12:21:45', '2020-04-02 12:21:45'),
	(692, 2, '21001-111', 'Hutang Usaha - PT. Briket Batubara', 4, 'K', 1, '205', 0, '2020-04-02 12:22:14', '2020-04-02 12:22:14'),
	(693, 2, '21001-112', 'Hutang Usaha - PT. Bukit Asam', 4, 'K', 1, '205', 0, '2020-04-02 12:22:42', '2020-04-02 12:22:42'),
	(694, 2, '21001-113', 'Hutang Usaha - PT. Cemako Lestari Indonesia', 4, 'K', 1, '205', 0, '2020-04-02 12:24:47', '2020-04-02 12:24:47'),
	(695, 2, '21001-114', 'Hutang Usaha - PT. Denisindo Pratama', 4, 'K', 1, '205', 0, '2020-04-02 12:25:17', '2020-04-02 12:25:17'),
	(696, 2, '21001-115', 'Hutang Usaha - PT. Dharma Anugerah Indah', 4, 'K', 1, '205', 0, '2020-04-02 12:25:44', '2020-04-02 12:25:44'),
	(697, 2, '21001-116', 'Hutang Usaha - PT. Excellence Qualities Yarn', 4, 'K', 1, '205', 0, '2020-04-02 12:26:24', '2020-04-02 12:26:24'),
	(698, 2, '21001-117', 'Hutang Usaha - PT. Hansung Technology Indonesia', 4, 'K', 1, '205', 0, '2020-04-02 12:26:49', '2020-04-02 12:26:49'),
	(699, 2, '21001-118', 'Hutang Usaha - PT. Karunia Mitra Sukses Abadi', 4, 'K', 1, '205', 0, '2020-04-02 12:27:35', '2020-04-02 12:27:35'),
	(700, 2, '21001-119', 'Hutang Usaha - PT. Mitsui Leasing Capital Indonesia', 4, 'K', 1, '205', 0, '2020-04-02 12:28:29', '2020-04-02 12:28:29'),
	(701, 2, '21001-120', 'Hutang Usaha - PT. Murni Solusindo Nusantara', 4, 'K', 1, '205', 0, '2020-04-02 12:28:55', '2020-04-02 12:28:55'),
	(702, 2, '21001-121', 'Hutang Usaha - PT. National Label Umas Daya', 4, 'K', 1, '205', 0, '2020-04-02 12:30:04', '2020-04-02 12:30:04'),
	(703, 2, '21001-122', 'Hutang Usaha - PT. Panca Bintang Tunggal Sejahtera', 4, 'K', 1, '205', 0, '2020-04-02 12:30:31', '2020-04-02 12:30:31'),
	(704, 2, '21001-123', 'Hutang Usaha - PT. Pandu Harja Utama', 4, 'K', 1, '205', 0, '2020-04-02 12:30:57', '2020-04-02 12:30:57'),
	(705, 2, '21001-124', 'Hutang Usaha - PT. Puji Lestari Purnama', 4, 'K', 1, '205', 0, '2020-04-02 12:31:24', '2020-04-02 12:31:24'),
	(706, 2, '21001-125', 'Hutang Usaha - PT. Raja Batu Bara Indonesia', 4, 'K', 1, '205', 0, '2020-04-02 12:31:52', '2020-04-02 12:31:52'),
	(707, 2, '21001-126', 'Hutang Usaha - PT. Sangat Damai Sejahtera', 4, 'K', 1, '205', 0, '2020-04-02 12:32:24', '2020-04-02 12:32:24'),
	(708, 2, '21001-127', 'Hutang Usaha - PT. Sarichem Polywarna', 4, 'K', 1, '205', 0, '2020-04-02 12:34:18', '2020-04-02 12:34:18'),
	(709, 2, '21001-128', 'Hutang Usaha - PT. Srikandi Diamon Motors', 4, 'K', 1, '205', 0, '2020-04-02 12:34:45', '2020-04-02 12:34:45'),
	(710, 2, '21001-129', 'Hutang Usaha - PT. Sriwahana Adityakarta', 4, 'K', 1, '205', 0, '2020-04-02 12:35:11', '2020-04-02 12:35:11'),
	(711, 2, '21001-130', 'Hutang Usaha - PT. Sumber Harapan Berkah', 4, 'K', 1, '205', 0, '2020-04-02 12:36:14', '2020-04-02 12:36:14'),
	(712, 2, '21001-131', 'Hutang Usaha - PT. Sumber Murni Sejahtera', 4, 'K', 1, '205', 0, '2020-04-02 12:36:46', '2020-04-02 12:36:46'),
	(713, 2, '21001-132', 'Hutang Usaha - Raja komputer', 4, 'K', 1, '205', 0, '2020-04-02 12:37:05', '2020-04-02 12:37:35'),
	(714, 2, '21001-133', 'Hutang Usaha - Ramayana Print', 4, 'K', 1, '205', 0, '2020-04-02 12:38:02', '2020-04-02 12:38:02'),
	(715, 2, '21001-134', 'Hutang Usaha - Rexacom KIG', 4, 'K', 1, '205', 0, '2020-04-02 12:38:36', '2020-04-02 12:38:36'),
	(716, 2, '21001-135', 'Hutang Usaha - Rini', 4, 'K', 1, '205', 0, '2020-04-02 12:39:04', '2020-04-02 12:39:04'),
	(717, 2, '21001-136', 'Hutang Usaha - RJ Steel Gresik', 4, 'K', 1, '205', 0, '2020-04-02 12:39:30', '2020-04-02 12:39:30'),
	(718, 2, '21001-137', 'Hutang Usaha - Sahid Gypsum', 4, 'K', 1, '205', 0, '2020-04-02 12:39:53', '2020-04-02 12:39:53'),
	(719, 2, '21001-138', 'Hutang Usaha - Sari Warna Asli', 4, 'K', 1, '205', 0, '2020-04-02 12:40:24', '2020-04-02 12:40:24'),
	(720, 2, '21001-139', 'Hutang Usaha - Sejahtera Teknik', 4, 'K', 1, '205', 0, '2020-04-02 12:40:52', '2020-04-02 12:40:52'),
	(721, 2, '21001-140', 'Hutang Usaha - Shop & Drive', 4, 'K', 1, '205', 0, '2020-04-02 12:41:29', '2020-04-02 12:41:29'),
	(722, 2, '21001-141', 'Hutang Usaha - Sinar Baru (Malik)', 4, 'K', 1, '205', 0, '2020-04-02 12:42:10', '2020-04-02 12:42:10'),
	(723, 2, '21001-142', 'Hutang Usaha - Sinar Nota', 4, 'K', 1, '205', 0, '2020-04-02 12:42:35', '2020-04-02 12:42:35'),
	(724, 2, '21001-143', 'Hutang Usaha - SKM Dealer Surakarta', 4, 'K', 1, '205', 0, '2020-04-02 12:43:04', '2020-04-02 12:43:04'),
	(725, 2, '21001-144', 'Hutang Usaha - Sofia Moslem Store', 4, 'K', 1, '205', 0, '2020-04-02 12:43:33', '2020-04-02 12:43:33'),
	(726, 2, '21001-145', 'Hutang Usaha - Sriwahana Adityakarta', 4, 'K', 1, '205', 0, '2020-04-02 12:44:01', '2020-04-02 12:44:01'),
	(727, 2, '21001-146', 'Hutang Usaha - Sriyamto Teknik', 4, 'K', 1, '205', 0, '2020-04-02 12:45:04', '2020-04-02 12:45:04'),
	(728, 2, '21001-147', 'Hutang Usaha - Stellano', 4, 'K', 1, '205', 0, '2020-04-02 12:45:27', '2020-04-02 12:45:27'),
	(729, 2, '21001-148', 'Hutang Usaha - Suara Muslim', 4, 'K', 1, '205', 0, '2020-04-02 12:45:51', '2020-04-02 12:45:51'),
	(730, 2, '21001-149', 'Hutang Usaha - Suhud Samidyo', 4, 'K', 1, '205', 0, '2020-04-02 12:46:21', '2020-04-02 12:46:21'),
	(731, 2, '21001-150', 'Hutang Usaha - Sumber Jaya Listrik', 4, 'K', 1, '205', 0, '2020-04-02 12:46:46', '2020-04-02 12:46:46'),
	(732, 2, '21001-151', 'Hutang Usaha - Sumber Jaya Rejeki', 4, 'K', 1, '205', 0, '2020-04-02 12:47:09', '2020-04-02 12:47:09'),
	(733, 2, '21001-152', 'Hutang Usaha - Super Star', 4, 'K', 1, '205', 0, '2020-04-02 12:47:30', '2020-04-02 12:47:30'),
	(734, 2, '21001-153', 'Hutang Usaha - Sutardi/Mitra Jaya', 4, 'K', 1, '205', 0, '2020-04-02 12:47:56', '2020-04-02 12:47:56'),
	(735, 2, '21001-154', 'Hutang Usaha - T.H', 4, 'K', 1, '205', 0, '2020-04-02 12:48:23', '2020-04-02 12:48:23'),
	(736, 2, '21001-155', 'Hutang Usaha - Tenun Hakatex', 4, 'K', 1, '205', 0, '2020-04-02 12:48:53', '2020-04-02 12:48:53'),
	(737, 2, '21001-156', 'Hutang Usaha - Toko A3 Jaya', 4, 'K', 1, '205', 0, '2020-04-02 12:49:18', '2020-04-02 12:49:18'),
	(738, 2, '21001-157', 'Hutang Usaha - Toko Bares Surabaya', 4, 'K', 1, '205', 0, '2020-04-02 12:49:42', '2020-04-02 12:49:42'),
	(739, 2, '21001-158', 'Hutang Usaha - Toko Central IT', 4, 'K', 1, '205', 0, '2020-04-02 12:50:11', '2020-04-02 12:50:11'),
	(740, 2, '21001-159', 'Hutang Usaha - Toko Di Pasar', 4, 'K', 1, '205', 0, '2020-04-02 12:50:35', '2020-04-02 12:50:35'),
	(741, 2, '21001-160', 'Hutang Usaha - Toko Dunia Elektronik', 4, 'K', 1, '205', 0, '2020-04-02 12:51:07', '2020-04-02 12:51:07'),
	(742, 2, '21001-161', 'Hutang Usaha - Toko Ema', 4, 'K', 1, '205', 0, '2020-04-02 12:51:32', '2020-04-02 12:51:32'),
	(743, 2, '21001-162', 'Hutang Usaha - Toko Gajah Mungkur', 4, 'K', 1, '205', 0, '2020-04-02 12:52:10', '2020-04-02 12:52:10'),
	(744, 2, '21001-163', 'Hutang Usaha - Toko Grand Plus', 4, 'K', 1, '205', 0, '2020-04-02 12:52:36', '2020-04-02 12:52:36'),
	(745, 2, '21001-164', 'Hutang Usaha - Toko Laptop Pahlawan', 4, 'K', 1, '205', 0, '2020-04-02 12:53:00', '2020-04-02 12:53:00'),
	(746, 2, '21001-165', 'Hutang Usaha - Toko Muncul', 4, 'K', 1, '205', 0, '2020-04-02 12:53:25', '2020-04-02 12:53:25'),
	(747, 2, '21001-166', 'Hutang Usaha - Toko Nelayan', 4, 'K', 1, '205', 0, '2020-04-02 12:53:47', '2020-04-02 12:53:47'),
	(748, 2, '21001-167', 'Hutang Usaha - Toko Pangsud', 4, 'K', 1, '205', 0, '2020-04-02 12:54:10', '2020-04-02 12:54:10'),
	(749, 2, '21001-168', 'Hutang Usaha - Toko Pasar Gede Solo', 4, 'K', 1, '205', 0, '2020-04-02 12:54:33', '2020-04-02 12:54:33'),
	(750, 2, '21001-169', 'Hutang Usaha - Toko Presisi', 4, 'K', 1, '205', 0, '2020-04-02 12:54:57', '2020-04-02 12:54:57'),
	(751, 2, '21001-170', 'Hutang Usaha - Toko Puji Jaya', 4, 'K', 1, '205', 0, '2020-04-02 12:55:22', '2020-04-02 12:55:22'),
	(752, 2, '21001-171', 'Hutang Usaha - Toko Sari Murni', 4, 'K', 1, '205', 0, '2020-04-02 12:55:54', '2020-04-02 12:55:54'),
	(753, 2, '21001-172', 'Hutang Usaha - Toko Sumber Hidup', 4, 'K', 1, '205', 0, '2020-04-02 12:56:19', '2020-04-02 12:56:19'),
	(754, 2, '21001-173', 'Hutang Usaha - Toko Sumber Jaya', 4, 'K', 1, '205', 0, '2020-04-02 12:56:50', '2020-04-02 12:56:50'),
	(755, 2, '21001-174', 'Hutang Usaha - Toko Wijaya', 4, 'K', 1, '205', 0, '2020-04-02 12:57:17', '2020-04-02 12:57:17'),
	(756, 2, '21001-175', 'Hutang Usaha - Topaz Interior', 4, 'K', 1, '205', 0, '2020-04-02 12:57:47', '2020-04-02 12:57:47'),
	(757, 2, '21001-176', 'Hutang Usaha - UD. Arafah', 4, 'K', 1, '205', 0, '2020-04-02 12:58:13', '2020-04-02 12:58:13'),
	(758, 2, '21001-177', 'Hutang Usaha - UD. Bakti', 4, 'K', 1, '205', 0, '2020-04-02 12:58:39', '2020-04-02 12:58:39'),
	(759, 2, '21001-178', 'Hutang Usaha - UD. Bayu Abadi', 4, 'K', 1, '205', 0, '2020-04-02 12:59:09', '2020-04-02 12:59:09'),
	(760, 2, '21001-179', 'Hutang Usaha - UD. Garuda Teknik', 4, 'K', 1, '205', 0, '2020-04-02 12:59:35', '2020-04-02 12:59:35'),
	(761, 2, '21001-180', 'Hutang Usaha - UD. Jaya Mulya Anugerah', 4, 'K', 1, '205', 0, '2020-04-02 13:00:08', '2020-04-02 13:00:08'),
	(762, 2, '21001-181', 'Hutang Usaha - UD. Nasional Surabaya', 4, 'K', 1, '205', 0, '2020-04-02 13:00:33', '2020-04-02 13:00:33'),
	(763, 2, '21001-182', 'Hutang Usaha - UD. Sanda Permai', 4, 'K', 1, '205', 0, '2020-04-02 13:00:59', '2020-04-02 13:00:59'),
	(764, 2, '21001-183', 'Hutang Usaha - UD. Sumber Makmur', 4, 'K', 1, '205', 0, '2020-04-02 13:01:24', '2020-04-02 13:01:24'),
	(765, 2, '21001-184', 'Hutang Usaha - UD. Warna Jaya', 4, 'K', 1, '205', 0, '2020-04-02 13:01:57', '2020-04-02 13:01:57'),
	(766, 2, '21001-185', 'Hutang Usaha - Warna Agung', 4, 'K', 1, '205', 0, '2020-04-02 13:02:21', '2020-04-02 13:02:21'),
	(767, 2, '21001-186', 'Hutang Usaha - Warna Benang Gemilang', 4, 'K', 1, '205', 0, '2020-04-02 13:02:56', '2020-04-02 13:02:56'),
	(768, 2, '21001-187', 'Hutang Usaha - Warna Indah', 4, 'K', 1, '205', 0, '2020-04-02 13:03:20', '2020-04-02 13:03:20'),
	(769, 2, '21001-188', 'Hutang Usaha - WCG/Eko Design Ardan', 4, 'K', 1, '205', 0, '2020-04-02 13:03:47', '2020-04-02 13:03:47'),
	(770, 2, '21001-189', 'Hutang Usaha - Widarto', 4, 'K', 1, '205', 0, '2020-04-02 13:04:16', '2020-04-02 13:04:16'),
	(771, 2, '21001-190', 'Hutang Usaha - Wiryawan Arya', 4, 'K', 1, '205', 0, '2020-04-02 13:04:51', '2020-04-02 13:04:51'),
	(772, 2, '21001-191', 'Hutang Usaha - Yauman', 4, 'K', 1, '205', 0, '2020-04-02 13:06:17', '2020-04-02 13:06:17'),
	(773, 2, '21001-192', 'Hutang Usaha - Yusuf', 4, 'K', 1, '205', 0, '2020-04-02 13:06:49', '2020-04-02 13:06:49'),
	(774, 2, '21001-193', 'Hutang Usaha - Zaki Abdul Kadir', 4, 'K', 1, '205', 0, '2020-04-02 13:07:14', '2020-04-02 13:07:14'),
	(775, 2, '21001-194', 'Hutang Usaha - Lainnya', 4, 'K', 1, '205', 0, '2020-04-02 13:07:35', '2020-04-02 13:07:35'),
	(776, 4, '41001', 'Penjualan - MRS', 3, 'K', 0, '90', 0, '2020-04-03 19:01:24', '2020-04-03 19:01:44'),
	(777, 4, '41001-01', 'Penjualan - MRS PGR', 4, 'K', 1, '776', 0, '2020-04-03 19:02:34', '2020-04-03 19:02:34'),
	(778, 4, '41001-02', 'Penjualan - MRS KWG', 4, 'K', 1, '776', 0, '2020-04-03 19:03:16', '2020-04-03 19:03:16'),
	(779, 4, '41001-03', 'Penjualan - MRS PLS', 4, 'K', 1, '776', 0, '2020-04-03 19:03:44', '2020-04-03 19:03:44'),
	(780, 4, '41001-04', 'Penjualan - MRS MST', 4, 'K', 1, '776', 0, '2020-04-03 19:04:20', '2020-04-03 19:04:20'),
	(781, 4, '41001-05', 'Penjualan - MRS GLL', 4, 'K', 1, '776', 0, '2020-04-03 19:04:48', '2020-04-03 19:04:48'),
	(782, 4, '41001-06', 'Penjualan - MRS TSK', 4, 'K', 1, '776', 0, '2020-04-03 19:05:24', '2020-04-03 19:05:24'),
	(783, 4, '41001-07', 'Penjualan - MRS BTN', 4, 'K', 1, '776', 0, '2020-04-03 19:06:17', '2020-04-03 19:06:17'),
	(784, 4, '41001-08', 'Penjualan - MRS SKG', 4, 'K', 1, '776', 0, '2020-04-03 19:07:21', '2020-04-03 19:07:21'),
	(785, 4, '41001-09', 'Penjualan - MRS TJM', 4, 'K', 1, '776', 0, '2020-04-03 19:08:15', '2020-04-03 19:08:15'),
	(786, 4, '41001-10', 'Penjualan - MRS TDP', 4, 'K', 1, '776', 0, '2020-04-03 19:08:47', '2020-04-03 19:08:47'),
	(787, 4, '41001-11', 'Penjualan - MRS TSL', 4, 'K', 1, '776', 0, '2020-04-03 19:09:37', '2020-04-03 19:09:37'),
	(788, 4, '41001-12', 'Penjualan - MRS STE', 4, 'K', 1, '776', 0, '2020-04-03 19:10:34', '2020-04-03 19:10:34'),
	(789, 4, '41001-13', 'Penjualan - MRS TCD', 4, 'K', 1, '776', 0, '2020-04-03 19:11:04', '2020-04-03 19:11:04'),
	(790, 4, '41001-14', 'Penjualan - MRS PKC', 4, 'K', 1, '776', 0, '2020-04-03 19:11:39', '2020-04-03 19:11:39'),
	(791, 4, '41001-15', 'Penjualan - MRS SGD', 4, 'K', 1, '776', 0, '2020-04-03 19:12:21', '2020-04-03 19:12:21'),
	(792, 4, '41001-16', 'Penjualan - MRS JQS', 4, 'K', 1, '776', 0, '2020-04-03 19:13:18', '2020-04-03 19:13:18'),
	(793, 4, '41001-17', 'Penjualan - MRS TCC', 4, 'K', 1, '776', 0, '2020-04-03 19:14:53', '2020-04-03 19:14:53'),
	(794, 4, '41001-18', 'Penjualan - MRS TCW', 4, 'K', 1, '776', 0, '2020-04-03 19:15:56', '2020-04-03 19:15:56'),
	(795, 4, '41001-19', 'Penjualan - MRS STC', 4, 'K', 1, '776', 0, '2020-04-03 19:16:34', '2020-04-03 19:16:34'),
	(796, 4, '41001-20', 'Penjualan - MRS DPS', 4, 'K', 1, '776', 0, '2020-04-03 19:17:18', '2020-04-03 19:17:18'),
	(797, 4, '41001-21', 'Penjualan - MRS SGW', 4, 'K', 1, '776', 0, '2020-04-03 19:17:49', '2020-04-03 19:17:49'),
	(798, 4, '41001-22', 'Penjualan - MRS SKJ', 4, 'K', 1, '776', 0, '2020-04-03 19:18:22', '2020-04-03 19:18:22'),
	(799, 4, '41001-23', 'Penjualan - MRS TPI', 4, 'K', 1, '776', 0, '2020-04-03 19:18:52', '2020-04-03 19:18:52'),
	(800, 4, '41001-24', 'Penjualan - MRS KSJ', 4, 'K', 1, '776', 0, '2020-04-03 19:19:23', '2020-04-03 19:19:23'),
	(801, 4, '41001-25', 'Penjualan - MRS JMJ', 4, 'K', 1, '776', 0, '2020-04-03 19:19:56', '2020-04-03 19:19:56'),
	(802, 4, '41001-26', 'Penjualan - MRS SDI', 4, 'K', 1, '776', 0, '2020-04-03 19:20:43', '2020-04-03 19:20:43'),
	(803, 4, '41001-27', 'Penjualan - MRS SSI', 4, 'K', 1, '776', 0, '2020-04-03 19:21:26', '2020-04-03 19:21:26'),
	(804, 4, '41001-28', 'Penjualan - MRS ALF 100', 4, 'K', 1, '776', 0, '2020-04-03 19:21:54', '2020-04-03 19:21:54'),
	(805, 4, '41001-29', 'Penjualan - MRS GNK', 4, 'K', 1, '776', 0, '2020-04-03 19:22:24', '2020-04-03 19:22:24'),
	(806, 4, '41001-30', 'Penjualan - MRS TSI', 4, 'K', 1, '776', 0, '2020-04-03 19:23:04', '2020-04-03 19:23:04'),
	(807, 4, '41001-31', 'Penjualan - MRS GRJ', 4, 'K', 1, '776', 0, '2020-04-03 19:23:34', '2020-04-03 19:23:34'),
	(808, 4, '41001-32', 'Penjualan - MRS ICE', 4, 'K', 1, '776', 0, '2020-04-03 19:24:06', '2020-04-03 19:24:06'),
	(809, 4, '41001-33', 'Penjualan - MRS GTI', 4, 'K', 1, '776', 0, '2020-04-03 19:24:45', '2020-04-03 19:24:45'),
	(810, 4, '41001-34', 'Penjualan - MRS JSI', 4, 'K', 1, '776', 0, '2020-04-03 19:25:21', '2020-04-03 19:25:21'),
	(811, 4, '41001-35', 'Penjualan - MRS SGI', 4, 'K', 1, '776', 0, '2020-04-03 19:26:49', '2020-04-03 19:26:49'),
	(812, 4, '41001-36', 'Penjualan - MRS SKC', 4, 'K', 1, '776', 0, '2020-04-03 19:27:25', '2020-04-03 19:27:25'),
	(813, 4, '41001-37', 'Penjualan - MRS SPC', 4, 'K', 1, '776', 0, '2020-04-03 19:27:59', '2020-04-03 19:27:59'),
	(814, 4, '41001-38', 'Penjualan - MRS SPD', 4, 'K', 1, '776', 0, '2020-04-03 19:28:44', '2020-04-03 19:28:44'),
	(815, 4, '41001-39', 'Penjualan - MRS DPC', 4, 'K', 1, '776', 0, '2020-04-03 19:29:13', '2020-04-03 19:29:13'),
	(816, 4, '41001-40', 'Penjualan - MRS SPP', 4, 'K', 1, '776', 0, '2020-04-03 19:29:44', '2020-04-03 19:29:44'),
	(817, 4, '41002', 'Penjualan - TR', 3, 'K', 0, '90', 0, '2020-04-03 19:31:45', '2020-04-03 19:31:45'),
	(818, 4, '41002-01', 'Penjualan - TR Zuhal', 4, 'K', 1, '817', 0, '2020-04-03 19:32:35', '2020-04-03 19:32:35'),
	(819, 4, '41002-02', 'Penjualan - TR Zuhal 30S', 4, 'K', 1, '817', 0, '2020-04-03 19:33:06', '2020-04-03 19:33:06'),
	(820, 4, '41002-03', 'Penjualan - TR Ardan SKJ', 4, 'K', 1, '817', 0, '2020-04-03 19:33:38', '2020-04-03 19:33:38'),
	(821, 4, '41002-04', 'Penjualan - TR Ardan SKD', 4, 'K', 1, '817', 0, '2020-04-03 19:34:11', '2020-04-03 19:34:11'),
	(822, 4, '41002-05', 'Penjualan - TR Ardan PSD', 4, 'K', 1, '817', 0, '2020-04-03 19:34:53', '2020-04-03 19:34:53'),
	(823, 4, '41002-06', 'Penjualan - TR Ardan SGJ', 4, 'K', 1, '817', 0, '2020-04-03 19:35:50', '2020-04-03 19:35:50'),
	(824, 4, '41002-07', 'Penjualan - TR Ardan SGD', 4, 'K', 1, '817', 0, '2020-04-03 19:36:34', '2020-04-03 19:36:34'),
	(825, 4, '41002-08', 'Penjualan - TR Ardan SDT', 4, 'K', 1, '817', 0, '2020-04-03 19:37:11', '2020-04-03 19:37:11'),
	(826, 4, '41002-09', 'Penjualan - TR Ardan DPC', 4, 'K', 1, '817', 0, '2020-04-03 19:37:40', '2020-04-03 19:37:40'),
	(827, 4, '41002-10', 'Penjualan - TR Ardan JSP', 4, 'K', 1, '817', 0, '2020-04-03 19:38:11', '2020-04-03 19:38:11'),
	(828, 4, '41002-11', 'Penjualan - TR Ardan SGS', 4, 'K', 1, '817', 0, '2020-04-03 19:38:40', '2020-04-03 19:38:40'),
	(829, 4, '41002-12', 'Penjualan - TR Tanpa Tumpal', 4, 'K', 1, '817', 0, '2020-04-03 19:39:06', '2020-04-03 19:39:06'),
	(830, 4, '41003', 'Penjualan - Fiber', 3, 'K', 0, '90', 0, '2020-04-03 19:40:21', '2020-04-03 19:40:21'),
	(831, 4, '41003-01', 'Penjualan - Fiber FBT K', 4, 'K', 1, '830', 0, '2020-04-03 19:41:09', '2020-04-03 19:41:09'),
	(832, 4, '41003-02', 'Penjualan - Fiber FBR Abu Kafar', 4, 'K', 1, '830', 0, '2020-04-03 19:41:43', '2020-04-03 19:41:43'),
	(833, 4, '41004', 'Penjualan - Sutra', 3, 'K', 0, '90', 0, '2020-04-03 19:42:24', '2020-04-03 19:42:24'),
	(834, 4, '41004-01', 'Penjualan - Sutra SSG.210', 4, 'K', 1, '833', 0, '2020-04-03 19:43:12', '2020-04-03 19:43:12'),
	(835, 4, '41004-02', 'Penjualan - Sutra ALF.210', 4, 'K', 1, '833', 0, '2020-04-03 19:43:42', '2020-04-03 19:43:42'),
	(836, 4, '41004-03', 'Penjualan - Sutra SKJ.210 K', 4, 'K', 1, '833', 0, '2020-04-03 19:44:18', '2020-04-03 19:44:18'),
	(837, 4, '41004-04', 'Penjualan - Sutra CTI.210', 4, 'K', 1, '833', 0, '2020-04-03 19:44:47', '2020-04-03 19:44:47'),
	(838, 4, '41004-05', 'Penjualan - Sutra SPI.210', 4, 'K', 1, '833', 0, '2020-04-03 19:45:27', '2020-04-03 19:45:27'),
	(839, 4, '41004-06', 'Penjualan - Sutra TCD.210', 4, 'K', 1, '833', 0, '2020-04-03 19:45:56', '2020-04-03 19:45:56'),
	(840, 4, '41004-07', 'Penjualan - Sutra GSC.210', 4, 'K', 1, '833', 0, '2020-04-03 19:46:25', '2020-04-03 19:46:25'),
	(841, 4, '41004-08', 'Penjualan - Sutra ALF.MR 210 (50%)', 4, 'K', 1, '833', 0, '2020-04-03 19:46:53', '2020-04-03 19:46:53'),
	(842, 4, '41004-09', 'Penjualan - Sutra SPP 210 (50%)', 4, 'K', 1, '833', 0, '2020-04-03 19:47:20', '2020-04-03 19:47:20'),
	(843, 4, '41004-10', 'Penjualan - Sutra SKJ MR 210 (50%)', 4, 'K', 1, '833', 0, '2020-04-03 19:47:45', '2020-04-03 19:47:45'),
	(844, 4, '41005', 'Penjualan - MRS BS', 3, 'K', 0, '90', 0, '2020-04-03 19:48:44', '2020-04-03 19:48:44'),
	(845, 4, '41005-01', 'Penjualan - MRS PGR BS', 4, 'K', 1, '844', 0, '2020-04-03 19:53:39', '2020-04-03 19:53:39'),
	(846, 4, '41005-02', 'Penjualan - MRS KWG BS', 4, 'K', 1, '844', 0, '2020-04-03 19:54:33', '2020-04-03 19:54:33'),
	(847, 4, '41005-03', 'Penjualan - MRS PLS BS', 4, 'K', 1, '844', 0, '2020-04-03 19:55:23', '2020-04-03 19:55:23'),
	(848, 4, '41005-04', 'Penjualan - MRS MST BS', 4, 'K', 1, '844', 0, '2020-04-03 19:56:06', '2020-04-03 19:56:06'),
	(849, 4, '41005-05', 'Penjualan - MRS GLL BS', 4, 'K', 1, '844', 0, '2020-04-03 19:56:59', '2020-04-03 19:56:59'),
	(850, 4, '41005-06', 'Penjualan - MRS TSK BS', 4, 'K', 1, '844', 0, '2020-04-03 19:58:04', '2020-04-03 19:58:04'),
	(851, 4, '41005-07', 'Penjualan - MRS BTN BS', 4, 'K', 1, '844', 0, '2020-04-03 19:58:58', '2020-04-03 19:58:58'),
	(852, 4, '41005-08', 'Penjualan - MRS SKG BS', 4, 'K', 1, '844', 0, '2020-04-03 19:59:41', '2020-04-03 19:59:41'),
	(853, 4, '41005-09', 'Penjualan - MRS TJM BS', 4, 'K', 1, '844', 0, '2020-04-03 20:00:10', '2020-04-03 20:00:10'),
	(854, 4, '41005-10', 'Penjualan - MRS TDP BS', 4, 'K', 1, '844', 0, '2020-04-03 20:01:16', '2020-04-03 20:01:16'),
	(855, 4, '41005-11', 'Penjualan - MRS TSL BS', 4, 'K', 1, '844', 0, '2020-04-03 20:01:54', '2020-04-03 20:01:54'),
	(856, 4, '41005-12', 'Penjualan - MRS STE BS', 4, 'K', 1, '844', 0, '2020-04-03 20:02:27', '2020-04-03 20:02:27'),
	(857, 4, '41005-13', 'Penjualan - MRS TCD BS', 4, 'K', 1, '844', 0, '2020-04-03 20:02:55', '2020-04-03 20:02:55'),
	(858, 4, '41005-14', 'Penjualan - MRS PKC BS', 4, 'K', 1, '844', 0, '2020-04-03 20:03:24', '2020-04-03 20:03:24'),
	(859, 4, '41005-15', 'Penjualan - MRS SGD BS', 4, 'K', 1, '844', 0, '2020-04-03 20:03:52', '2020-04-03 20:03:52'),
	(860, 4, '41005-16', 'Penjualan - MRS JQS BS', 4, 'K', 1, '844', 0, '2020-04-03 20:04:23', '2020-04-03 20:04:23'),
	(861, 4, '41005-17', 'Penjualan - MRS TCC BS', 4, 'K', 1, '844', 0, '2020-04-03 20:05:01', '2020-04-03 20:05:01'),
	(862, 4, '41005-18', 'Penjualan - MRS TCW BS', 4, 'K', 1, '844', 0, '2020-04-03 20:05:47', '2020-04-03 20:05:47'),
	(863, 4, '41005-19', 'Penjualan - MRS STC BS', 4, 'K', 1, '844', 0, '2020-04-03 20:06:19', '2020-04-03 20:06:19'),
	(864, 4, '41005-20', 'Penjualan - MRS DPS BS', 4, 'K', 1, '844', 0, '2020-04-03 20:07:15', '2020-04-03 20:07:15'),
	(865, 4, '41005-21', 'Penjualan - MRS SGW BS', 4, 'K', 1, '844', 0, '2020-04-03 20:08:38', '2020-04-03 20:08:38'),
	(866, 4, '41005-22', 'Penjualan - MRS SKJ BS', 4, 'K', 1, '844', 0, '2020-04-03 20:09:10', '2020-04-03 20:09:10'),
	(867, 4, '41005-23', 'Penjualan - MRS TPI BS', 4, 'K', 1, '844', 0, '2020-04-03 20:09:46', '2020-04-03 20:09:46'),
	(868, 4, '41005-24', 'Penjualan - MRS KSJ BS', 4, 'K', 1, '844', 0, '2020-04-03 20:10:19', '2020-04-03 20:10:19'),
	(869, 4, '41005-25', 'Penjualan - MRS JMJ BS', 4, 'K', 1, '844', 0, '2020-04-03 20:10:50', '2020-04-03 20:10:50'),
	(870, 4, '41005-26', 'Penjualan - MRS SDI BS', 4, 'K', 1, '844', 0, '2020-04-03 20:11:30', '2020-04-03 20:11:30'),
	(871, 4, '41005-27', 'Penjualan - MRS SSI BS', 4, 'K', 1, '844', 0, '2020-04-03 20:12:11', '2020-04-03 20:12:11'),
	(872, 4, '41005-28', 'Penjualan - MRS ALF 100 BS', 4, 'K', 1, '844', 0, '2020-04-03 20:12:42', '2020-04-03 20:12:42'),
	(873, 4, '41005-29', 'Penjualan - MRS GNK BS', 4, 'K', 1, '844', 0, '2020-04-03 20:13:15', '2020-04-03 20:13:15'),
	(874, 4, '41005-30', 'Penjualan - MRS TSI BS', 4, 'K', 1, '844', 0, '2020-04-03 20:14:03', '2020-04-03 20:14:03'),
	(875, 4, '41005-31', 'Penjualan - MRS GRJ BS', 4, 'K', 1, '844', 0, '2020-04-03 20:14:37', '2020-04-03 20:14:37'),
	(876, 4, '41005-32', 'Penjualan - MRS ICE BS', 4, 'K', 1, '844', 0, '2020-04-03 20:15:14', '2020-04-03 20:15:14'),
	(877, 4, '41005-33', 'Penjualan - MRS GTI BS', 4, 'K', 1, '844', 0, '2020-04-03 20:15:41', '2020-04-03 20:15:41'),
	(878, 4, '41005-34', 'Penjualan - MRS JSI BS', 4, 'K', 1, '844', 0, '2020-04-03 20:16:10', '2020-04-03 20:16:10'),
	(879, 4, '41005-35', 'Penjualan - MRS SGI BS', 4, 'K', 1, '844', 0, '2020-04-03 20:16:50', '2020-04-03 20:16:50'),
	(880, 4, '41005-36', 'Penjualan - MRS SKC BS', 4, 'K', 1, '844', 0, '2020-04-03 20:17:52', '2020-04-03 20:17:52'),
	(881, 4, '41005-37', 'Penjualan - MRS SPC BS', 4, 'K', 1, '844', 0, '2020-04-03 20:18:19', '2020-04-03 20:18:19'),
	(882, 4, '41005-38', 'Penjualan - MRS SPD BS', 4, 'K', 1, '844', 0, '2020-04-03 20:18:46', '2020-04-03 20:18:46'),
	(883, 4, '41005-39', 'Penjualan - MRS DPC BS', 4, 'K', 1, '844', 0, '2020-04-03 20:19:25', '2020-04-03 20:19:25'),
	(884, 4, '41005-40', 'Penjualan - MRS SPP BS', 4, 'K', 1, '844', 0, '2020-04-03 20:19:59', '2020-04-03 20:19:59'),
	(885, 4, '41006', 'Penjualan - TR BS', 3, 'K', 0, '90', 0, '2020-04-03 20:20:49', '2020-04-03 20:20:49'),
	(886, 4, '41006-01', 'Penjualan - TR Zuhal BS', 4, 'K', 1, '885', 0, '2020-04-03 20:21:39', '2020-04-03 20:21:39'),
	(887, 4, '41006-02', 'Penjualan - TR Zuhal 30S BS', 4, 'K', 1, '885', 0, '2020-04-03 20:22:08', '2020-04-03 20:22:08'),
	(888, 4, '41006-03', 'Penjualan - TR Ardan SKJ BS', 4, 'K', 1, '885', 0, '2020-04-03 20:23:00', '2020-04-03 20:23:00'),
	(889, 4, '41006-04', 'Penjualan - TR Ardan SKD BS', 4, 'K', 1, '885', 0, '2020-04-03 20:23:32', '2020-04-03 20:23:32'),
	(890, 4, '41006-05', 'Penjualan - TR Ardan PSD BS', 4, 'K', 1, '885', 0, '2020-04-03 20:24:01', '2020-04-03 20:24:01'),
	(891, 4, '41006-06', 'Penjualan - TR Ardan SGJ BS', 4, 'K', 1, '885', 0, '2020-04-03 20:24:28', '2020-04-03 20:24:28'),
	(892, 4, '41006-07', 'Penjualan - TR Ardan SGD BS', 4, 'K', 1, '885', 0, '2020-04-03 20:24:57', '2020-04-03 20:24:57'),
	(893, 4, '41006-08', 'Penjualan - TR Ardan SDT BS', 4, 'K', 1, '885', 0, '2020-04-03 20:25:24', '2020-04-03 20:25:24'),
	(894, 4, '41006-09', 'Penjualan - TR Ardan DPC BS', 4, 'K', 1, '885', 0, '2020-04-03 20:26:52', '2020-04-03 20:26:52'),
	(895, 4, '41006-10', 'Penjualan - TR Ardan JSP BS', 4, 'K', 1, '885', 0, '2020-04-03 20:27:23', '2020-04-03 20:27:23'),
	(896, 4, '41006-11', 'Penjualan - TR Ardan SGS BS', 4, 'K', 1, '885', 0, '2020-04-03 20:27:52', '2020-04-03 20:27:52'),
	(897, 4, '41006-12', 'Penjualan - TR Tanpa Tumpal BS', 4, 'K', 1, '885', 0, '2020-04-03 20:28:20', '2020-04-03 20:28:20'),
	(898, 4, '41007', 'Penjualan - Fiber BS', 3, 'K', 0, '90', 0, '2020-04-03 20:29:47', '2020-04-03 20:29:47'),
	(899, 4, '41007-01', 'Penjualan - Fiber FBT K BS', 4, 'K', 1, '898', 0, '2020-04-03 20:30:35', '2020-04-03 20:30:35'),
	(900, 4, '41007-02', 'Penjualan - Fiber FBR Abu Kafar BS', 4, 'K', 1, '898', 0, '2020-04-03 20:31:16', '2020-04-03 20:31:16'),
	(901, 4, '41008', 'Penjualan - Sutra BS', 3, 'K', 0, '90', 0, '2020-04-03 20:32:12', '2020-04-03 20:32:12'),
	(902, 4, '41008-01', 'Penjualan - Sutra SSG.210 BS', 4, 'K', 1, '901', 0, '2020-04-03 20:32:48', '2020-04-03 20:32:48'),
	(903, 4, '41008-02', 'Penjualan - Sutra ALF.210 BS', 4, 'K', 1, '901', 0, '2020-04-03 20:33:25', '2020-04-03 20:33:25'),
	(904, 4, '41008-03', 'Penjualan - Sutra SKJ.210 K BS', 4, 'K', 1, '901', 0, '2020-04-03 20:34:03', '2020-04-03 20:34:03'),
	(905, 4, '41008-04', 'Penjualan - Sutra CTI.210 BS', 4, 'K', 1, '901', 0, '2020-04-03 20:34:40', '2020-04-03 20:34:40'),
	(906, 4, '41008-05', 'Penjualan - Sutra SPI.210 BS', 4, 'K', 1, '901', 0, '2020-04-03 20:35:21', '2020-04-03 20:35:21'),
	(907, 4, '41008-06', 'Penjualan - Sutra TCD.210 BS', 4, 'K', 1, '901', 0, '2020-04-03 20:35:57', '2020-04-03 20:35:57'),
	(908, 4, '41008-07', 'Penjualan - Sutra GSC.210 BS', 4, 'K', 1, '901', 0, '2020-04-03 20:36:24', '2020-04-03 20:36:24'),
	(909, 4, '41008-08', 'Penjualan - Sutra ALF.MR 210 (50%) BS', 4, 'K', 1, '901', 0, '2020-04-03 20:37:04', '2020-04-03 20:37:04'),
	(910, 4, '41008-09', 'Penjualan - Sutra SPP 210 (50%) BS', 4, 'K', 1, '901', 0, '2020-04-03 20:37:34', '2020-04-03 20:37:34'),
	(911, 4, '41008-10', 'Penjualan - Sutra SKJ MR 210 (50%) BS', 4, 'K', 1, '901', 0, '2020-04-03 20:38:03', '2020-04-03 20:38:03'),
	(912, 4, '41009', 'Penjualan - MRS BS Parah', 3, 'K', 0, '90', 0, '2020-04-03 21:18:48', '2020-04-03 21:20:02'),
	(913, 4, '41009-01', 'Penjualan - MRS PGR BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:20:44', '2020-04-03 21:20:44'),
	(914, 4, '41009-02', 'Penjualan - MRS KWG BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:21:20', '2020-04-03 21:21:20'),
	(915, 4, '41009-03', 'Penjualan - MRS PLS BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:21:58', '2020-04-03 21:21:58'),
	(916, 4, '41009-04', 'Penjualan - MRS MST BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:22:30', '2020-04-03 21:22:30'),
	(917, 4, '41009-05', 'Penjualan - MRS GLL BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:23:08', '2020-04-03 21:23:08'),
	(918, 4, '41009-06', 'Penjualan - MRS TSK BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:23:39', '2020-04-03 21:23:39'),
	(919, 4, '41009-07', 'Penjualan - MRS BTN BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:24:21', '2020-04-03 21:24:21'),
	(920, 4, '41009-08', 'Penjualan - MRS SKG BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:24:49', '2020-04-03 21:24:49'),
	(921, 4, '41009-09', 'Penjualan - MRS TJM BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:25:42', '2020-04-03 21:25:42'),
	(922, 4, '41009-10', 'Penjualan - MRS TDP BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:26:23', '2020-04-03 21:26:23'),
	(923, 4, '41009-11', 'Penjualan - MRS TSL BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:26:53', '2020-04-03 21:26:53'),
	(924, 4, '41009-12', 'Penjualan - MRS STE BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:27:26', '2020-04-03 21:27:26'),
	(925, 4, '41009-13', 'Penjualan - MRS TCD BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:27:56', '2020-04-03 21:27:56'),
	(926, 4, '41009-14', 'Penjualan - MRS PKC BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:28:27', '2020-04-03 21:28:27'),
	(927, 4, '41009-15', 'Penjualan - MRS SGD BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:29:02', '2020-04-03 21:29:02'),
	(928, 4, '41009-16', 'Penjualan - MRS JQS BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:29:33', '2020-04-03 21:29:33'),
	(929, 4, '41009-17', 'Penjualan - MRS TCC BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:30:08', '2020-04-03 21:30:08'),
	(930, 4, '41009-18', 'Penjualan - MRS TCW BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:30:59', '2020-04-03 21:30:59'),
	(931, 4, '41009-19', 'Penjualan - MRS STC BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:31:34', '2020-04-03 21:31:34'),
	(932, 4, '41009-20', 'Penjualan - MRS DPS BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:32:14', '2020-04-03 21:32:14'),
	(933, 4, '41009-21', 'Penjualan - MRS SGW BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:32:44', '2020-04-03 21:32:44'),
	(934, 4, '41009-22', 'Penjualan - MRS SKJ BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:33:13', '2020-04-03 21:33:13'),
	(935, 4, '41009-23', 'Penjualan - MRS TPI BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:33:43', '2020-04-03 21:33:43'),
	(936, 4, '41009-24', 'Penjualan - MRS KSJ BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:34:18', '2020-04-03 21:34:18'),
	(937, 4, '41009-25', 'Penjualan - MRS JMJ BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:34:49', '2020-04-03 21:34:49'),
	(938, 4, '41009-26', 'Penjualan - MRS SDI BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:35:31', '2020-04-03 21:35:31'),
	(939, 4, '41009-27', 'Penjualan - MRS SSI BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:35:58', '2020-04-03 21:35:58'),
	(940, 4, '41009-28', 'Penjualan - MRS ALF 100 BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:36:25', '2020-04-03 21:36:25'),
	(941, 4, '41009-29', 'Penjualan - MRS GNK BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:36:54', '2020-04-03 21:36:54'),
	(942, 4, '41009-30', 'Penjualan - MRS TSI BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:37:21', '2020-04-03 21:37:21'),
	(943, 4, '41009-31', 'Penjualan - MRS GRJ BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:38:03', '2020-04-03 21:38:03'),
	(944, 4, '41009-32', 'Penjualan - MRS ICE BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:38:34', '2020-04-03 21:38:34'),
	(945, 4, '41009-33', 'Penjualan - MRS GTI BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:38:58', '2020-04-03 21:38:58'),
	(946, 4, '41009-34', 'Penjualan - MRS JSI BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:39:26', '2020-04-03 21:39:26'),
	(947, 4, '41009-35', 'Penjualan - MRS SGI BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:39:53', '2020-04-03 21:39:53'),
	(948, 4, '41009-36', 'Penjualan - MRS SKC BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:40:22', '2020-04-03 21:40:22'),
	(949, 4, '41009-37', 'Penjualan - MRS SPC BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:40:47', '2020-04-03 21:40:47'),
	(950, 4, '41009-38', 'Penjualan - MRS SPD BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:41:20', '2020-04-03 21:41:20'),
	(951, 4, '41009-39', 'Penjualan - MRS DPC BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:41:46', '2020-04-03 21:41:46'),
	(952, 4, '41009-40', 'Penjualan - MRS SPP BS Parah', 4, 'K', 1, '912', 0, '2020-04-03 21:42:13', '2020-04-03 21:42:13'),
	(953, 4, '41010', 'Penjualan - TR BS Parah', 3, 'K', 0, '90', 0, '2020-04-03 21:42:31', '2020-04-03 21:42:47'),
	(954, 4, '41010-01', 'Penjualan - TR Zuhal BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:43:32', '2020-04-03 21:43:32'),
	(955, 4, '41010-02', 'Penjualan - TR Zuhal 30S BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:44:10', '2020-04-03 21:44:10'),
	(956, 4, '41010-03', 'Penjualan - TR Ardan SKJ BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:44:46', '2020-04-03 21:44:46'),
	(957, 4, '41010-04', 'Penjualan - TR Ardan SKD BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:45:17', '2020-04-03 21:45:17'),
	(958, 4, '41010-05', 'Penjualan - TR Ardan PSD BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:45:54', '2020-04-03 21:45:54'),
	(959, 4, '41010-06', 'Penjualan - TR Ardan SGJ BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:46:20', '2020-04-03 21:46:20'),
	(960, 4, '41010-07', 'Penjualan - TR Ardan SGD BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:47:16', '2020-04-03 21:47:16'),
	(961, 4, '41010-08', 'Penjualan - TR Ardan SDT BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:47:48', '2020-04-03 21:47:48'),
	(962, 4, '41010-09', 'Penjualan - TR Ardan DPC BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:48:15', '2020-04-03 21:48:15'),
	(963, 4, '41010-10', 'Penjualan - TR Ardan JSP BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:48:41', '2020-04-03 21:48:41'),
	(964, 4, '41010-11', 'Penjualan - TR Ardan SGS BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:49:08', '2020-04-03 21:49:08'),
	(965, 4, '41010-12', 'Penjualan - TR Tanpa Tumpal BS Parah', 4, 'K', 1, '953', 0, '2020-04-03 21:49:35', '2020-04-03 21:49:35'),
	(966, 4, '41011', 'Penjualan - Fiber BS Parah', 3, 'K', 0, '90', 0, '2020-04-03 21:50:04', '2020-04-03 21:50:04'),
	(967, 4, '41011-01', 'Penjualan - Fiber FBT K BS Parah', 4, 'K', 1, '966', 0, '2020-04-03 21:50:40', '2020-04-03 21:50:40'),
	(968, 4, '41011-02', 'Penjualan - Fiber FBR Abu Kafar BS Parah', 4, 'K', 1, '966', 0, '2020-04-03 21:51:13', '2020-04-03 21:51:13'),
	(969, 4, '41012', 'Penjualan - Sutra BS Parah', 3, 'K', 0, '90', 0, '2020-04-03 21:51:46', '2020-04-03 21:51:46'),
	(970, 4, '41012-01', 'Penjualan - Sutra SSG.210 BS Parah', 4, 'K', 1, '969', 0, '2020-04-03 21:52:36', '2020-04-03 21:52:36'),
	(971, 4, '41012-02', 'Penjualan - Sutra ALF.210 BS Parah', 4, 'K', 1, '969', 0, '2020-04-03 21:53:06', '2020-04-03 21:53:06'),
	(972, 4, '41012-03', 'Penjualan - Sutra SKJ.210 K BS Parah', 4, 'K', 1, '969', 0, '2020-04-03 21:53:34', '2020-04-03 21:53:34'),
	(973, 4, '41012-04', 'Penjualan - Sutra CTI.210 BS Parah', 4, 'K', 1, '969', 0, '2020-04-03 21:54:08', '2020-04-03 21:54:08'),
	(974, 4, '41012-05', 'Penjualan - Sutra SPI.210 BS Parah', 4, 'K', 1, '969', 0, '2020-04-03 21:54:44', '2020-04-03 21:54:44'),
	(975, 4, '41012-06', 'Penjualan - Sutra TCD.210 BS Parah', 4, 'K', 1, '969', 0, '2020-04-03 21:55:15', '2020-04-03 21:55:15'),
	(976, 4, '41012-07', 'Penjualan - Sutra GSC.210 BS Parah', 4, 'K', 1, '969', 0, '2020-04-03 21:55:50', '2020-04-03 21:55:50'),
	(977, 4, '41012-08', 'Penjualan - Sutra ALF.MR 210 (50%) BS Parah', 4, 'K', 1, '969', 0, '2020-04-03 21:56:17', '2020-04-03 21:56:17'),
	(978, 4, '41012-09', 'Penjualan - Sutra SPP 210 (50%) BS Parah', 4, 'K', 1, '969', 0, '2020-04-03 21:56:49', '2020-04-03 21:56:49'),
	(979, 4, '41012-10', 'Penjualan - Sutra SKJ MR 210 (50%) BS Parah', 4, 'K', 1, '969', 0, '2020-04-03 21:57:14', '2020-04-03 21:57:14'),
	(980, 5, '52001', 'Pembelian Bahan Baku Benang', 3, 'D', 0, '95', 0, '2020-04-03 22:18:06', '2020-04-03 22:18:06'),
	(981, 5, '52001-01', 'Pembelian Bahan Baku - Benang 40/2', 4, 'D', 1, '980', 0, '2020-04-03 22:18:55', '2020-04-03 22:18:55'),
	(982, 5, '52001-02', 'Pembelian Bahan Baku - Benang 60/2', 4, 'D', 1, '980', 0, '2020-04-03 22:20:27', '2020-04-03 22:20:27'),
	(983, 5, '52001-03', 'Pembelian Bahan Baku - Benang 64/2', 4, 'D', 1, '980', 0, '2020-04-03 22:21:00', '2020-04-03 22:21:00'),
	(984, 5, '52001-04', 'Pembelian Bahan Baku - Benang 80/2', 4, 'D', 1, '980', 0, '2020-04-03 22:21:26', '2020-04-03 22:21:26'),
	(985, 5, '52001-05', 'Pembelian Bahan Baku - Benang 100/2', 4, 'D', 1, '980', 0, '2020-04-03 22:22:01', '2020-04-03 22:22:01'),
	(986, 5, '52001-06', 'Pembelian Bahan Baku - Benang 140/2', 4, 'D', 1, '980', 0, '2020-04-03 22:22:28', '2020-04-03 22:22:28'),
	(987, 5, '52001-07', 'Pembelian Bahan Baku - Benang 210/2', 4, 'D', 1, '980', 0, '2020-04-03 22:23:02', '2020-04-03 22:23:02'),
	(988, 5, '52001-08', 'Pembelian Bahan Baku - Benang Rayon NE 30S', 4, 'D', 1, '980', 0, '2020-04-03 22:23:31', '2020-04-03 22:24:14'),
	(989, 5, '52001-09', 'Pembelian Bahan Baku - Benang Rayon NE 40S', 4, 'D', 1, '980', 0, '2020-04-03 22:24:02', '2020-04-03 22:24:02'),
	(990, 5, '52001-10', 'Pembelian Bahan Baku - Benang TR 30', 4, 'D', 1, '980', 0, '2020-04-03 22:25:11', '2020-04-03 22:25:11'),
	(991, 5, '52001-11', 'Pembelian Bahan Baku - Benang TR 40', 4, 'D', 1, '980', 0, '2020-04-03 22:26:43', '2020-04-03 22:26:43'),
	(992, 5, '52001-12', 'Pembelian Bahan Baku - Benang TR 50/2', 4, 'D', 1, '980', 0, '2020-04-03 22:28:09', '2020-04-03 22:28:09'),
	(993, 5, '52001-14', 'Pembelian Bahan Baku - Benang Lainnya', 4, 'D', 1, '980', 0, '2020-04-03 22:28:40', '2020-12-21 14:59:06'),
	(994, 5, '52002', 'Pembelian Bahan Baku Chemical/Obat/Pewarna', 3, 'D', 0, '95', 0, '2020-04-03 22:29:25', '2020-04-03 22:29:25'),
	(995, 5, '52002-01', 'Pembelian Bahan Baku - Obat Direk', 4, 'D', 1, '994', 0, '2020-04-03 22:29:54', '2020-04-03 22:29:54'),
	(996, 5, '52002-02', 'Pembelian Bahan Baku - Obat Garem', 4, 'D', 1, '994', 0, '2020-04-03 22:30:18', '2020-04-03 22:30:18'),
	(997, 5, '52002-03', 'Pembelian Bahan Baku - Obat Indantren', 4, 'D', 1, '994', 0, '2020-04-03 22:30:43', '2020-04-03 22:30:43'),
	(998, 5, '52002-04', 'Pembelian Bahan Baku - Obat Naptol', 4, 'D', 1, '994', 0, '2020-04-03 22:31:32', '2020-04-03 22:31:32'),
	(999, 5, '52002-05', 'Pembelian Bahan Baku - Obat Reaktif', 4, 'D', 1, '994', 0, '2020-04-03 22:31:59', '2020-04-03 22:31:59'),
	(1000, 5, '52002-06', 'Pembelian Bahan Baku - Obat Silver', 4, 'D', 1, '994', 0, '2020-04-03 22:32:24', '2020-04-03 22:32:24'),
	(1001, 5, '52002-07', 'Pembelian Bahan Baku - Obat Lainnya', 4, 'D', 1, '994', 0, '2020-04-03 22:32:49', '2020-04-03 22:32:49'),
	(1002, 5, '52003-01', 'Pembelian Bahan Pembantu - Accessories', 4, 'D', 1, '97', 0, '2020-04-03 22:35:03', '2020-04-03 22:35:03'),
	(1003, 5, '52003-02', 'Pembelian Bahan Pembantu - Bahan Bakar Batu Bara, Minyak & Kayu', 4, 'D', 1, '97', 0, '2020-04-03 22:35:35', '2020-04-03 22:35:35'),
	(1004, 5, '52003-03', 'Pembelian Bahan Pembantu - Benang', 4, 'D', 1, '97', 0, '2020-04-03 22:36:08', '2020-04-03 22:36:08'),
	(1005, 5, '52003-04', 'Pembelian Bahan Pembantu - Chemical/Obat', 4, 'D', 1, '97', 0, '2020-04-03 22:36:44', '2020-04-03 22:36:44'),
	(1006, 5, '52003-05', 'Pembelian Bahan Pembantu - Lainnya', 4, 'D', 1, '97', 0, '2020-04-03 22:37:06', '2020-04-03 22:37:06'),
	(1007, 5, '53001-01', 'Biaya Pemakaian Bahan Baku Benang', 4, 'D', 0, '102', 0, '2020-04-04 10:48:03', '2020-08-27 13:18:10'),
	(1008, 5, '53001-01-01', 'Biaya Pemakaian Bahan Baku Benang - Benang 40/2', 5, 'D', 1, '1007', 0, '2020-04-04 10:48:42', '2020-08-27 13:18:57'),
	(1009, 5, '53001-01-02', 'Biaya Pemakaian Bahan Baku Benang - Benang 60/2', 5, 'D', 1, '1007', 0, '2020-04-04 10:49:14', '2020-08-27 13:19:03'),
	(1010, 5, '53001-01-03', 'Biaya Pemakaian Bahan Baku Benang - Benang 64/2', 5, 'D', 1, '1007', 0, '2020-04-04 10:49:53', '2020-08-27 13:19:08'),
	(1011, 5, '53001-01-04', 'Biaya Pemakaian Bahan Baku Benang - Benang 80/2', 5, 'D', 1, '1007', 0, '2020-04-04 10:50:40', '2020-08-27 13:19:13'),
	(1012, 5, '53001-01-05', 'Biaya Pemakaian Bahan Baku Benang - Benang 100/2', 5, 'D', 1, '1007', 0, '2020-04-04 10:53:47', '2020-08-27 13:19:18'),
	(1013, 5, '53001-01-06', 'Biaya Pemakaian Bahan Baku Benang - Benang 140/2', 5, 'D', 1, '1007', 0, '2020-04-04 10:54:21', '2020-08-27 13:19:24'),
	(1014, 5, '53001-01-07', 'Biaya Pemakaian Bahan Baku Benang - Benang 210/2', 5, 'D', 1, '1007', 0, '2020-04-04 10:54:50', '2020-08-27 13:19:30'),
	(1015, 5, '53001-01-08', 'Biaya Pemakaian Bahan Baku Benang - Benang Rayon NE 30S', 5, 'D', 1, '1007', 0, '2020-04-04 10:55:22', '2020-08-27 13:19:35'),
	(1016, 5, '53001-01-09', 'Biaya Pemakaian Bahan Baku Benang - Benang Rayon NE 40S', 5, 'D', 1, '1007', 0, '2020-04-04 10:55:53', '2020-08-27 13:19:40'),
	(1017, 5, '53001-01-10', 'Biaya Pemakaian Bahan Baku Benang - Benang TR 30', 5, 'D', 1, '1007', 0, '2020-04-04 10:56:19', '2020-08-27 13:19:46'),
	(1018, 5, '53001-01-11', 'Biaya Pemakaian Bahan Baku Benang - Benang TR 40', 5, 'D', 1, '1007', 0, '2020-04-04 10:56:47', '2020-08-27 13:19:53'),
	(1019, 5, '53001-01-12', 'Biaya Pemakaian Bahan Baku Benang - Benang TR 50/2', 5, 'D', 1, '1007', 0, '2020-04-04 10:57:19', '2020-08-27 13:20:03'),
	(1020, 5, '53001-01-14', 'Biaya Pemakaian Bahan Baku Benang - Benang Lainnya', 5, 'D', 1, '1007', 0, '2020-04-04 10:58:02', '2020-12-21 15:39:14'),
	(1021, 5, '53001-02', 'Biaya Pemakaian Bahan Baku Chemical/Obat/Pewarna', 4, 'D', 0, '102', 0, '2020-04-04 10:59:32', '2020-08-27 13:20:48'),
	(1022, 5, '53001-02-01', 'Biaya Pemakaian Bahan Baku Chemical/Obat/Pewarna - Obat Direk', 5, 'D', 1, '1021', 0, '2020-04-04 11:00:11', '2020-08-27 13:23:17'),
	(1023, 5, '53001-02-02', 'Biaya Pemakaian Bahan Baku Chemical/Obat/Pewarna - Obat Garem', 5, 'D', 1, '1021', 0, '2020-04-04 11:00:41', '2020-08-27 13:23:24'),
	(1024, 5, '53001-02-03', 'Biaya Pemakaian Bahan Baku Chemical/Obat/Pewarna - Obat Indantren', 5, 'D', 1, '1021', 0, '2020-04-04 11:01:32', '2020-08-27 13:23:28'),
	(1025, 5, '53001-02-04', 'Biaya Pemakaian Bahan Baku Chemical/Obat/Pewarna - Obat Naptol', 5, 'D', 1, '1021', 0, '2020-04-04 11:02:01', '2020-08-27 13:23:34'),
	(1026, 5, '53001-02-05', 'Biaya Pemakaian Bahan Baku Chemical/Obat/Pewarna - Obat Reaktif', 5, 'D', 1, '1021', 0, '2020-04-04 11:02:30', '2020-08-27 13:23:40'),
	(1027, 5, '53001-02-06', 'Biaya Pemakaian Bahan Baku Chemical/Obat/Pewarna - Obat Silver', 5, 'D', 1, '1021', 0, '2020-04-04 11:02:58', '2020-08-27 13:23:45'),
	(1028, 5, '53001-02-07', 'Biaya Pemakaian Bahan Baku Chemical/Obat/Pewarna - Obat Lainnya', 5, 'D', 1, '1021', 0, '2020-04-04 11:03:26', '2020-08-27 13:23:50'),
	(1029, 5, '53002-01', 'BTKL - Harian Celup', 4, 'D', 1, '103', 0, '2020-04-04 11:04:41', '2020-04-04 11:04:41'),
	(1030, 5, '53002-02', 'BTKL - Harian Inspecting/QC', 4, 'D', 1, '103', 0, '2020-04-04 11:05:06', '2020-04-04 11:05:06'),
	(1031, 5, '53002-03', 'BTKL - Harian Periksa Ulang', 4, 'D', 1, '103', 0, '2020-04-04 11:05:47', '2020-04-04 11:05:47'),
	(1032, 5, '53002-04', 'BTKL - Harian Finishing', 4, 'D', 1, '103', 0, '2020-04-04 11:06:13', '2020-04-04 11:06:13'),
	(1033, 5, '53002-05', 'BTKL - Harian Potong', 4, 'D', 1, '103', 0, '2020-04-04 11:06:40', '2020-04-04 11:06:40'),
	(1034, 5, '53002-06', 'BTKL - Harian Kebas', 4, 'D', 1, '103', 0, '2020-04-04 11:07:17', '2020-04-04 11:07:17'),
	(1035, 5, '53002-07', 'BTKL - Harian Press', 4, 'D', 1, '103', 0, '2020-04-04 11:07:46', '2020-04-04 11:07:46'),
	(1036, 5, '53002-08', 'BTKL - Harian Cap/Sablon', 4, 'D', 1, '103', 0, '2020-04-04 11:08:31', '2020-04-04 11:08:31'),
	(1037, 5, '53002-09', 'BTKL - Harian Lembur/Over Time', 4, 'D', 1, '103', 0, '2020-04-04 11:09:12', '2020-04-04 11:09:12'),
	(1038, 5, '53002-10', 'BTKL - Harian THR/Bonus/Tunjangan & Insentif', 4, 'D', 1, '103', 0, '2020-04-04 11:10:56', '2020-04-04 11:10:56'),
	(1039, 5, '53002-11', 'BTKL - Harian Lainnya', 4, 'D', 1, '103', 0, '2020-04-04 11:11:32', '2020-04-04 11:11:32'),
	(1040, 5, '53002-12', 'BTKL - Borongan Kelos', 4, 'D', 1, '103', 0, '2020-04-04 11:12:22', '2020-04-04 11:12:22'),
	(1041, 5, '53002-13', 'BTKL - Borongan Sekir', 4, 'D', 1, '103', 0, '2020-04-04 11:13:11', '2020-04-04 11:13:11'),
	(1042, 5, '53002-14', 'BTKL - Borongan Medang', 4, 'D', 1, '103', 0, '2020-04-04 11:13:35', '2020-04-04 11:13:35'),
	(1043, 5, '53002-15', 'BTKL - Borongan Gambar', 4, 'D', 1, '103', 0, '2020-04-04 11:14:06', '2020-04-04 11:14:06'),
	(1044, 5, '53002-16', 'BTKL - Borongan Iket', 4, 'D', 1, '103', 0, '2020-04-04 11:14:37', '2020-04-04 11:14:37'),
	(1045, 5, '53002-17', 'BTKL - Borongan Klocor', 4, 'D', 1, '103', 0, '2020-04-04 11:15:02', '2020-04-04 11:15:02'),
	(1046, 5, '53002-18', 'BTKL - Borongan Celup 2', 4, 'D', 1, '103', 0, '2020-04-04 11:15:44', '2020-04-04 11:15:44'),
	(1047, 5, '53002-19', 'BTKL - Borongan Netel', 4, 'D', 1, '103', 0, '2020-04-04 11:16:39', '2020-04-04 11:16:39'),
	(1048, 5, '53002-20', 'BTKL - Borongan Ngelir', 4, 'D', 1, '103', 0, '2020-04-04 11:17:07', '2020-04-04 11:17:07'),
	(1049, 5, '53002-21', 'BTKL - Borongan Nutup', 4, 'D', 1, '103', 0, '2020-04-04 11:17:35', '2020-04-04 11:17:35'),
	(1050, 5, '53002-22', 'BTKL - Borongan Buka', 4, 'D', 1, '103', 0, '2020-04-04 11:18:08', '2020-04-04 11:18:08'),
	(1051, 5, '53002-23', 'BTKL - Borongan Petenun', 4, 'D', 1, '103', 0, '2020-04-04 11:18:37', '2020-04-04 11:18:37'),
	(1052, 5, '53002-24', 'BTKL - Borongan Perbaikan', 4, 'D', 1, '103', 0, '2020-04-04 11:19:11', '2020-04-04 11:19:11'),
	(1053, 5, '53002-25', 'BTKL - Borongan Cucian', 4, 'D', 1, '103', 0, '2020-04-04 11:20:06', '2020-04-04 11:20:06'),
	(1054, 5, '53002-26', 'BTKL - Borongan Dudulan', 4, 'D', 1, '103', 0, '2020-04-04 11:20:37', '2020-04-04 11:20:37'),
	(1055, 5, '53002-27', 'BTKL - Borongan Sambung', 4, 'D', 1, '103', 0, '2020-04-04 11:21:17', '2020-04-04 11:21:17'),
	(1056, 5, '53002-28', 'BTKL - Borongan Jahit Sarung', 4, 'D', 1, '103', 0, '2020-04-04 11:21:43', '2020-04-04 11:21:43'),
	(1057, 5, '53002-29', 'BTKL - Borongan Label', 4, 'D', 1, '103', 0, '2020-04-04 11:22:10', '2020-04-04 11:22:10'),
	(1058, 5, '53002-30', 'BTKL - Borongan Seterika', 4, 'D', 1, '103', 0, '2020-04-04 11:23:11', '2020-04-04 11:23:11'),
	(1059, 5, '53002-31', 'BTKL - Borongan THR/Bonus/Tunjangan & Insentif', 4, 'D', 1, '103', 0, '2020-04-04 11:23:40', '2020-04-04 11:23:40'),
	(1060, 5, '53002-32', 'BTKL - Borongan Lainnya', 4, 'D', 1, '103', 0, '2020-04-04 11:24:13', '2020-04-04 11:24:13'),
	(1061, 5, '53002-33', 'BTKL - Harian ATM Gresik G1', 4, 'D', 1, '103', 0, '2020-04-04 11:24:49', '2020-04-04 11:24:49'),
	(1062, 5, '53002-34', 'BTKL - Harian ATM Gresik G5', 4, 'D', 1, '103', 0, '2020-04-04 11:25:21', '2020-04-04 11:25:21'),
	(1063, 5, '53002-35', 'BTKL - Harian ATM Gresik G10', 4, 'D', 1, '103', 0, '2020-04-04 11:25:47', '2020-04-04 11:25:47'),
	(1064, 5, '53002-36', 'BTKL - Harian ATM Gresik G1 Lembur/Over Time', 4, 'D', 1, '103', 0, '2020-04-04 11:26:16', '2020-04-04 11:26:16'),
	(1065, 5, '53002-37', 'BTKL - Harian ATM Gresik G5 Lembur/Over Time', 4, 'D', 1, '103', 0, '2020-04-04 11:26:44', '2020-04-04 11:26:44'),
	(1066, 5, '53002-38', 'BTKL - Harian ATM Gresik G10 Lembur/Over Time', 4, 'D', 1, '103', 0, '2020-04-04 11:27:21', '2020-04-04 11:27:21'),
	(1067, 5, '53002-39', 'BTKL - Harian ATM Gresik G1 THR/Bonus/Tunjangan & Insentif', 4, 'D', 1, '103', 0, '2020-04-04 11:29:06', '2020-04-04 11:29:06'),
	(1068, 5, '53002-40', 'BTKL - Harian ATM Gresik G5 THR/Bonus/Tunjangan & Insentif', 4, 'D', 1, '103', 0, '2020-04-04 11:29:30', '2020-04-04 11:29:30'),
	(1069, 5, '53002-41', 'BTKL - Harian ATM Gresik G10 THR/Bonus/Tunjangan & Insentif', 4, 'D', 1, '103', 0, '2020-04-04 11:30:36', '2020-04-04 11:30:36'),
	(1070, 5, '53002-42', 'BTKL - Harian ATM Solo', 4, 'D', 1, '103', 0, '2020-04-04 11:30:59', '2020-04-04 11:30:59'),
	(1071, 5, '53002-43', 'BTKL - Harian ATM Solo Lembur/Over Time', 4, 'D', 1, '103', 0, '2020-04-04 11:31:23', '2020-04-04 11:31:23'),
	(1072, 5, '53002-44', 'BTKL - Harian ATM Solo THR/Bonus/Tunjangan & Insentif', 4, 'D', 1, '103', 0, '2020-04-04 11:31:45', '2020-04-04 11:31:45'),
	(1073, 5, '54003-01', 'BTKTL - Harian Adm Gudang', 4, 'D', 1, '110', 0, '2020-04-04 11:38:49', '2020-04-04 11:38:49'),
	(1074, 5, '54003-02', 'BTKTL - Mandor & Manager Produksi', 4, 'D', 1, '110', 0, '2020-04-04 11:39:33', '2020-04-04 11:39:33'),
	(1075, 5, '54003-03', 'BTKTL - Harian Adm Umum, Design & Driver', 4, 'D', 1, '110', 0, '2020-04-04 11:40:11', '2020-04-04 11:40:11'),
	(1076, 5, '54003-04', 'BTKTL - Lembur/Over Time', 4, 'D', 1, '110', 0, '2020-04-04 11:40:34', '2020-04-04 11:40:34'),
	(1077, 5, '54003-05', 'BTKTL - THR/Bonus/Tunjangan & Insentif', 4, 'D', 1, '110', 0, '2020-04-04 11:41:00', '2020-04-04 11:41:00'),
	(1078, 5, '54003-06', 'BTKTL - Lainnya', 4, 'D', 1, '110', 0, '2020-04-04 11:41:25', '2020-04-04 11:41:25'),
	(1079, 5, '54003-07', 'BTKTL - Accessories & Lainnya', 4, 'D', 1, '110', 0, '2020-04-04 11:41:45', '2020-04-04 11:41:45'),
	(1080, 5, '54004-01', 'BOP Bahan Pembantu - Accessories', 4, 'D', 1, '111', 0, '2020-04-04 11:43:13', '2020-04-04 11:43:13'),
	(1081, 5, '54004-02', 'BOP Bahan Pembantu - Bahan Bakar Batu Bara, Minyak & Kayu', 4, 'D', 1, '111', 0, '2020-04-04 11:43:43', '2020-04-04 11:43:43'),
	(1082, 5, '54004-03', 'BOP Bahan Pembantu - Benang', 4, 'D', 1, '111', 0, '2020-04-04 11:44:15', '2020-04-04 11:44:15'),
	(1083, 5, '54004-04', 'BOP Bahan Pembantu - Chemical/Obat', 4, 'D', 1, '111', 0, '2020-04-04 11:44:41', '2020-04-04 11:44:41'),
	(1084, 5, '54004-05', 'BOP Bahan Pembantu - Lainnya', 4, 'D', 1, '111', 0, '2020-04-04 11:45:04', '2020-04-04 11:45:04'),
	(1085, 1, '12001-01', 'Tanah - Gapuro Sukolilo (Celup & Mess)', 4, 'D', 1, '40', 0, '2020-04-04 12:00:28', '2020-04-04 12:00:28'),
	(1086, 1, '12001-02', 'Tanah - KH.Zubair XXVIII/8 (Produksi & Office) NOP.002-0065.0', 4, 'D', 1, '40', 0, '2020-04-04 12:01:26', '2020-04-04 12:01:26'),
	(1087, 1, '12001-03', 'Tanah - KH.Zubair XXVIII/8 (Produksi & Office) NOP.002-0066.0', 4, 'D', 1, '40', 0, '2020-04-04 12:01:57', '2020-04-04 12:01:57'),
	(1088, 1, '12001-04', 'Tanah - Gudang Produksi Solo', 4, 'D', 1, '40', 0, '2020-04-04 12:02:29', '2020-04-04 12:02:29'),
	(1089, 1, '12002-01', 'Gedung - Gapuro Sukolilo (Celup & Mess)', 4, 'D', 1, '41', 0, '2020-04-04 12:03:53', '2020-04-04 12:03:53'),
	(1090, 1, '12002-02', 'Gedung - KH.Zubair XXVIII/8 (Produksi & Office) NOP.002-0065.0', 4, 'D', 1, '41', 0, '2020-04-04 12:04:27', '2020-04-04 12:04:27'),
	(1091, 1, '12002-03', 'Gedung - KH.Zubair XXVIII/8 (Produksi & Office) NOP.002-0066.0', 4, 'D', 1, '41', 0, '2020-04-04 12:04:52', '2020-04-04 12:04:52'),
	(1092, 1, '12002-04', 'Gedung - Gudang Produksi Solo', 4, 'D', 1, '41', 0, '2020-04-04 12:05:17', '2020-04-04 12:05:17'),
	(1093, 1, '15001-01', 'AKM Peny. Gedung - Gapuro Sukolilo (Celup & Mess)', 4, 'K', 1, '42', 0, '2020-04-04 12:06:42', '2020-04-04 12:06:42'),
	(1094, 1, '15001-02', 'AKM Peny. Gedung - KH.Zubair XXVIII/8 (Produksi & Office) NOP.002-0065.0', 4, 'K', 1, '42', 0, '2020-04-04 12:07:06', '2020-04-04 12:07:06'),
	(1095, 1, '15001-03', 'AKM Peny. Gedung - KH.Zubair XXVIII/8 (Produksi & Office) NOP.002-0066.0', 4, 'K', 1, '42', 0, '2020-04-04 12:07:32', '2020-04-04 12:07:32'),
	(1096, 1, '15001-04', 'AKM Peny. Gedung - Gudang Produksi Solo', 4, 'K', 1, '42', 0, '2020-04-04 12:07:59', '2020-04-04 12:07:59'),
	(1097, 1, '12003-01', 'Mesin - ATBM', 4, 'D', 1, '43', 0, '2020-04-04 12:09:07', '2020-04-04 12:09:07'),
	(1098, 1, '12003-02', 'Mesin - ATM Gresik', 4, 'D', 1, '43', 0, '2020-04-04 12:09:33', '2020-04-04 12:09:33'),
	(1099, 1, '12003-03', 'Mesin - ATM Solo', 4, 'D', 1, '43', 0, '2020-04-04 12:09:56', '2020-04-04 12:09:56'),
	(1100, 1, '15002-01', 'AKM Peny. Mesin - ATBM', 4, 'K', 1, '44', 0, '2020-04-04 12:11:13', '2020-04-04 12:11:13'),
	(1101, 1, '15002-02', 'AKM Peny. Mesin - ATM Gresik', 4, 'K', 1, '44', 0, '2020-04-04 12:11:47', '2020-04-04 12:11:47'),
	(1102, 1, '15002-03', 'AKM Peny. Mesin - ATM Solo', 4, 'K', 1, '44', 0, '2020-04-04 12:12:12', '2020-04-04 12:12:12'),
	(1103, 1, '12004-01', 'Kendaraan - Mobil', 4, 'D', 1, '45', 0, '2020-04-04 12:13:00', '2020-04-04 12:13:00'),
	(1104, 1, '12004-02', 'Kendaraan - Motor', 4, 'D', 1, '45', 0, '2020-04-04 12:13:21', '2020-04-04 12:13:21'),
	(1105, 1, '15003-01', 'AKM Peny. Kendaraan - Mobil', 4, 'K', 1, '46', 0, '2020-04-04 12:14:12', '2020-04-04 12:14:12'),
	(1106, 1, '15003-02', 'AKM Peny. Kendaraan - Motor', 4, 'K', 1, '46', 0, '2020-04-04 12:14:39', '2020-04-04 12:14:39'),
	(1107, 1, '11301-54', 'Piutang Usaha - Habib Achmad Assegaff', 5, 'D', 1, '21', 0, '2020-08-27 10:36:31', '2020-08-27 10:36:31'),
	(1108, 1, '11301-55', 'Piutang Usaha - PT. TAT', 5, 'D', 1, '21', 0, '2020-08-27 10:38:18', '2020-08-27 10:38:18'),
	(1109, 1, '11401-01-41', 'Persediaan Barang Jadi - MRS SKP', 6, 'D', 1, '293', 0, '2020-08-27 10:42:03', '2020-08-27 10:42:03'),
	(1110, 1, '11401-01-42', 'Persediaan Barang Jadi - MRS CTI', 6, 'D', 1, '293', 0, '2020-08-27 10:42:45', '2020-08-27 10:42:45'),
	(1111, 1, '11401-02-13', 'Persediaan Barang Jadi - TR Ardan Star', 6, 'D', 1, '334', 0, '2020-08-27 10:44:17', '2020-08-27 10:44:17'),
	(1112, 1, '11401-02-14', 'Persediaan Barang Jadi - TR Ardan Star JKM', 6, 'D', 1, '334', 0, '2020-08-27 10:45:03', '2020-08-27 10:45:03'),
	(1113, 1, '11401-02-15', 'Persediaan Barang Jadi - TR Ardan Star TSK', 6, 'D', 1, '334', 0, '2020-08-27 10:45:47', '2020-08-27 10:45:47'),
	(1114, 1, '11401-02-16', 'Persediaan Barang Jadi - TR Ardan Star DSK', 6, 'D', 1, '334', 0, '2020-08-27 10:46:21', '2020-08-27 10:46:21'),
	(1115, 1, '11401-04-11', 'Persediaan Barang Jadi - Sutra MST.210 (50%)', 6, 'D', 1, '350', 0, '2020-08-27 10:48:53', '2020-08-27 10:48:53'),
	(1116, 1, '11401-04-12', 'Persediaan Barang Jadi - Sutra SKP 210', 6, 'D', 1, '350', 0, '2020-08-27 10:49:33', '2020-08-27 10:49:33'),
	(1117, 1, '11401-05-41', 'Persediaan Barang Jadi - MRS SKP BS', 6, 'D', 1, '361', 0, '2020-08-27 10:51:23', '2020-08-27 10:51:23'),
	(1118, 1, '11401-05-42', 'Persediaan Barang Jadi - MRS CTI BS', 6, 'D', 1, '361', 0, '2020-08-27 10:52:01', '2020-08-27 10:52:01'),
	(1119, 1, '11401-06-13', 'Persediaan Barang Jadi - TR Ardan Star BS', 6, 'D', 1, '402', 0, '2020-08-27 10:53:31', '2020-08-27 10:53:31'),
	(1120, 1, '11401-06-14', 'Persediaan Barang Jadi - TR Ardan Star JKM BS', 6, 'D', 1, '402', 0, '2020-08-27 10:54:20', '2020-08-27 10:54:20'),
	(1121, 1, '11401-06-15', 'Persediaan Barang Jadi - TR Ardan Star TSK BS', 6, 'D', 1, '402', 0, '2020-08-27 10:55:27', '2020-08-27 10:55:27'),
	(1122, 1, '11401-06-16', 'Persediaan Barang Jadi - TR Ardan Star DSK BS', 6, 'D', 1, '402', 0, '2020-08-27 10:56:14', '2020-08-27 10:56:14'),
	(1123, 1, '11401-08-11', 'Persediaan Barang Jadi - Sutra MST.210 (50%) BS', 6, 'D', 1, '418', 0, '2020-08-27 10:57:31', '2020-08-27 10:57:31'),
	(1124, 1, '11401-08-12', 'Persediaan Barang Jadi - Sutra SKP 210 BS', 6, 'D', 1, '418', 0, '2020-08-27 10:58:14', '2020-08-27 10:58:14'),
	(1125, 1, '11401-09-41', 'Persediaan Barang Jadi - MRS SKP BS Parah', 6, 'D', 1, '429', 0, '2020-08-27 11:00:06', '2020-08-27 11:00:06'),
	(1126, 1, '11401-09-42', 'Persediaan Barang Jadi - MRS CTI BS Parah', 6, 'D', 1, '429', 0, '2020-08-27 11:01:06', '2020-08-27 11:01:06'),
	(1127, 1, '11401-10-13', 'Persediaan Barang Jadi - TR Ardan Star BS Parah', 6, 'D', 1, '470', 0, '2020-08-27 11:02:49', '2020-08-27 11:02:49'),
	(1128, 1, '11401-10-14', 'Persediaan Barang Jadi - TR Ardan Star JKM BS Parah', 6, 'D', 1, '470', 0, '2020-08-27 11:03:35', '2020-08-27 11:03:35'),
	(1129, 1, '11401-10-15', 'Persediaan Barang Jadi - TR Ardan Star TSK BS Parah', 6, 'D', 1, '470', 0, '2020-08-27 11:04:17', '2020-08-27 11:04:17'),
	(1130, 1, '11401-10-16', 'Persediaan Barang Jadi - TR Ardan Star DSK BS Parah', 6, 'D', 1, '470', 0, '2020-08-27 11:04:46', '2020-08-27 11:04:46'),
	(1131, 1, '11401-12-11', 'Persediaan Barang Jadi - Sutra MST.210 (50%) BS Parah', 6, 'D', 1, '486', 0, '2020-08-27 11:06:11', '2020-08-27 11:06:11'),
	(1132, 1, '11401-12-12', 'Persediaan Barang Jadi - Sutra SKP 210 BS Parah', 6, 'D', 1, '486', 0, '2020-08-27 11:06:41', '2020-08-27 11:06:41'),
	(1133, 1, '11402-02-08', 'Persediaan Bahan Baku - Obat Dispers', 6, 'D', 1, '511', 0, '2020-08-27 11:08:10', '2020-08-27 11:08:10'),
	(1134, 2, '21001-195', 'Hutang Usaha - Maratex', 4, 'K', 1, '205', 0, '2020-08-27 11:19:20', '2020-08-27 11:19:20'),
	(1135, 2, '21001-196', 'Hutang Usaha - CV. Sejahtera Kemasan', 4, 'K', 1, '205', 0, '2020-08-27 11:20:14', '2020-08-27 11:20:14'),
	(1136, 2, '21001-197', 'Hutang Usaha - Parwitex', 4, 'K', 1, '205', 0, '2020-08-27 11:20:44', '2020-08-27 11:20:44'),
	(1137, 2, '21001-198', 'Hutang Usaha - PT. Dan Liris', 4, 'K', 1, '205', 0, '2020-08-27 11:21:19', '2020-08-27 11:21:19'),
	(1138, 2, '21001-199', 'Hutang Usaha - Presesi Utama', 4, 'K', 1, '205', 0, '2020-08-27 11:21:48', '2020-08-27 11:21:48'),
	(1139, 4, '41001-41', 'Penjualan - MRS SKP', 4, 'K', 1, '776', 0, '2020-08-27 11:28:38', '2020-08-27 11:28:38'),
	(1140, 4, '41001-42', 'Penjualan - MRS CTI', 4, 'K', 1, '776', 0, '2020-08-27 11:29:07', '2020-08-27 11:29:07'),
	(1141, 4, '41002-13', 'Penjualan - TR Ardan Star', 4, 'K', 1, '817', 0, '2020-08-27 11:31:06', '2020-08-27 11:31:06'),
	(1142, 4, '41002-14', 'Penjualan - TR Ardan Star JKM', 4, 'K', 1, '817', 0, '2020-08-27 11:31:48', '2020-08-27 11:31:48'),
	(1143, 4, '41002-15', 'Penjualan - TR Ardan Star TSK', 4, 'K', 1, '817', 0, '2020-08-27 11:32:44', '2020-08-27 11:32:44'),
	(1144, 4, '41002-16', 'Penjualan - TR Ardan Star DSK', 4, 'K', 1, '817', 0, '2020-08-27 11:33:11', '2020-08-27 11:33:11'),
	(1145, 4, '41004-11', 'Penjualan - Sutra MST.210 (50%)', 4, 'K', 1, '833', 0, '2020-08-27 11:34:45', '2020-08-27 11:34:45'),
	(1146, 4, '41004-12', 'Penjualan - Sutra SKP 210', 4, 'K', 1, '833', 0, '2020-08-27 11:35:12', '2020-08-27 11:35:12'),
	(1147, 4, '41005-41', 'Penjualan - MRS SKP BS', 4, 'K', 1, '844', 0, '2020-08-27 11:36:03', '2020-08-27 11:36:03'),
	(1148, 4, '41005-42', 'Penjualan - MRS CTI BS', 4, 'K', 1, '844', 0, '2020-08-27 11:36:30', '2020-08-27 11:36:30'),
	(1149, 4, '41006-13', 'Penjualan - TR Ardan Star BS', 4, 'K', 1, '885', 0, '2020-08-27 11:37:58', '2020-08-27 11:37:58'),
	(1150, 4, '41006-14', 'Penjualan - TR Ardan Star JKM BS', 4, 'K', 1, '885', 0, '2020-08-27 11:38:33', '2020-08-27 11:38:33'),
	(1151, 4, '41006-15', 'Penjualan - TR Ardan Star TSK BS', 4, 'K', 1, '885', 0, '2020-08-27 11:39:11', '2020-08-27 11:39:11'),
	(1152, 4, '41006-16', 'Penjualan - TR Ardan Star DSK BS', 4, 'K', 1, '885', 0, '2020-08-27 11:39:44', '2020-08-27 11:39:44'),
	(1153, 4, '41008-11', 'Penjualan - Sutra MST.210 (50%) BS', 4, 'K', 1, '901', 0, '2020-08-27 11:40:42', '2020-08-27 11:40:42'),
	(1154, 4, '41008-12', 'Penjualan - Sutra SKP 210 BS', 4, 'K', 1, '901', 0, '2020-08-27 11:41:18', '2020-08-27 11:41:18'),
	(1155, 4, '41009-41', 'Penjualan - MRS SKP BS Parah', 4, 'K', 1, '912', 0, '2020-08-27 11:42:22', '2020-08-27 11:42:22'),
	(1156, 4, '41009-42', 'Penjualan - MRS CTI BS Parah', 4, 'K', 1, '912', 0, '2020-08-27 11:43:02', '2020-08-27 11:43:02'),
	(1157, 4, '41010-13', 'Penjualan - TR Ardan Star BS Parah', 4, 'K', 1, '953', 0, '2020-08-27 11:44:19', '2020-08-27 11:44:19'),
	(1158, 4, '41010-14', 'Penjualan - TR Ardan Star JKM BS Parah', 4, 'K', 1, '953', 0, '2020-08-27 11:44:53', '2020-08-27 11:44:53'),
	(1159, 4, '41010-15', 'Penjualan - TR Ardan Star TSK BS Parah', 4, 'K', 1, '953', 0, '2020-08-27 11:45:27', '2020-08-27 11:45:27'),
	(1160, 4, '41010-16', 'Penjualan - TR Ardan Star DSK BS Parah', 4, 'K', 1, '953', 0, '2020-08-27 11:46:04', '2020-08-27 11:46:04'),
	(1161, 4, '41012-11', 'Penjualan - Sutra MST.210 (50%) BS Parah', 4, 'K', 1, '969', 0, '2020-08-27 11:47:14', '2020-08-27 11:47:14'),
	(1162, 4, '41012-12', 'Penjualan - Sutra SKP 210 BS Parah', 4, 'K', 1, '969', 0, '2020-08-27 11:47:48', '2020-08-27 11:47:48'),
	(1163, 5, '52002-08', 'Pembelian Bahan Baku - Obat Dispers', 4, 'D', 1, '994', 0, '2020-08-27 13:11:39', '2020-08-27 13:11:39'),
	(1164, 5, '53001-02-08', 'Biaya Pemakaian Bahan Baku Chemical/Obat/Pewarna - Obat Dispers', 5, 'D', 1, '1021', 0, '2020-08-27 13:24:27', '2020-08-27 13:24:27'),
	(1165, 6, '63028-03', 'Bi. Adm & Umum - Project Luar Lainnya', 4, 'D', 1, '231', 0, '2020-08-27 13:29:27', '2020-08-27 13:29:27'),
	(1166, 6, '63031', 'Bi. Adm & Umum - CSR (Corporates Social Responsiblities)', 3, 'D', 1, '151', 0, '2020-08-27 13:32:11', '2020-08-27 13:32:11'),
	(1167, 6, '63032', 'Bi. Adm & Umum - LVA (Low Value Assets)', 3, 'D', 1, '151', 0, '2020-08-27 13:32:55', '2020-08-27 13:32:55'),
	(1168, 6, '63028-04', 'Bi. Adm & Umum - Project Luar Property', 4, 'D', 1, '231', 0, '2020-09-08 10:39:47', '2020-09-08 10:39:47'),
	(1170, 1, '11302-01', 'Piutang Karyawan ATBM', 5, 'D', 0, '22', 0, '2020-09-18 10:33:47', '2020-09-18 10:34:35'),
	(1171, 1, '11302-01-01', 'Piutang Karyawan ATBM - Hermono', 6, 'D', 1, '1170', 0, '2020-09-18 10:39:12', '2020-09-18 10:39:12'),
	(1172, 1, '11302-01-02', 'Piutang Karyawan ATBM - Misman', 6, 'D', 1, '1170', 0, '2020-09-18 10:40:20', '2020-09-18 10:40:20'),
	(1173, 1, '11302-01-03', 'Piutang Karyawan ATBM - Muhamad Alkatiri', 6, 'D', 1, '1170', 0, '2020-09-18 10:41:19', '2020-09-18 10:41:19'),
	(1174, 1, '11302-01-04', 'Piutang Karyawan ATBM - Munawi', 6, 'D', 1, '1170', 0, '2020-09-18 10:43:43', '2020-09-18 10:43:43'),
	(1175, 1, '11302-01-05', 'Piutang Karyawan ATBM - (Vacant 1)', 6, 'D', 1, '1170', 0, '2020-09-18 10:44:34', '2020-09-18 10:44:34'),
	(1176, 1, '11302-02', 'Piutang Karyawan ATM Solo', 5, 'D', 0, '22', 0, '2020-09-18 10:46:20', '2020-09-18 10:46:20'),
	(1177, 1, '11302-02-01', 'Piutang Karyawan ATM Solo - (Vacant 1)', 6, 'D', 1, '1176', 0, '2020-09-18 10:48:22', '2020-09-18 10:48:22'),
	(1178, 1, '11302-02-02', 'Piutang Karyawan ATM Solo - (Vacant 2)', 6, 'D', 1, '1176', 0, '2020-09-18 10:49:10', '2020-09-18 10:49:10'),
	(1179, 1, '11302-03', 'Piutang Karyawan ATM Gresik', 5, 'D', 0, '22', 0, '2020-09-18 10:50:01', '2020-09-18 10:50:01'),
	(1180, 1, '11302-03-01', 'Piutang Karyawan ATM Gresik - (Vacant 1)', 6, 'D', 1, '1179', 0, '2020-09-18 10:52:18', '2020-09-18 10:52:18'),
	(1181, 1, '11302-03-02', 'Piutang Karyawan ATM Gresik - (Vacant 2)', 6, 'D', 1, '1179', 0, '2020-09-18 10:53:32', '2020-09-18 10:53:32'),
	(1182, 1, '11401-01-43', 'Persediaan Barang Jadi - MRS Platinum KD', 6, 'D', 1, '293', 0, '2020-10-28 14:34:08', '2020-10-28 14:34:08'),
	(1183, 1, '11401-02-17', 'Persediaan Barang Jadi - TR MRS Platinum KDB', 6, 'D', 1, '334', 0, '2020-10-28 14:46:04', '2020-10-28 14:46:04'),
	(1184, 1, '11401-05-43', 'Persediaan Barang Jadi - MRS Platinum KD BS', 6, 'D', 1, '361', 0, '2020-10-28 14:47:57', '2020-10-28 14:47:57'),
	(1185, 1, '11401-06-17', 'Persediaan Barang Jadi - TR MRS Platinum KDB BS', 6, 'D', 1, '402', 0, '2020-10-28 14:49:23', '2020-10-28 14:49:23'),
	(1186, 1, '11401-09-43', 'Persediaan Barang Jadi - MRS Platinum KD BS Parah', 6, 'D', 1, '429', 0, '2020-10-28 14:53:38', '2020-10-28 14:53:57'),
	(1187, 1, '11401-10-17', 'Persediaan Barang Jadi - TR MRS Platinum KDB BS Parah', 6, 'D', 1, '470', 0, '2020-10-28 14:55:30', '2020-10-28 14:55:30'),
	(1188, 4, '41001-43', 'Penjualan - MRS Platinum KD', 4, 'K', 1, '776', 0, '2020-10-28 14:59:44', '2020-10-28 14:59:44'),
	(1189, 4, '41002-17', 'Penjualan - TR MRS Platinum KDB', 4, 'K', 1, '817', 0, '2020-10-28 15:01:06', '2020-10-28 15:01:06'),
	(1190, 4, '41005-43', 'Penjualan - MRS Platinum KD BS', 4, 'K', 1, '844', 0, '2020-10-28 15:03:54', '2020-10-28 15:03:54'),
	(1191, 4, '41006-17', 'Penjualan - TR MRS Platinum KDB BS', 4, 'K', 1, '885', 0, '2020-10-28 15:05:09', '2020-10-28 15:05:09'),
	(1192, 4, '41009-43', 'Penjualan - MRS Platinum KD BS Parah', 4, 'K', 1, '912', 0, '2020-10-28 15:15:59', '2020-10-28 15:15:59'),
	(1193, 4, '41010-17', 'Penjualan - TR MRS Platinum KDB BS Parah', 4, 'K', 1, '953', 0, '2020-10-28 15:17:21', '2020-10-28 15:17:21'),
	(1194, 1, '11401-02-18', 'Persediaan Barang Jadi - TR Ardan Star DBL', 6, 'D', 1, '334', 0, '2020-10-30 15:05:11', '2020-10-30 15:05:11'),
	(1195, 1, '11401-06-18', 'Persediaan Barang Jadi - TR Ardan Star DBL BS', 6, 'D', 1, '402', 0, '2020-10-30 15:08:06', '2020-10-30 15:08:06'),
	(1196, 1, '11401-10-18', 'Persediaan Barang Jadi - TR Ardan Star DBL BS Parah', 6, 'D', 1, '470', 0, '2020-10-30 15:10:44', '2020-10-30 15:11:04'),
	(1197, 4, '41002-18', 'Penjualan - TR Ardan Star DBL', 4, 'K', 1, '817', 0, '2020-10-30 15:18:20', '2020-10-30 15:18:20'),
	(1198, 4, '41006-18', 'Penjualan - TR Ardan Star DBL BS', 4, 'K', 1, '885', 0, '2020-10-30 15:21:09', '2020-10-30 15:21:09'),
	(1199, 4, '41010-18', 'Penjualan - TR Ardan Star DBL BS Parah', 4, 'K', 1, '953', 0, '2020-10-30 15:23:21', '2020-10-30 15:23:21'),
	(1200, 1, '11401-02-19', 'Persediaan Barang Jadi - TR MRS Platinum KSD', 6, 'D', 1, '334', 0, '2020-10-31 08:44:15', '2020-10-31 08:44:15'),
	(1201, 1, '11401-06-19', 'Persediaan Barang Jadi - TR MRS Platinum KSD BS', 6, 'D', 1, '402', 0, '2020-10-31 08:47:38', '2020-10-31 08:47:38'),
	(1202, 1, '11401-10-19', 'Persediaan Barang Jadi - TR MRS Platinum KSD BS Parah', 6, 'D', 1, '470', 0, '2020-10-31 08:53:23', '2020-10-31 08:53:23'),
	(1203, 4, '41002-19', 'Penjualan - TR MRS Platinum KSD', 4, 'K', 1, '817', 0, '2020-10-31 09:18:27', '2020-10-31 09:18:27'),
	(1204, 4, '41006-19', 'Penjualan - TR MRS Platinum KSD BS', 4, 'K', 1, '885', 0, '2020-10-31 09:23:36', '2020-10-31 09:23:36'),
	(1205, 4, '41010-19', 'Penjualan - TR MRS Platinum BS Parah', 4, 'K', 1, '953', 0, '2020-10-31 09:28:02', '2020-10-31 09:28:02'),
	(1206, 1, '11301-56', 'Piutang Usaha - Abdul Aziz M Balahmar', 5, 'D', 1, '21', 0, '2020-11-02 10:58:26', '2020-11-02 10:58:26'),
	(1207, 1, '11301-57', 'Piutang Usaha - PT. Alfmas Indo Global', 5, 'D', 1, '21', 0, '2020-11-12 11:37:16', '2020-11-12 11:37:16'),
	(1208, 1, '11221', 'BCA 015-406-6493 Wahyu Seli Puspita', 4, 'D', 1, '7', 0, '2020-11-13 13:33:43', '2020-11-13 13:33:43'),
	(1209, 1, '11401-13', 'Persediaan Barang Jadi - TN', 5, 'D', 0, '26', 0, '2020-11-17 11:31:58', '2020-11-17 11:31:58'),
	(1210, 1, '11401-14', 'Persediaan Barang Jadi - TN BS', 5, 'D', 0, '26', 0, '2020-11-17 11:36:07', '2020-11-17 11:36:07'),
	(1211, 1, '11401-15', 'Persediaan Barang Jadi - TN BS Parah', 5, 'D', 0, '26', 0, '2020-11-17 11:36:55', '2020-11-17 11:36:55'),
	(1212, 1, '11401-13-01', 'Persediaan Barang Jadi - TN Ardan TKP', 6, 'D', 1, '1209', 0, '2020-11-17 11:38:16', '2020-11-17 11:38:16'),
	(1213, 1, '11401-13-02', 'Persediaan Barang Jadi - TN Ketjubung Platinum TIS', 6, 'D', 1, '1209', 0, '2020-11-17 11:38:58', '2020-12-04 15:03:42'),
	(1214, 1, '11401-13-03', 'Persediaan Barang Jadi - TN Ketjubung Platinum JSK', 6, 'D', 1, '1209', 0, '2020-11-17 11:41:08', '2020-12-04 15:03:55'),
	(1215, 1, '11401-14-01', 'Persediaan Barang Jadi - TN Ardan TKP BS', 6, 'D', 1, '1210', 0, '2020-11-17 11:57:36', '2020-11-17 11:57:36'),
	(1216, 1, '11401-14-02', 'Persediaan Barang Jadi - TN Ketjubung Platinum TIS BS', 6, 'D', 1, '1210', 0, '2020-11-17 11:58:32', '2020-12-04 15:18:30'),
	(1217, 1, '11401-14-03', 'Persediaan Barang Jadi - TN Ketjubung Platinum JSK BS', 6, 'D', 1, '1210', 0, '2020-11-17 11:59:22', '2020-12-04 15:18:45'),
	(1218, 1, '11401-15-01', 'Persediaan Barang Jadi - TN Ardan TKP BS Parah', 6, 'D', 1, '1211', 0, '2020-11-17 12:00:45', '2020-11-17 12:00:45'),
	(1219, 1, '11401-15-02', 'Persediaan Barang Jadi - TN Ketjubung Platinum TIS BS Parah', 6, 'D', 1, '1211', 0, '2020-11-17 12:01:28', '2020-12-04 15:22:02'),
	(1220, 1, '11401-15-03', 'Persediaan Barang Jadi - TN Ketjubung Platinum JSK BS Parah', 6, 'D', 1, '1211', 0, '2020-11-17 12:02:13', '2020-12-04 15:22:26'),
	(1221, 4, '41013', 'Penjualan - TN', 3, 'K', 0, '90', 0, '2020-11-17 13:36:04', '2020-11-17 13:36:04'),
	(1222, 4, '41014', 'Penjualan - TN BS', 3, 'K', 0, '90', 0, '2020-11-17 13:36:39', '2020-11-17 13:36:39'),
	(1223, 4, '41015', 'Penjualan - TN BS Parah', 3, 'K', 0, '90', 0, '2020-11-17 13:37:26', '2020-11-17 13:37:26'),
	(1224, 4, '41013-01', 'Penjualan - TN Ardan TKP', 4, 'K', 1, '1221', 0, '2020-11-17 13:38:40', '2020-11-17 13:38:40'),
	(1225, 4, '41013-02', 'Penjualan - TN Ketjubung Platinum TIS', 4, 'K', 1, '1221', 0, '2020-11-17 13:40:03', '2020-12-04 15:47:30'),
	(1226, 4, '41013-03', 'Penjualan - TN Ketjubung Platinum JSK', 4, 'K', 1, '1221', 0, '2020-11-17 13:40:57', '2020-12-04 15:47:42'),
	(1227, 4, '41014-01', 'Penjualan - TN Ardan TKP BS', 4, 'K', 1, '1222', 0, '2020-11-17 13:42:33', '2020-11-17 13:42:33'),
	(1228, 4, '41014-02', 'Penjualan - TN Ketjubung Platinum TIS BS', 4, 'K', 1, '1222', 0, '2020-11-17 13:44:31', '2020-12-04 15:49:56'),
	(1229, 4, '41014-03', 'Penjualan - TN Ketjubung Platinum JSK BS', 4, 'K', 1, '1222', 0, '2020-11-17 13:45:37', '2020-12-04 15:50:07'),
	(1230, 4, '41015-01', 'Penjualan - TN Ardan TKP BS Parah', 4, 'K', 1, '1223', 0, '2020-11-17 13:51:40', '2020-11-17 13:51:40'),
	(1231, 4, '41015-02', 'Penjualan - TN Ketjubung Platinum TIS BS Parah', 4, 'K', 1, '1223', 0, '2020-11-17 13:52:22', '2020-12-04 15:52:03'),
	(1232, 4, '41015-03', 'Penjualan - TN Ketjubung Platinum JSK BS Parah', 4, 'K', 1, '1223', 0, '2020-11-17 13:53:06', '2020-12-04 15:52:16'),
	(1233, 1, '11401-13-04', 'Persediaan Barang Jadi - TN Ketjubung Platinum DPK', 6, 'D', 1, '1209', 0, '2020-11-17 15:52:16', '2020-12-04 15:04:12'),
	(1234, 1, '11401-14-04', 'Persediaan Barang Jadi - TN Ketjubung Platinum DPK BS', 6, 'D', 1, '1210', 0, '2020-11-17 15:53:04', '2020-12-04 15:19:02'),
	(1235, 1, '11401-15-04', 'Persediaan Barang Jadi - TN Ketjubung Platinum DPK BS Parah', 6, 'D', 1, '1211', 0, '2020-11-17 15:54:02', '2020-12-04 15:22:42'),
	(1236, 4, '41013-04', 'Penjualan - TN Ketjubung Platinum DPK', 4, 'K', 1, '1221', 0, '2020-11-17 15:56:48', '2020-12-04 15:47:52'),
	(1237, 4, '41014-04', 'Penjualan - TN Ketjubung Platinum DPK BS', 4, 'K', 1, '1222', 0, '2020-11-17 15:57:36', '2020-12-04 15:50:16'),
	(1238, 4, '41015-04', 'Penjualan - TN Ketjubung Platinum DPK BS Parah', 4, 'K', 1, '1223', 0, '2020-11-17 15:58:18', '2020-12-04 15:52:28'),
	(1239, 1, '11401-01-44', 'Persediaan Barang Jadi - MRS SCP', 6, 'D', 1, '293', 0, '2020-11-21 10:34:51', '2020-11-21 10:34:51'),
	(1240, 1, '11401-05-44', 'Persediaan Barang Jadi - MRS SCP BS', 6, 'D', 1, '361', 0, '2020-11-21 10:36:59', '2020-11-21 10:36:59'),
	(1241, 1, '11401-09-44', 'Persediaan Barang Jadi - MRS SCP BS Parah', 6, 'D', 1, '429', 0, '2020-11-21 10:42:00', '2020-11-21 10:42:00'),
	(1242, 4, '41001-44', 'Penjualan - MRS SCP', 4, 'K', 1, '776', 0, '2020-11-21 10:49:36', '2020-11-21 10:49:36'),
	(1243, 4, '41005-44', 'Penjualan - MRS SCP BS', 4, 'K', 1, '844', 0, '2020-11-21 10:50:56', '2020-11-21 10:50:56'),
	(1244, 4, '41009-44', 'Penjualan - MRS SCP BS Parah', 4, 'K', 1, '912', 0, '2020-11-21 10:52:01', '2020-11-21 10:52:01'),
	(1245, 1, '11401-02-20', 'Persediaan Barang Jadi - TR Ardan Star SEL', 6, 'D', 1, '334', 0, '2020-11-23 09:26:15', '2020-12-05 09:39:40'),
	(1246, 1, '11401-06-20', 'Persediaan Barang Jadi - TR Ardan Star SEL BS', 6, 'D', 1, '402', 0, '2020-11-23 09:27:21', '2020-12-05 09:40:43'),
	(1247, 1, '11401-10-20', 'Persediaan Barang Jadi - TR Ardan Star SEL BS Parah', 6, 'D', 1, '470', 0, '2020-11-23 09:29:35', '2020-12-05 09:41:35'),
	(1248, 4, '41002-20', 'Penjualan - TR Ardan Star SEL', 4, 'K', 1, '817', 0, '2020-11-23 09:34:59', '2020-12-05 09:46:12'),
	(1249, 4, '41006-20', 'Penjualan - TR Ardan Star SEL BS', 4, 'K', 1, '885', 0, '2020-11-23 09:36:05', '2020-12-05 09:46:41'),
	(1250, 4, '41010-20', 'Penjualan - TR Ardan Star SEL BS Parah', 4, 'K', 1, '953', 0, '2020-11-23 09:37:14', '2020-12-05 09:47:10'),
	(1251, 1, '11401-02-21', 'Persediaan Barang Jadi - TR Ardan JKM', 6, 'D', 1, '334', 0, '2020-11-24 11:12:43', '2020-12-10 15:02:38'),
	(1252, 1, '11401-02-22', 'Persediaan Barang Jadi - TR Ardan Baru 2', 6, 'D', 1, '334', 0, '2020-11-24 11:13:58', '2020-11-24 11:13:58'),
	(1253, 1, '11401-06-21', 'Persediaan Barang Jadi - TR Ardan JKM BS', 6, 'D', 1, '402', 0, '2020-11-24 11:14:47', '2020-12-10 15:02:11'),
	(1254, 1, '11401-06-22', 'Persediaan Barang Jadi - TR Ardan Baru 2 BS', 6, 'D', 1, '402', 0, '2020-11-24 11:15:32', '2020-11-24 11:15:32'),
	(1255, 1, '11401-10-21', 'Persediaan Barang Jadi - TR Ardan JKM BS Parah', 6, 'D', 1, '470', 0, '2020-11-24 11:16:31', '2020-12-10 15:04:11'),
	(1256, 1, '11401-10-22', 'Persediaan Barang Jadi - TR Ardan Baru 2 BS Parah', 6, 'D', 1, '470', 0, '2020-11-24 11:17:45', '2020-11-24 11:17:45'),
	(1257, 4, '41002-21', 'Penjualan - TR Ardan JKM', 4, 'K', 1, '817', 0, '2020-11-24 11:22:07', '2020-12-10 15:09:17'),
	(1258, 4, '41002-22', 'Penjualan - TR Ardan Baru 2', 4, 'K', 1, '817', 0, '2020-11-24 11:22:34', '2020-11-24 11:22:34'),
	(1259, 4, '41006-21', 'Penjualan - TR Ardan JKM BS', 4, 'K', 1, '885', 0, '2020-11-24 11:23:19', '2020-12-10 15:10:35'),
	(1260, 4, '41006-22', 'Penjualan - TR Ardan Baru 2 BS', 4, 'K', 1, '885', 0, '2020-11-24 11:23:43', '2020-11-24 11:23:54'),
	(1261, 4, '41010-21', 'Penjualan - TR Ardan JKM BS Parah', 4, 'K', 1, '953', 0, '2020-11-24 11:24:41', '2020-12-10 15:12:00'),
	(1262, 4, '41010-22', 'Penjualan - TR Ardan Baru 2 BS Parah', 4, 'K', 1, '953', 0, '2020-11-24 11:25:22', '2020-11-24 11:25:22'),
	(1263, 1, '11401-13-06', 'Persediaan Barang Jadi - TN Ketjubung Platinum DIS', 6, 'D', 1, '1209', 0, '2020-12-03 08:08:16', '2020-12-28 11:50:59'),
	(1264, 1, '11401-14-06', 'Persediaan Barang Jadi - TN Ketjubung Platinum DIS BS', 6, 'D', 1, '1210', 0, '2020-12-03 08:09:05', '2020-12-28 11:51:30'),
	(1265, 1, '11401-15-06', 'Persediaan Barang Jadi - TN Ketjubung Platinum DIS BS Parah', 6, 'D', 1, '1211', 0, '2020-12-03 08:09:51', '2020-12-28 11:51:57'),
	(1266, 4, '41013-06', 'Penjualan - TN Ketjubung Platinum DIS', 4, 'K', 1, '1221', 0, '2020-12-03 08:12:43', '2020-12-28 11:52:50'),
	(1267, 4, '41014-06', 'Penjualan - TN Ketjubung Platinum DIS BS', 4, 'K', 1, '1222', 0, '2020-12-03 08:13:35', '2020-12-28 11:53:11'),
	(1268, 4, '41015-06', 'Penjualan - TN Ketjubung Platinum DIS BS Parah', 4, 'K', 1, '1223', 0, '2020-12-03 08:14:19', '2020-12-28 11:53:42'),
	(1269, 1, '11401-13-05', 'Persediaan Barang Jadi - TN Ardan Baru', 6, 'D', 1, '1209', 0, '2020-12-03 08:22:22', '2020-12-03 08:22:22'),
	(1270, 1, '11401-14-05', 'Persediaan Barang Jadi - TN Ardan Baru BS', 6, 'D', 1, '1210', 0, '2020-12-03 08:23:14', '2020-12-03 08:23:14'),
	(1271, 1, '11401-15-05', 'Persediaan Barang Jadi - TN Ardan Baru BS Parah', 6, 'D', 1, '1211', 0, '2020-12-03 08:24:55', '2020-12-03 08:24:55'),
	(1272, 4, '41013-05', 'Penjualan - TN Ardan Baru', 4, 'K', 1, '1221', 0, '2020-12-03 08:28:08', '2020-12-03 08:28:08'),
	(1273, 4, '41014-05', 'Penjualan - TN Ardan Baru BS', 4, 'K', 1, '1222', 0, '2020-12-03 08:28:51', '2020-12-03 08:28:51'),
	(1274, 4, '41015-05', 'Penjualan - TN Ardan Baru BS Parah', 4, 'K', 1, '1223', 0, '2020-12-03 08:30:17', '2020-12-03 08:30:17'),
	(1275, 1, '11401-13-07', 'Persediaan Barang Jadi - TN Ketjubung Platinum KDB', 6, 'D', 1, '1209', 0, '2020-12-04 15:00:39', '2020-12-04 15:00:39'),
	(1276, 1, '11401-13-08', 'Persediaan Barang Jadi - TN Ketjubung Platinum KSD', 6, 'D', 1, '1209', 0, '2020-12-04 15:03:03', '2020-12-04 15:03:03'),
	(1277, 1, '11401-14-07', 'Persediaan Barang Jadi - TN Ketjubung Platinum KDB BS', 6, 'D', 1, '1210', 0, '2020-12-04 15:05:49', '2020-12-04 15:05:49'),
	(1278, 1, '11401-14-08', 'Persediaan Barang Jadi - TN Ketjubung Platinum KSD BS', 6, 'D', 1, '1210', 0, '2020-12-04 15:06:31', '2020-12-04 15:06:31'),
	(1279, 1, '11401-15-07', 'Persediaan Barang Jadi - TN Ketjubung Platinum KDB BS Parah', 6, 'D', 1, '1211', 0, '2020-12-04 15:20:17', '2020-12-04 15:20:17'),
	(1280, 1, '11401-15-08', 'Persediaan Barang Jadi - TN Ketjubung Platinum KSD BS Parah', 6, 'D', 1, '1211', 0, '2020-12-04 15:21:44', '2020-12-04 15:21:44'),
	(1281, 4, '41013-07', 'Penjualan - TN Ketjubung Platinum KDB', 4, 'K', 1, '1221', 0, '2020-12-04 15:46:12', '2020-12-04 15:46:12'),
	(1282, 4, '41013-08', 'Penjualan - TN Ketjubung Platinum KSD', 4, 'K', 1, '1221', 0, '2020-12-04 15:47:14', '2020-12-04 15:47:14'),
	(1283, 4, '41014-07', 'Penjualan - TN Ketjubung Platinum KDB BS', 4, 'K', 1, '1222', 0, '2020-12-04 15:48:47', '2020-12-04 15:48:47'),
	(1284, 4, '41014-08', 'Penjualan - TN Ketjubung Platinum KSD BS', 4, 'K', 1, '1222', 0, '2020-12-04 15:49:24', '2020-12-04 15:49:44'),
	(1285, 4, '41015-07', 'Penjualan - TN Ketjubung Platinum KDB BS Parah', 4, 'K', 1, '1223', 0, '2020-12-04 15:51:09', '2020-12-04 15:51:09'),
	(1286, 4, '41015-08', 'Penjualan - TN Ketjubung Platinum KSD BS Parah', 4, 'K', 1, '1223', 0, '2020-12-04 15:51:44', '2020-12-04 15:51:44'),
	(1287, 1, '11401-02-23', 'Persediaan Barang Jadi - TR Ardan KSJ', 6, 'D', 1, '334', 0, '2020-12-10 15:00:37', '2020-12-18 14:04:56'),
	(1288, 1, '11401-06-23', 'Persediaan Barang Jadi - TR Ardan KSJ BS', 6, 'D', 1, '402', 0, '2020-12-10 15:01:39', '2020-12-18 14:05:24'),
	(1289, 1, '11401-10-23', 'Persediaan Barang Jadi - TR Ardan KSJ BS Parah', 6, 'D', 1, '470', 0, '2020-12-10 15:03:29', '2020-12-18 14:05:57'),
	(1290, 4, '41002-23', 'Penjualan - TR Ardan KSJ', 4, 'K', 1, '817', 0, '2020-12-10 15:08:59', '2020-12-18 13:51:53'),
	(1291, 4, '41006-23', 'Penjualan - TR Ardan KSJ BS', 4, 'K', 1, '885', 0, '2020-12-10 15:10:03', '2020-12-18 13:52:19'),
	(1292, 4, '41010-23', 'Penjualan - TR Ardan KSJ BS Parah', 4, 'K', 1, '953', 0, '2020-12-10 15:11:44', '2020-12-18 13:52:58'),
	(1293, 1, '11401-03-03', 'Persediaan Barang Jadi - Fiber Ardan', 6, 'D', 1, '347', 0, '2020-12-19 09:29:59', '2020-12-19 09:29:59'),
	(1294, 1, '11401-07-03', 'Persediaan Barang Jadi - Fiber Ardan BS', 6, 'D', 1, '415', 0, '2020-12-19 09:30:51', '2020-12-19 09:30:51'),
	(1295, 1, '11401-11-03', 'Persediaan Barang Jadi - Fiber Ardan BS Parah', 6, 'D', 1, '483', 0, '2020-12-19 09:32:13', '2020-12-19 09:32:13'),
	(1296, 4, '41003-03', 'Penjualan - Fiber Ardan', 4, 'K', 1, '830', 0, '2020-12-19 09:34:31', '2020-12-19 09:34:31'),
	(1297, 4, '41007-03', 'Penjualan - Fiber Ardan BS', 4, 'K', 1, '898', 0, '2020-12-19 09:35:07', '2020-12-19 09:35:07'),
	(1298, 4, '41011-03', 'Penjualan - Fiber Ardan BS Parah', 4, 'K', 1, '966', 0, '2020-12-19 09:35:51', '2020-12-19 09:35:51'),
	(1299, 1, '11222', 'BCA 790-121-7258 Hanif Thoriq Bahasuan', 4, 'D', 1, '7', 0, '2020-12-21 13:22:08', '2020-12-21 13:22:08'),
	(1300, 1, '11402-01-13', 'Persediaan Bahan Baku - Benang TR 50 s', 6, 'D', 1, '497', 0, '2020-12-21 14:56:59', '2020-12-21 14:56:59'),
	(1301, 5, '52001-13', 'Pembelian Bahan Baku - Benang TR 50 s', 4, 'D', 1, '980', 0, '2020-12-21 14:59:56', '2020-12-21 14:59:56'),
	(1302, 5, '53001-01-13', 'Biaya Pemakaian Bahan Baku Benang - Benang TR 50 s', 5, 'D', 1, '1007', 0, '2020-12-21 15:40:08', '2020-12-21 15:40:08');
/*!40000 ALTER TABLE `ms_perkiraan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_perkiraan_saldoawal
CREATE TABLE IF NOT EXISTS `ms_perkiraan_saldoawal` (
  `id_saldoawal` int(100) NOT NULL AUTO_INCREMENT,
  `id_tanggalsaldo` int(100) DEFAULT NULL,
  `id_perkiraan` int(100) NOT NULL,
  `tahun` year(4) NOT NULL,
  `nominal` double NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_saldoawal`) USING BTREE,
  KEY `index_msperkiraansaldo` (`id_tanggalsaldo`,`id_perkiraan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_perkiraan_saldoawal: ~0 rows (lebih kurang)
DELETE FROM `ms_perkiraan_saldoawal`;
/*!40000 ALTER TABLE `ms_perkiraan_saldoawal` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_perkiraan_saldoawal` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_perkiraan_tanggalsaldo
CREATE TABLE IF NOT EXISTS `ms_perkiraan_tanggalsaldo` (
  `id_tanggal_saldoawal` int(11) NOT NULL AUTO_INCREMENT,
  `tanggal_awal` date NOT NULL,
  `tanggal_akhir` date NOT NULL,
  `tahun` year(4) NOT NULL,
  `cerated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_tanggal_saldoawal`) USING BTREE,
  KEY `index_msperkiraan_tgl` (`tahun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_perkiraan_tanggalsaldo: ~0 rows (lebih kurang)
DELETE FROM `ms_perkiraan_tanggalsaldo`;
/*!40000 ALTER TABLE `ms_perkiraan_tanggalsaldo` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_perkiraan_tanggalsaldo` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_perubahansatuan
CREATE TABLE IF NOT EXISTS `ms_perubahansatuan` (
  `id_perubahansatuan` int(100) NOT NULL AUTO_INCREMENT,
  `jumlah_satuanawal` double NOT NULL DEFAULT '0',
  `id_satuanawal` int(100) NOT NULL,
  `jumlah_satuanperubahan` double NOT NULL DEFAULT '0',
  `id_satuanperubahan` int(100) NOT NULL,
  `id_proses` int(100) NOT NULL,
  `id_motif` int(100) NOT NULL,
  `id_motif_barang` int(100) NOT NULL,
  `id_lokasi` int(100) NOT NULL,
  `jumlah_hasil` double NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_perubahansatuan`) USING BTREE,
  KEY `index_msperubahansatuan` (`id_satuanawal`,`id_satuanperubahan`,`id_proses`,`id_motif`,`id_motif_barang`,`id_lokasi`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_perubahansatuan: ~0 rows (lebih kurang)
DELETE FROM `ms_perubahansatuan`;
/*!40000 ALTER TABLE `ms_perubahansatuan` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_perubahansatuan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_pick
CREATE TABLE IF NOT EXISTS `ms_pick` (
  `id_pick` int(255) NOT NULL AUTO_INCREMENT,
  `nama_pick` varchar(255) DEFAULT NULL,
  `id_motif` int(11) DEFAULT '0',
  `id_lokasi` int(11) DEFAULT NULL,
  `status` int(2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_pick`),
  KEY `index_mspick` (`id_motif`,`id_lokasi`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_pick: ~0 rows (lebih kurang)
DELETE FROM `ms_pick`;
/*!40000 ALTER TABLE `ms_pick` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_pick` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_pick_barang
CREATE TABLE IF NOT EXISTS `ms_pick_barang` (
  `id_pick_barang` int(11) NOT NULL AUTO_INCREMENT,
  `id_pick` int(25) DEFAULT NULL,
  `pick_atas` int(11) DEFAULT NULL,
  `pick_bawah` int(11) DEFAULT NULL,
  `jenis_pick` varchar(255) DEFAULT NULL,
  `upah` int(12) DEFAULT NULL,
  `status` int(11) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_pick_barang`),
  KEY `id_pick` (`id_pick`),
  KEY `index_mspick_barang` (`id_pick`,`jenis_pick`) USING BTREE,
  CONSTRAINT `ms_pick_barang_ibfk_1` FOREIGN KEY (`id_pick`) REFERENCES `ms_pick` (`id_pick`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10093 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_pick_barang: ~0 rows (lebih kurang)
DELETE FROM `ms_pick_barang`;
/*!40000 ALTER TABLE `ms_pick_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_pick_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_proses
CREATE TABLE IF NOT EXISTS `ms_proses` (
  `id_proses` int(11) NOT NULL AUTO_INCREMENT,
  `nama_proses` varchar(100) NOT NULL DEFAULT '0',
  `urut` int(11) NOT NULL DEFAULT '0',
  `parent` int(11) NOT NULL DEFAULT '17',
  `jenis` char(2) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_proses`) USING BTREE,
  KEY `index_msproses` (`id_proses`,`parent`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=99 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_proses: ~57 rows (lebih kurang)
DELETE FROM `ms_proses`;
/*!40000 ALTER TABLE `ms_proses` DISABLE KEYS */;
INSERT INTO `ms_proses` (`id_proses`, `nama_proses`, `urut`, `parent`, `jenis`, `created_at`, `update_at`) VALUES
	(1, 'Produksi Cat', 0, 0, '0', '2021-01-01 10:24:09', '2021-01-01 10:24:09'),
	(97, 'Mixing', 0, 1, '0', '2021-01-01 09:48:57', '2021-01-01 09:48:57');
/*!40000 ALTER TABLE `ms_proses` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_provinsi
CREATE TABLE IF NOT EXISTS `ms_provinsi` (
  `id_provinsi` int(11) NOT NULL AUTO_INCREMENT,
  `provinsi` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id_provinsi`) USING BTREE,
  KEY `index_msprovinsi` (`id_provinsi`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_provinsi: ~34 rows (lebih kurang)
DELETE FROM `ms_provinsi`;
/*!40000 ALTER TABLE `ms_provinsi` DISABLE KEYS */;
INSERT INTO `ms_provinsi` (`id_provinsi`, `provinsi`) VALUES
	(11, 'ACEH'),
	(12, 'SUMATERA UTARA'),
	(13, 'SUMATERA BARAT'),
	(14, 'RIAU'),
	(15, 'JAMBI'),
	(16, 'SUMATERA SELATAN'),
	(17, 'BENGKULU'),
	(18, 'LAMPUNG'),
	(19, 'KEPULAUAN BANGKA BELITUNG'),
	(21, 'KEPULAUAN RIAU'),
	(31, 'DKI JAKARTA'),
	(32, 'JAWA BARAT'),
	(33, 'JAWA TENGAH'),
	(34, 'DI YOGYAKARTA'),
	(35, 'JAWA TIMUR'),
	(36, 'BANTEN'),
	(51, 'BALI'),
	(52, 'NUSA TENGGARA BARAT'),
	(53, 'NUSA TENGGARA TIMUR'),
	(61, 'KALIMANTAN BARAT'),
	(62, 'KALIMANTAN TENGAH'),
	(63, 'KALIMANTAN SELATAN'),
	(64, 'KALIMANTAN TIMUR'),
	(65, 'KALIMANTAN UTARA'),
	(71, 'SULAWESI UTARA'),
	(72, 'SULAWESI TENGAH'),
	(73, 'SULAWESI SELATAN'),
	(74, 'SULAWESI TENGGARA'),
	(75, 'GORONTALO'),
	(76, 'SULAWESI BARAT'),
	(81, 'MALUKU'),
	(82, 'MALUKU UTARA'),
	(91, 'PAPUA BARAT'),
	(94, 'PAPUA');
/*!40000 ALTER TABLE `ms_provinsi` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_ref_jurnal
CREATE TABLE IF NOT EXISTS `ms_ref_jurnal` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `kelompok_jurnal` varchar(255) NOT NULL DEFAULT '-',
  `nama_kolom` varchar(255) NOT NULL DEFAULT '-',
  `id_akun_jurnal` int(11) NOT NULL DEFAULT '0',
  `tipe_id_akun_jurnal` varchar(255) NOT NULL DEFAULT '-',
  `kode` varchar(11) NOT NULL DEFAULT '0',
  `rows` int(11) DEFAULT NULL COMMENT '1=debet, 2=kredit',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_msrefjurnal` (`id`,`id_akun_jurnal`,`kode`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_ref_jurnal: ~15 rows (lebih kurang)
DELETE FROM `ms_ref_jurnal`;
/*!40000 ALTER TABLE `ms_ref_jurnal` DISABLE KEYS */;
INSERT INTO `ms_ref_jurnal` (`id`, `kelompok_jurnal`, `nama_kolom`, `id_akun_jurnal`, `tipe_id_akun_jurnal`, `kode`, `rows`) VALUES
	(1, 'pembelian', 'hutang_usaha', 58, 'K', '101', 2),
	(2, 'pembelian', 'potongan_pembelian', 98, 'K', '102', 2),
	(3, 'pembelian', 'pajak', 66, 'D', '103', 1),
	(4, 'pembelian', 'persediaan', 0, 'D', '104', 1),
	(5, 'penjualan', 'piutang_usaha', 21, 'D', '201', 1),
	(6, 'penjualan', 'potongan_penjualan', 92, 'K', '202', 2),
	(7, 'penjualan', 'ppn_keluaran', 65, 'K', '203', 2),
	(8, 'penjualan', 'penjualan', 90, 'K', '204', 2),
	(9, 'service_order', 'hutang_beban', 76, 'K', '301', 2),
	(10, 'service_order', 'hutang_pajak', 0, 'K', '302', 2),
	(11, 'pembelian', 'ongkos_kirim', 100, 'D', '105', 1),
	(12, 'retur_penjualan', 'piutang_usaha', 21, 'K', '401', 2),
	(13, 'retur_penjualan', 'potongan_penjualan', 92, 'D', '402', 1),
	(14, 'retur_penjualan', 'ppn_keluaran', 65, 'D', '403', 1),
	(15, 'retur_penjualan', 'retur_penjualan', 91, 'D', '404', 1);
/*!40000 ALTER TABLE `ms_ref_jurnal` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_rekanan
CREATE TABLE IF NOT EXISTS `ms_rekanan` (
  `id_rekanan` int(11) NOT NULL AUTO_INCREMENT,
  `id_kelompok` int(11) NOT NULL DEFAULT '0',
  `no_urut` int(11) NOT NULL DEFAULT '0',
  `nama` varchar(100) NOT NULL DEFAULT '0',
  `npwp` varchar(100) NOT NULL DEFAULT '0',
  `email` varchar(100) NOT NULL DEFAULT '0',
  `telepon` varchar(100) NOT NULL DEFAULT '0',
  `no_rek` varchar(50) NOT NULL DEFAULT '0',
  `kota` varchar(100) DEFAULT NULL,
  `alamat` text NOT NULL,
  `status` int(11) NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_rekanan`) USING BTREE,
  KEY `index_msrekanan` (`id_rekanan`,`id_kelompok`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_rekanan: ~0 rows (lebih kurang)
DELETE FROM `ms_rekanan`;
/*!40000 ALTER TABLE `ms_rekanan` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_rekanan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_rekanan_kelompok
CREATE TABLE IF NOT EXISTS `ms_rekanan_kelompok` (
  `id_kelompok` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL DEFAULT '',
  `npwp` varchar(100) NOT NULL DEFAULT '',
  `email` varchar(100) NOT NULL DEFAULT '',
  `telepon` varchar(100) NOT NULL DEFAULT '',
  `no_rek` text NOT NULL,
  `kota` varchar(100) NOT NULL DEFAULT '',
  `alamat` text NOT NULL,
  `id_akun_hutang` int(11) NOT NULL DEFAULT '0',
  `id_akun_piutang` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_kelompok`) USING BTREE,
  KEY `index_msrekanankel` (`id_kelompok`,`id_akun_hutang`,`id_akun_piutang`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_rekanan_kelompok: ~0 rows (lebih kurang)
DELETE FROM `ms_rekanan_kelompok`;
/*!40000 ALTER TABLE `ms_rekanan_kelompok` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_rekanan_kelompok` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_satuan
CREATE TABLE IF NOT EXISTS `ms_satuan` (
  `id_satuan` int(11) NOT NULL AUTO_INCREMENT,
  `nama_satuan` varchar(50) NOT NULL DEFAULT '0',
  `satuan` varchar(50) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_satuan`) USING BTREE,
  KEY `index_mssatuan` (`id_satuan`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=126 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_satuan: ~35 rows (lebih kurang)
DELETE FROM `ms_satuan`;
/*!40000 ALTER TABLE `ms_satuan` DISABLE KEYS */;
INSERT INTO `ms_satuan` (`id_satuan`, `nama_satuan`, `satuan`, `created_at`, `update_at`) VALUES
	(1, 'Ukel', 'ukel', '2018-09-25 01:56:12', '2018-09-25 01:56:12'),
	(2, 'Pack', 'pack', '2018-09-25 01:56:20', '2018-09-25 01:56:20'),
	(3, 'Kilogram', 'KG', '2018-10-01 03:48:28', '2018-10-01 03:48:28'),
	(4, 'Pcs', 'pcs', '2018-10-01 03:59:16', '2018-10-01 03:59:16'),
	(5, 'Kwintal', 'KW', '2018-10-01 04:00:30', '2018-10-01 04:00:30'),
	(7, 'Gram', 'gr', '2018-11-05 03:07:17', '2018-11-05 03:07:17'),
	(8, 'Bale', 'Bale', '2018-11-08 02:21:08', '2018-11-08 02:21:08'),
	(9, 'Pidang', 'pd', '2018-11-20 01:08:06', '2018-11-20 01:08:06'),
	(10, 'Beam', 'beam', '2018-11-20 07:10:39', '2018-11-20 07:10:39'),
	(11, 'Sarung', 'sarung', '2018-11-28 01:27:14', '2018-11-28 01:27:14'),
	(99, 'Hari', 'hari', '2018-12-21 01:36:59', '2018-12-21 01:36:59'),
	(100, 'Jam', 'jam', '2018-12-21 01:37:29', '2018-12-21 01:37:29'),
	(101, 'Cones', 'Cones', '2019-03-11 05:14:53', '2019-03-11 05:14:53'),
	(102, 'Lembar', 'Lembar', '2019-03-27 13:51:58', '2019-03-27 13:51:58'),
	(103, 'Lonjor', 'Lonjor', '2019-03-27 13:52:16', '2019-03-27 13:52:16'),
	(104, 'Galon', 'Galon', '2019-03-27 13:52:30', '2019-03-27 13:52:30'),
	(105, 'Meter', 'Meter', '2019-03-27 13:52:42', '2019-03-27 13:52:42'),
	(106, 'BOX', 'BOX', '2019-03-27 14:51:18', '2019-03-27 14:51:18'),
	(108, 'Dzn', 'Dzn', '2019-04-01 08:50:03', '2019-04-01 08:50:03'),
	(109, 'Tangki', 'Tangki', '2019-04-01 10:31:43', '2019-04-01 10:31:43'),
	(110, 'Set', 'Set', '2019-04-01 10:37:16', '2019-04-01 10:37:16'),
	(111, 'Roll', 'Roll', '2019-04-04 14:31:05', '2019-04-04 14:31:05'),
	(112, 'RIT', 'RIT', '2019-04-08 13:28:07', '2019-04-08 13:28:07'),
	(113, 'Liter', 'Liter', '2019-04-09 10:13:16', '2019-04-09 10:13:16'),
	(114, 'Rim', 'Rim', '2019-04-09 11:30:56', '2019-04-09 11:30:56'),
	(115, 'Unit', 'Unit', '2019-04-09 14:24:17', '2019-04-09 14:24:17'),
	(116, 'Ton', 'Ton', '2019-04-11 11:51:22', '2019-04-11 11:51:22'),
	(117, 'Kardus', 'Kardus', '2019-04-23 11:03:25', '2019-04-23 11:03:25'),
	(118, 'COLT', 'COLT', '2019-04-26 09:53:05', '2019-04-26 09:53:05'),
	(119, 'SAK', 'SAK', '2019-04-26 09:53:18', '2019-04-26 09:53:18'),
	(120, 'Kodi', 'Kodi', '2019-04-29 15:44:02', '2019-04-29 15:44:02'),
	(121, 'Pt', 'Pt', '2019-09-07 08:33:21', '2019-09-07 08:33:21'),
	(122, 'Kletek', 'kletek', '2020-08-21 14:09:58', '2020-08-21 14:09:58'),
	(123, 'Kletek Kecil', 'kletek kecil', '2020-08-21 14:10:12', '2020-08-21 14:10:12'),
	(124, 'Palet', 'palet', '2020-10-22 07:19:26', '2020-10-22 07:19:26'),
	(125, 'Kaleng', 'Klg', '2021-01-01 09:44:03', '2021-01-01 09:44:03');
/*!40000 ALTER TABLE `ms_satuan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_shift
CREATE TABLE IF NOT EXISTS `ms_shift` (
  `id_shift` int(11) NOT NULL AUTO_INCREMENT,
  `nama_shift` char(50) NOT NULL,
  `jam_masuk` time NOT NULL,
  `jam_pulang` time NOT NULL,
  `id_pegawai` int(255) DEFAULT '0',
  `id_mesin` int(255) DEFAULT '0',
  `tanggal_awal` date NOT NULL,
  `tanggal_akhir` date NOT NULL,
  `is_active` char(2) NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_shift`) USING BTREE,
  KEY `index_msshift` (`id_shift`,`id_pegawai`,`id_mesin`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_shift: ~0 rows (lebih kurang)
DELETE FROM `ms_shift`;
/*!40000 ALTER TABLE `ms_shift` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_shift` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_tempat_penyerahan
CREATE TABLE IF NOT EXISTS `ms_tempat_penyerahan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) DEFAULT '1',
  `user_id_update` int(11) DEFAULT '1',
  `nama` varchar(255) NOT NULL DEFAULT '-',
  `alamat` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_mstempatserah` (`id_lokasi`,`user_id_create`,`user_id_update`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_tempat_penyerahan: ~4 rows (lebih kurang)
DELETE FROM `ms_tempat_penyerahan`;
/*!40000 ALTER TABLE `ms_tempat_penyerahan` DISABLE KEYS */;
INSERT INTO `ms_tempat_penyerahan` (`id`, `id_lokasi`, `user_id_create`, `user_id_update`, `nama`, `alamat`, `created_at`, `updated_at`) VALUES
	(1, 1, 1, 1, 'CV. SARUNG AGUNG', 'Jl. KH Hasyim Ashari No. 11', '2019-03-21 08:22:11', '2021-01-01 09:50:06');
/*!40000 ALTER TABLE `ms_tempat_penyerahan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_transaksi
CREATE TABLE IF NOT EXISTS `ms_transaksi` (
  `id_transaksi` int(11) NOT NULL AUTO_INCREMENT,
  `nama_transaksi` varchar(100) NOT NULL DEFAULT '0',
  `id` int(11) NOT NULL DEFAULT '0',
  `tipe` char(2) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_transaksi`) USING BTREE,
  KEY `index_mstransaksi` (`id`,`tipe`,`id_transaksi`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_transaksi: ~7 rows (lebih kurang)
DELETE FROM `ms_transaksi`;
/*!40000 ALTER TABLE `ms_transaksi` DISABLE KEYS */;
INSERT INTO `ms_transaksi` (`id_transaksi`, `nama_transaksi`, `id`, `tipe`, `created_at`, `update_at`) VALUES
	(9, 'Pembelian Bahan Baku', 27, 'D', '2018-10-02 02:24:10', '2018-10-02 02:24:10'),
	(10, 'Transfer Bahan Baku Masuk', 27, 'D', '2018-10-02 02:24:29', '2018-10-02 02:24:29'),
	(11, 'Transfer Bahan Baku Keluar', 27, 'K', '2018-10-03 04:02:08', '2018-10-03 04:02:08'),
	(12, 'Transfer Barang dalam Proses Masuk', 29, 'D', '2018-10-03 04:03:01', '2018-10-03 04:03:01'),
	(13, 'Transfer Barang dalam Proses Keluar', 29, 'K', '2018-10-03 04:15:46', '2018-10-03 04:15:46'),
	(14, 'Penjualan Barang ', 26, 'K', '2018-10-03 04:16:41', '2018-10-03 04:16:41'),
	(15, 'Pembelian Bahan Pembantu', 28, 'D', '2018-12-10 01:49:54', '2018-12-10 01:49:54');
/*!40000 ALTER TABLE `ms_transaksi` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_upah
CREATE TABLE IF NOT EXISTS `ms_upah` (
  `id_upah` int(100) NOT NULL AUTO_INCREMENT,
  `id_barang` int(100) NOT NULL,
  `id_proses` int(100) NOT NULL,
  `nominal` int(100) NOT NULL,
  PRIMARY KEY (`id_upah`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_upah: ~5 rows (lebih kurang)
DELETE FROM `ms_upah`;
/*!40000 ALTER TABLE `ms_upah` DISABLE KEYS */;
INSERT INTO `ms_upah` (`id_upah`, `id_barang`, `id_proses`, `nominal`) VALUES
	(8, 8, 11, 2000),
	(10, 522, 11, 12000),
	(11, 531, 12, 1000),
	(12, 535, 12, 2000),
	(13, 533, 18, 1000);
/*!40000 ALTER TABLE `ms_upah` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_upahket
CREATE TABLE IF NOT EXISTS `ms_upahket` (
  `id_upahket` int(11) NOT NULL AUTO_INCREMENT,
  `nama_upahket` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id_upahket`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_upahket: ~2 rows (lebih kurang)
DELETE FROM `ms_upahket`;
/*!40000 ALTER TABLE `ms_upahket` DISABLE KEYS */;
INSERT INTO `ms_upahket` (`id_upahket`, `nama_upahket`) VALUES
	(1, 'Gaji Pokok'),
	(2, 'Gaji Lembur');
/*!40000 ALTER TABLE `ms_upahket` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_upahtenun
CREATE TABLE IF NOT EXISTS `ms_upahtenun` (
  `id_upahtenun` int(100) NOT NULL AUTO_INCREMENT,
  `nomor` int(11) NOT NULL,
  `id_rekanan` int(11) NOT NULL,
  `id_makelar` int(11) NOT NULL,
  `id_lokasi` int(100) NOT NULL DEFAULT '1',
  `tanggal` date NOT NULL,
  `penambahan1` varchar(50) NOT NULL,
  `penambahan2` varchar(50) NOT NULL,
  `penambahan3` varchar(50) NOT NULL,
  `pas` varchar(50) NOT NULL,
  `pengurangan1` varchar(50) NOT NULL,
  `pengurangan2` varchar(50) NOT NULL,
  `pengurangan3` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_upahtenun`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_upahtenun: ~2 rows (lebih kurang)
DELETE FROM `ms_upahtenun`;
/*!40000 ALTER TABLE `ms_upahtenun` DISABLE KEYS */;
INSERT INTO `ms_upahtenun` (`id_upahtenun`, `nomor`, `id_rekanan`, `id_makelar`, `id_lokasi`, `tanggal`, `penambahan1`, `penambahan2`, `penambahan3`, `pas`, `pengurangan1`, `pengurangan2`, `pengurangan3`, `created_at`, `updated_at`) VALUES
	(2, 12, 8, 1, 1, '2018-12-19', '80', '12', '12', '12', '12', '12', '12', '2018-12-19 02:21:11', '2018-12-19 02:21:11'),
	(3, 121, 2, 1, 1, '2019-01-16', '80', '80', '80', '80', '80', '80', '70', '2019-01-16 07:14:58', '2019-01-16 07:14:58');
/*!40000 ALTER TABLE `ms_upahtenun` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_upahtenun_barang
CREATE TABLE IF NOT EXISTS `ms_upahtenun_barang` (
  `id_upahtenun_barang` int(100) NOT NULL AUTO_INCREMENT,
  `id_upahtenun` int(11) DEFAULT NULL,
  `id_proses` int(11) NOT NULL,
  `id_motif` int(11) NOT NULL,
  `nominal` double NOT NULL,
  `tabungan` double NOT NULL,
  `penambahan1` varchar(50) NOT NULL,
  `penambahan2` varchar(50) NOT NULL,
  `penambahan3` varchar(50) NOT NULL,
  `pas` varchar(50) NOT NULL,
  `pengurangan1` varchar(50) NOT NULL,
  `pengurangan2` varchar(50) NOT NULL,
  `pengurangan3` varchar(50) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_upahtenun_barang`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_upahtenun_barang: ~2 rows (lebih kurang)
DELETE FROM `ms_upahtenun_barang`;
/*!40000 ALTER TABLE `ms_upahtenun_barang` DISABLE KEYS */;
INSERT INTO `ms_upahtenun_barang` (`id_upahtenun_barang`, `id_upahtenun`, `id_proses`, `id_motif`, `nominal`, `tabungan`, `penambahan1`, `penambahan2`, `penambahan3`, `pas`, `pengurangan1`, `pengurangan2`, `pengurangan3`, `created_at`, `updated_at`) VALUES
	(9, 2, 0, 1, 12000, 11000, '80', '60', '70', '85', '80', '82', '5', '2018-12-19 02:21:11', '2018-12-19 02:21:11'),
	(10, 3, 0, 2, 120000, 1000, '80', '70', '90', '80', '80', '89', '1', '2019-01-16 07:14:58', '2019-01-16 07:14:58');
/*!40000 ALTER TABLE `ms_upahtenun_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_upahtenun_baru
CREATE TABLE IF NOT EXISTS `ms_upahtenun_baru` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nama_upah` text NOT NULL,
  `tanggal_berlaku` date DEFAULT NULL,
  `id_lokasi` int(11) NOT NULL DEFAULT '1',
  `id_motif` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `nominal_rekanan` varchar(255) NOT NULL DEFAULT '0',
  `nominal_rekanan_kelompok` varchar(255) NOT NULL DEFAULT '0',
  `potongan_d` varchar(255) NOT NULL DEFAULT '0',
  `potongan_n` varchar(255) NOT NULL,
  `potongan_bs` varchar(255) NOT NULL DEFAULT '0',
  `status` char(2) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_msupahtenunbaru` (`id_lokasi`,`id_motif`,`id_satuan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_upahtenun_baru: ~0 rows (lebih kurang)
DELETE FROM `ms_upahtenun_baru`;
/*!40000 ALTER TABLE `ms_upahtenun_baru` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_upahtenun_baru` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_upah_borongan
CREATE TABLE IF NOT EXISTS `ms_upah_borongan` (
  `id_upah_borongan` int(11) NOT NULL AUTO_INCREMENT,
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `id_motif` int(11) NOT NULL DEFAULT '0',
  `id_motif_barang` int(11) NOT NULL DEFAULT '0',
  `id_barang` int(11) NOT NULL DEFAULT '0' COMMENT 'untuk benang',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `id_lokasi` int(11) NOT NULL DEFAULT '1',
  `tanggal` date DEFAULT NULL,
  `nominal` int(11) NOT NULL DEFAULT '0',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_upah_borongan`) USING BTREE,
  KEY `index_msupahborongan` (`id_proses`,`id_motif`,`id_motif_barang`,`id_barang`,`id_satuan`,`id_lokasi`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_upah_borongan: ~0 rows (lebih kurang)
DELETE FROM `ms_upah_borongan`;
/*!40000 ALTER TABLE `ms_upah_borongan` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_upah_borongan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_upah_boronganlain
CREATE TABLE IF NOT EXISTS `ms_upah_boronganlain` (
  `id_upah_boronganlain` int(11) NOT NULL AUTO_INCREMENT,
  `nama` varchar(50) NOT NULL,
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `tanggal` date NOT NULL,
  `id_lokasi` int(11) NOT NULL DEFAULT '0',
  `status` char(2) NOT NULL DEFAULT '0',
  `harga` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_upah_boronganlain`),
  KEY `index_msupahboronganlain` (`id_proses`,`id_lokasi`,`id_satuan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_upah_boronganlain: ~0 rows (lebih kurang)
DELETE FROM `ms_upah_boronganlain`;
/*!40000 ALTER TABLE `ms_upah_boronganlain` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_upah_boronganlain` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_upah_pegawai
CREATE TABLE IF NOT EXISTS `ms_upah_pegawai` (
  `id_upah_pegawai` int(11) NOT NULL AUTO_INCREMENT,
  `id_pegawai` int(11) NOT NULL DEFAULT '0',
  `tanggal` date DEFAULT NULL,
  `upah_harian` int(11) NOT NULL DEFAULT '0',
  `upah_lembur` int(11) NOT NULL DEFAULT '0',
  `id_lokasi` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id_upah_pegawai`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_upah_pegawai: ~2 rows (lebih kurang)
DELETE FROM `ms_upah_pegawai`;
/*!40000 ALTER TABLE `ms_upah_pegawai` DISABLE KEYS */;
INSERT INTO `ms_upah_pegawai` (`id_upah_pegawai`, `id_pegawai`, `tanggal`, `upah_harian`, `upah_lembur`, `id_lokasi`) VALUES
	(2, 2, '2018-01-01', 65000, 7500, 1),
	(3, 1, '2019-02-28', 1000, 0, 1);
/*!40000 ALTER TABLE `ms_upah_pegawai` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_warna
CREATE TABLE IF NOT EXISTS `ms_warna` (
  `id_warna` int(11) NOT NULL AUTO_INCREMENT,
  `warna` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id_warna`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_warna: ~3 rows (lebih kurang)
DELETE FROM `ms_warna`;
/*!40000 ALTER TABLE `ms_warna` DISABLE KEYS */;
INSERT INTO `ms_warna` (`id_warna`, `warna`) VALUES
	(1, 'Hitam'),
	(2, 'Coklat Polkadot'),
	(3, 'Merah Maroon Bergaris');
/*!40000 ALTER TABLE `ms_warna` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_warnakomposisi
CREATE TABLE IF NOT EXISTS `ms_warnakomposisi` (
  `id_komposisi` int(100) NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  `inisial` varchar(25) NOT NULL,
  `jumlah` int(12) NOT NULL,
  `satuan` varchar(100) NOT NULL,
  PRIMARY KEY (`id_komposisi`) USING BTREE,
  KEY `index_mswarnakomposisi` (`id_komposisi`,`satuan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_warnakomposisi: ~0 rows (lebih kurang)
DELETE FROM `ms_warnakomposisi`;
/*!40000 ALTER TABLE `ms_warnakomposisi` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_warnakomposisi` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_warnakomposisi_barang
CREATE TABLE IF NOT EXISTS `ms_warnakomposisi_barang` (
  `id_komposisi_barang` int(100) NOT NULL AUTO_INCREMENT,
  `id_komposisi` int(100) NOT NULL,
  `id_barang` int(100) NOT NULL,
  `id_gudang` int(11) NOT NULL DEFAULT '4',
  `jumlah` varchar(50) NOT NULL DEFAULT '0',
  `jumlah_konv` varchar(50) NOT NULL DEFAULT '0',
  `jum_satuan` varchar(50) NOT NULL DEFAULT '0',
  `jum_konv` varchar(50) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_komposisi_barang`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_warnakomposisi_barang: ~0 rows (lebih kurang)
DELETE FROM `ms_warnakomposisi_barang`;
/*!40000 ALTER TABLE `ms_warnakomposisi_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_warnakomposisi_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.ms_warnaspk
CREATE TABLE IF NOT EXISTS `ms_warnaspk` (
  `id_warnaspk` int(50) NOT NULL AUTO_INCREMENT,
  `id_motif` int(50) DEFAULT NULL,
  `nama` varchar(100) NOT NULL,
  `level` int(50) NOT NULL,
  `parent` int(50) DEFAULT '0',
  `used` int(50) NOT NULL,
  `name_input` varchar(50) DEFAULT NULL,
  `name_satuan` varchar(50) DEFAULT NULL,
  `name_tabel` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_warnaspk`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.ms_warnaspk: ~0 rows (lebih kurang)
DELETE FROM `ms_warnaspk`;
/*!40000 ALTER TABLE `ms_warnaspk` DISABLE KEYS */;
/*!40000 ALTER TABLE `ms_warnaspk` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_hutangawal
CREATE TABLE IF NOT EXISTS `pem_hutangawal` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `cv` int(11) NOT NULL DEFAULT '1',
  `no_faktur` varchar(100) NOT NULL,
  `sufix_no_faktur` varchar(255) DEFAULT NULL,
  `tanggal` date NOT NULL,
  `tanggal_faktur` date NOT NULL,
  `tanggal_tempo` date DEFAULT NULL,
  `id_penyedia` int(100) NOT NULL,
  `nominal` varchar(255) DEFAULT '0',
  `termasuk_pajak` int(11) NOT NULL DEFAULT '0',
  `pajak` int(1) NOT NULL DEFAULT '0' COMMENT '1=iya,0=tidak',
  `keterangan` text NOT NULL,
  `id_akun_hutang` int(11) DEFAULT '101' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_pajak` int(11) DEFAULT '103' COMMENT 'ms_ref_jurnal => kode',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_hutangawal: ~0 rows (lebih kurang)
DELETE FROM `pem_hutangawal`;
/*!40000 ALTER TABLE `pem_hutangawal` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_hutangawal` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_hutangawal_bayar
CREATE TABLE IF NOT EXISTS `pem_hutangawal_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_transaksi_bayar` int(11) NOT NULL,
  `id_hutangawal` int(11) NOT NULL DEFAULT '0',
  `id_akun` int(11) DEFAULT NULL,
  `tgl_bayar` date NOT NULL,
  `jum_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(255) DEFAULT 'K',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_piutangawal` (`id`) USING BTREE,
  KEY `fk_transaksi_1` (`id_transaksi_bayar`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_hutangawal_bayar: ~0 rows (lebih kurang)
DELETE FROM `pem_hutangawal_bayar`;
/*!40000 ALTER TABLE `pem_hutangawal_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_hutangawal_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_hutangbeli
CREATE TABLE IF NOT EXISTS `pem_hutangbeli` (
  `id_hutangbeli` int(11) NOT NULL AUTO_INCREMENT,
  `id_pembelian` int(11) NOT NULL,
  `no_faktur` varchar(50) NOT NULL,
  `tanggal` date NOT NULL,
  `tanggal_faktur` date NOT NULL,
  `id_penyedia` int(11) NOT NULL,
  `id_transaksi` int(11) NOT NULL,
  `nominal_netto` varchar(50) NOT NULL,
  `id_carabayar` int(11) NOT NULL,
  `id_akun_carabayar` int(11) NOT NULL,
  `nama_akun_carabayar` varchar(50) NOT NULL DEFAULT 'kredit',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_hutangbeli`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_hutangbeli: ~0 rows (lebih kurang)
DELETE FROM `pem_hutangbeli`;
/*!40000 ALTER TABLE `pem_hutangbeli` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_hutangbeli` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_hutangbeli_bayar
CREATE TABLE IF NOT EXISTS `pem_hutangbeli_bayar` (
  `id_hutangbeli_bayar` int(11) NOT NULL AUTO_INCREMENT,
  `id_hutangbeli` int(11) DEFAULT NULL,
  `id_pembelian` int(11) NOT NULL,
  `id_akun` int(11) NOT NULL,
  `id_carabayar` int(11) NOT NULL,
  `tgl_bayar` date NOT NULL,
  `jum_bayar` text NOT NULL,
  `tipe_id_akun` varchar(50) DEFAULT 'kredit',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_hutangbeli_bayar`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_hutangbeli_bayar: ~0 rows (lebih kurang)
DELETE FROM `pem_hutangbeli_bayar`;
/*!40000 ALTER TABLE `pem_hutangbeli_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_hutangbeli_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_orderbeli
CREATE TABLE IF NOT EXISTS `pem_orderbeli` (
  `id_orderbeli` int(100) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `cv` int(11) NOT NULL DEFAULT '1',
  `no_faktur` varchar(100) NOT NULL,
  `sufix_no_order` varchar(255) DEFAULT NULL,
  `tanggal` date NOT NULL,
  `tanggal_tempo` date DEFAULT NULL,
  `id_penyedia` int(100) NOT NULL,
  `potongan` varchar(255) DEFAULT '0',
  `termasuk_pajak` int(11) NOT NULL DEFAULT '0',
  `pajak` int(1) NOT NULL DEFAULT '0' COMMENT '1=iya,0=tidak',
  `nominal_ongkir` varchar(255) NOT NULL DEFAULT '0',
  `status` varchar(5) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `keterangan_revisi` text,
  `syarat_bayar` varchar(255) DEFAULT NULL,
  `tempat_serah` int(11) DEFAULT '1',
  `tanggal_serah` date DEFAULT NULL,
  `penerima` varchar(255) DEFAULT 'Owner',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_orderbeli`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_orderbeli: ~0 rows (lebih kurang)
DELETE FROM `pem_orderbeli`;
/*!40000 ALTER TABLE `pem_orderbeli` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_orderbeli` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_orderbeli_barang
CREATE TABLE IF NOT EXISTS `pem_orderbeli_barang` (
  `id_orderbeli_barang` int(11) NOT NULL AUTO_INCREMENT,
  `id_orderbeli` int(11) NOT NULL DEFAULT '0',
  `id_barang` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(255) NOT NULL DEFAULT '0',
  `jml_barang` varchar(50) NOT NULL DEFAULT '',
  `jml_barang_konv` varchar(50) NOT NULL DEFAULT '',
  `harga_satuan` varchar(50) NOT NULL DEFAULT '',
  `total` varchar(50) NOT NULL DEFAULT '',
  `status` char(2) DEFAULT '0',
  `keterangan_revisi_brg` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_orderbeli_barang`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_orderbeli_barang: ~0 rows (lebih kurang)
DELETE FROM `pem_orderbeli_barang`;
/*!40000 ALTER TABLE `pem_orderbeli_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_orderbeli_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_pembelian
CREATE TABLE IF NOT EXISTS `pem_pembelian` (
  `id_pembelian` int(100) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `cv` int(11) NOT NULL DEFAULT '1',
  `no_faktur` varchar(100) NOT NULL,
  `sufix_no_faktur` varchar(255) DEFAULT NULL,
  `tanggal` date NOT NULL,
  `tanggal_faktur` date NOT NULL,
  `tanggal_tempo` date DEFAULT NULL,
  `id_penyedia` int(100) NOT NULL,
  `nominal_potongan` decimal(11,0) NOT NULL DEFAULT '0',
  `termasuk_pajak` int(11) NOT NULL DEFAULT '0',
  `pajak` int(1) NOT NULL DEFAULT '0' COMMENT '1=iya,0=tidak',
  `no_faktur_pajak` varchar(255) NOT NULL DEFAULT '-',
  `nominal_ongkir` varchar(255) NOT NULL DEFAULT '0',
  `status` varchar(5) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `syarat_bayar` varchar(255) DEFAULT NULL,
  `tempat_serah` int(11) DEFAULT '1',
  `tanggal_serah` date DEFAULT NULL,
  `penerima` varchar(255) DEFAULT 'Owner',
  `id_akun_hutang` int(11) DEFAULT '101' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_potongan` int(11) DEFAULT '102' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_pajak` int(11) DEFAULT '103' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_ongkir` int(11) NOT NULL DEFAULT '105',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_pembelian`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_pembelian: ~0 rows (lebih kurang)
DELETE FROM `pem_pembelian`;
/*!40000 ALTER TABLE `pem_pembelian` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_pembelian` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_pembelian_barang
CREATE TABLE IF NOT EXISTS `pem_pembelian_barang` (
  `id_beli_barang` int(100) NOT NULL AUTO_INCREMENT,
  `id_pembelian` int(100) NOT NULL,
  `id_barang` int(100) NOT NULL,
  `id_satuan` int(255) NOT NULL DEFAULT '0',
  `jml_barang` varchar(50) NOT NULL,
  `jml_barang_konv` varchar(50) NOT NULL DEFAULT '0',
  `harga_satuan` varchar(50) NOT NULL DEFAULT '0',
  `total` varchar(50) NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL DEFAULT '0',
  `id_orderbeli_barang` int(11) NOT NULL DEFAULT '0',
  `aset_status` int(11) DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_beli_barang`) USING BTREE,
  KEY `fk_belibarang` (`id_pembelian`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_pembelian_barang: ~0 rows (lebih kurang)
DELETE FROM `pem_pembelian_barang`;
/*!40000 ALTER TABLE `pem_pembelian_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_pembelian_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_pembelian_bayar
CREATE TABLE IF NOT EXISTS `pem_pembelian_bayar` (
  `id_belibayar` int(11) NOT NULL AUTO_INCREMENT,
  `id_transaksi_bayar` int(11) NOT NULL,
  `id_pembelian` int(11) NOT NULL DEFAULT '0',
  `id_akun` int(11) DEFAULT NULL,
  `tgl_bayar` date NOT NULL,
  `jum_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(255) DEFAULT 'K',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_belibayar`) USING BTREE,
  KEY `fk_beli` (`id_pembelian`) USING BTREE,
  KEY `fk_transaksi` (`id_transaksi_bayar`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_pembelian_bayar: ~0 rows (lebih kurang)
DELETE FROM `pem_pembelian_bayar`;
/*!40000 ALTER TABLE `pem_pembelian_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_pembelian_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_pembelian_transaksi_bayar
CREATE TABLE IF NOT EXISTS `pem_pembelian_transaksi_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `no_transaksi_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tanggal_bayar` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_pembelian_transaksi_bayar: ~0 rows (lebih kurang)
DELETE FROM `pem_pembelian_transaksi_bayar`;
/*!40000 ALTER TABLE `pem_pembelian_transaksi_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_pembelian_transaksi_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_penerimaan
CREATE TABLE IF NOT EXISTS `pem_penerimaan` (
  `id_penerimaan` int(11) NOT NULL AUTO_INCREMENT,
  `id_pembelian` int(11) NOT NULL,
  `id_beli_barang` int(11) NOT NULL,
  `id_induk` int(11) NOT NULL,
  `jml_barang_terima` double NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL DEFAULT '0',
  `id_gudang` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_penerimaan`) USING BTREE,
  KEY `index_penerimaan` (`id_penerimaan`,`id_pembelian`,`id_beli_barang`,`id_induk`,`id_gudang`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_penerimaan: ~0 rows (lebih kurang)
DELETE FROM `pem_penerimaan`;
/*!40000 ALTER TABLE `pem_penerimaan` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_penerimaan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_penerimaan_induk
CREATE TABLE IF NOT EXISTS `pem_penerimaan_induk` (
  `id_induk` int(11) NOT NULL AUTO_INCREMENT,
  `id_pembelian` int(5) NOT NULL,
  `tanggal_terima` date NOT NULL,
  `terima` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `no_faktur` varchar(50) NOT NULL,
  `faktur` varchar(50) NOT NULL,
  `nopol` varchar(50) NOT NULL,
  `nama_supir` varchar(255) NOT NULL,
  `no_suratjalan` text NOT NULL,
  `status` char(2) NOT NULL,
  `id_user` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_induk`),
  KEY `index_penerimaan_ind` (`id_induk`,`id_pembelian`,`id_user`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_penerimaan_induk: 0 rows
DELETE FROM `pem_penerimaan_induk`;
/*!40000 ALTER TABLE `pem_penerimaan_induk` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_penerimaan_induk` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_sewa
CREATE TABLE IF NOT EXISTS `pem_sewa` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_lokasi` int(11) NOT NULL,
  `id_penyedia` int(11) NOT NULL,
  `no_faktur` varchar(50) NOT NULL,
  `tanggal_faktur` date NOT NULL,
  `id_akun_sewa` int(11) NOT NULL,
  `fungsi` varchar(100) NOT NULL,
  `jenis` varchar(20) NOT NULL,
  `alamat` text NOT NULL,
  `tahun` int(3) NOT NULL,
  `tgl_awal` date NOT NULL,
  `tgl_akhir` date NOT NULL,
  `harga_per_tahun` varchar(25) NOT NULL,
  `costing` varchar(35) NOT NULL,
  `keterangan` text,
  `user_id_create` int(11) NOT NULL,
  `user_id_update` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_sewa: ~0 rows (lebih kurang)
DELETE FROM `pem_sewa`;
/*!40000 ALTER TABLE `pem_sewa` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_sewa` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_sewa_bayar
CREATE TABLE IF NOT EXISTS `pem_sewa_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_transaksi_bayar` int(11) NOT NULL,
  `id_sewa` int(11) NOT NULL,
  `id_akun_bayar` int(11) NOT NULL,
  `tipe_akun_bayar` enum('D','K') NOT NULL DEFAULT 'K',
  `jumlah_bayar` varchar(25) NOT NULL,
  `tanggal_bayar` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `id_transaksi_bayar` (`id_transaksi_bayar`),
  KEY `id_sewa` (`id_sewa`),
  KEY `id_akun_bayar` (`id_akun_bayar`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_sewa_bayar: ~0 rows (lebih kurang)
DELETE FROM `pem_sewa_bayar`;
/*!40000 ALTER TABLE `pem_sewa_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_sewa_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_sewa_transaksi_bayar
CREATE TABLE IF NOT EXISTS `pem_sewa_transaksi_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `no_transaksi_bayar` varchar(50) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_sewa_transaksi_bayar: ~0 rows (lebih kurang)
DELETE FROM `pem_sewa_transaksi_bayar`;
/*!40000 ALTER TABLE `pem_sewa_transaksi_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_sewa_transaksi_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_workorder
CREATE TABLE IF NOT EXISTS `pem_workorder` (
  `id_workorder` int(100) NOT NULL AUTO_INCREMENT,
  `nomor` varchar(100) NOT NULL,
  `tanggal` date NOT NULL,
  `id_barang` int(100) NOT NULL,
  `dasar_jumlah` int(100) NOT NULL,
  `dasar_satuan` int(100) NOT NULL,
  `dasar2_jumlah` int(100) NOT NULL,
  `dasar2_satuan` int(100) NOT NULL,
  `dasar3_jumlah` int(100) NOT NULL,
  `dasar3_satuan` int(100) NOT NULL,
  `dasar4_jumlah` int(100) NOT NULL,
  `dasar4_satuan` int(100) NOT NULL,
  `dasar5_jumlah` int(100) NOT NULL,
  `dasar5_satuan` int(100) NOT NULL,
  `dasar6_jumlah` int(100) NOT NULL,
  `dasar6_satuan` int(100) NOT NULL,
  `dasar7_jumlah` int(100) NOT NULL,
  `dasar7_satuan` int(100) NOT NULL,
  `dasar8_jumlah` int(100) NOT NULL,
  `dasar8_satuan` int(100) NOT NULL,
  `dasar9_jumlah` int(100) NOT NULL,
  `dasar9_satuan` int(100) NOT NULL,
  `dasar10_jumlah` int(100) NOT NULL,
  `dasar10_satuan` int(100) NOT NULL,
  `streep_jumlah` int(100) NOT NULL,
  `streep_satuan` int(100) NOT NULL,
  `kombinasi1_jumlah` int(100) NOT NULL,
  `kombinasi1_satuan` int(100) NOT NULL,
  `kombinasi2_jumlah` int(100) NOT NULL,
  `kombinasi2_satuan` int(100) NOT NULL,
  `kombinasi3_jumlah` int(100) NOT NULL,
  `kombinasi3_satuan` int(100) NOT NULL,
  `kluwungan1_jumlah` int(100) NOT NULL,
  `kluwungan1_satuan` int(100) NOT NULL,
  `kluwungan2_jumlah` int(100) NOT NULL,
  `kluwungan2_satuan` int(100) NOT NULL,
  `kluwungan3_jumlah` int(100) NOT NULL,
  `kluwungan3_satuan` int(100) NOT NULL,
  `kluwungan4_jumlah` int(100) NOT NULL,
  `kluwungan4_satuan` int(100) NOT NULL,
  `timbulan1_jumlah` int(100) NOT NULL,
  `timbulan1_satuan` int(100) NOT NULL,
  `timbulan2_jumlah` int(100) NOT NULL,
  `timbulan2_satuan` int(100) NOT NULL,
  `timbulan3_jumlah` int(100) NOT NULL,
  `timbulan3_satuan` int(100) NOT NULL,
  `timbulan4_jumlah` int(100) NOT NULL,
  `timbulan4_satuan` int(100) NOT NULL,
  `songketan1_jumlah` int(100) NOT NULL,
  `songketan1_satuan` int(100) NOT NULL,
  `songketan2_jumlah` int(100) NOT NULL,
  `songketan2_satuan` int(100) NOT NULL,
  `songketan3_jumlah` int(100) NOT NULL,
  `songketan3_satuan` int(100) NOT NULL,
  `songketan4_jumlah` int(100) NOT NULL,
  `songketan4_satuan` int(100) NOT NULL,
  `songketan5_jumlah` int(100) NOT NULL,
  `songketan5_satuan` int(100) NOT NULL,
  `songketan6_jumlah` int(100) NOT NULL,
  `songketan6_satuan` int(100) NOT NULL,
  `songketan7_jumlah` int(100) NOT NULL,
  `songketan7_satuan` int(100) NOT NULL,
  `songketan8_jumlah` int(100) NOT NULL,
  `songketan8_satuan` int(100) NOT NULL,
  `songketan9_jumlah` int(100) NOT NULL,
  `songketan9_satuan` int(100) NOT NULL,
  `songketan10_jumlah` int(100) NOT NULL,
  `songketan10_satuan` int(100) NOT NULL,
  `songketan11_jumlah` int(100) NOT NULL,
  `songketan11_satuan` int(100) NOT NULL,
  `songketan12_jumlah` int(100) NOT NULL,
  `songketan12_satuan` int(100) NOT NULL,
  `songketan13_jumlah` int(100) NOT NULL,
  `songketan13_satuan` int(100) NOT NULL,
  `songketan14_jumlah` int(100) NOT NULL,
  `songketan14_satuan` int(100) NOT NULL,
  `songketan15_jumlah` int(100) NOT NULL,
  `songketan15_satuan` int(100) NOT NULL,
  `pancingan1_jumlah` int(100) NOT NULL,
  `pancingan1_satuan` int(100) NOT NULL,
  `pancingan2_jumlah` int(100) NOT NULL,
  `pancingan2_satuan` int(100) NOT NULL,
  `gunungan1_atas_jumlah` int(100) NOT NULL,
  `gunungan1_atas_satuan` int(100) NOT NULL,
  `gunungan2_atas_jumlah` int(100) NOT NULL,
  `gunungan2_atas_satuan` int(100) NOT NULL,
  `gunungan3_atas_jumlah` int(100) NOT NULL,
  `gunungan3_atas_satuan` int(100) NOT NULL,
  `gunungan1_bawah_jumlah` int(100) NOT NULL,
  `gunungan1_bawah_satuan` int(100) NOT NULL,
  `gunungan2_bawah_jumlah` int(100) NOT NULL,
  `gunungan2_bawah_satuan` int(100) NOT NULL,
  `gunungan3_bawah_jumlah` int(100) NOT NULL,
  `gunungan3_bawah_satuan` int(100) NOT NULL,
  `garis1_jumlah` int(100) NOT NULL,
  `garis1_satuan` int(100) NOT NULL,
  `garis2_jumlah` int(100) NOT NULL,
  `garis2_satuan` int(100) NOT NULL,
  `id_lokasi` int(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_workorder`) USING BTREE,
  KEY `index_workorder` (`id_workorder`,`id_barang`,`id_lokasi`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_workorder: ~0 rows (lebih kurang)
DELETE FROM `pem_workorder`;
/*!40000 ALTER TABLE `pem_workorder` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_workorder` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_workorder_barang
CREATE TABLE IF NOT EXISTS `pem_workorder_barang` (
  `id_workorder_barang` int(100) NOT NULL AUTO_INCREMENT,
  `id_workorder` int(100) NOT NULL,
  `no_workorder` varchar(100) NOT NULL,
  `motif` varchar(100) NOT NULL,
  `tanggal_celup` date NOT NULL,
  `hb` date NOT NULL,
  `jumlah_beem` int(12) NOT NULL,
  `dasar` int(100) NOT NULL,
  `dasar2` int(100) NOT NULL,
  `dasar3` int(100) NOT NULL,
  `dasar4` int(100) NOT NULL,
  `dasar5` int(100) NOT NULL,
  `dasar6` int(100) NOT NULL,
  `dasar7` int(100) NOT NULL,
  `dasar8` int(100) NOT NULL,
  `dasar9` int(100) NOT NULL,
  `dasar10` int(100) NOT NULL,
  `streep` int(100) NOT NULL,
  `kombinasi1` int(100) NOT NULL,
  `kombinasi2` int(100) NOT NULL,
  `kombinasi3` int(100) NOT NULL,
  `kluwungan1` int(100) NOT NULL,
  `kluwungan2` int(100) NOT NULL,
  `kluwungan3` int(100) NOT NULL,
  `kluwungan4` int(100) NOT NULL,
  `timbulan1` int(100) NOT NULL,
  `timbulan2` int(100) NOT NULL,
  `timbulan3` int(100) NOT NULL,
  `timbulan4` int(100) NOT NULL,
  `songketan1` int(100) NOT NULL,
  `songketan2` int(100) NOT NULL,
  `songketan3` int(100) NOT NULL,
  `songketan4` int(100) NOT NULL,
  `songketan5` int(100) NOT NULL,
  `songketan6` int(100) NOT NULL,
  `songketan7` int(100) NOT NULL,
  `songketan8` int(100) NOT NULL,
  `songketan9` int(100) NOT NULL,
  `songketan10` int(100) NOT NULL,
  `songketan11` int(100) NOT NULL,
  `songketan12` int(100) NOT NULL,
  `songketan13` int(100) NOT NULL,
  `songketan14` int(100) NOT NULL,
  `songketan15` int(100) NOT NULL,
  `pancingan1` int(100) NOT NULL,
  `pancingan2` int(100) NOT NULL,
  `gunungan1_atas` int(100) NOT NULL,
  `gunungan2_atas` int(100) NOT NULL,
  `gunungan3_atas` int(100) NOT NULL,
  `gunungan1_bawah` int(100) NOT NULL,
  `gunungan2_bawah` int(100) NOT NULL,
  `gunungan3_bawah` int(100) NOT NULL,
  `garis1` int(100) NOT NULL,
  `garis2` int(100) NOT NULL,
  `beem` date NOT NULL,
  `pakan` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_workorder_barang`) USING BTREE,
  KEY `fk_idw_barang` (`id_workorder`) USING BTREE,
  KEY `index_workorder_brg` (`id_workorder_barang`,`id_workorder`,`motif`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_workorder_barang: ~0 rows (lebih kurang)
DELETE FROM `pem_workorder_barang`;
/*!40000 ALTER TABLE `pem_workorder_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_workorder_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pem_workorder_ket
CREATE TABLE IF NOT EXISTS `pem_workorder_ket` (
  `id_workorder_ket` int(100) NOT NULL AUTO_INCREMENT,
  `id_workorder` int(100) NOT NULL,
  `keterangan` varchar(50) NOT NULL,
  `id_barang` int(100) NOT NULL,
  `jumlah` float NOT NULL,
  `jumlah_konversi` float NOT NULL,
  `satuan_jumlah` int(100) NOT NULL,
  `satuan_jumlah_konversi` int(100) NOT NULL,
  PRIMARY KEY (`id_workorder_ket`) USING BTREE,
  KEY `fk_idw_ket` (`id_workorder`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pem_workorder_ket: ~0 rows (lebih kurang)
DELETE FROM `pem_workorder_ket`;
/*!40000 ALTER TABLE `pem_workorder_ket` DISABLE KEYS */;
/*!40000 ALTER TABLE `pem_workorder_ket` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pen_penjualan
CREATE TABLE IF NOT EXISTS `pen_penjualan` (
  `id_penjualan` int(100) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `cv` int(11) NOT NULL DEFAULT '1',
  `no_faktur` varchar(100) NOT NULL,
  `sufix_no_faktur` varchar(255) DEFAULT NULL,
  `tanggal` date NOT NULL,
  `tanggal_faktur` date NOT NULL,
  `tanggal_tempo` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `id_pelanggan` int(100) NOT NULL,
  `nominal_potongan` decimal(11,0) NOT NULL DEFAULT '0',
  `pajak` int(1) NOT NULL DEFAULT '0' COMMENT '1=iya,0=tidak',
  `no_faktur_pajak` varchar(255) NOT NULL DEFAULT '-',
  `status` varchar(5) NOT NULL DEFAULT '0',
  `status_kirim` int(1) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `mata_uang` int(11) NOT NULL DEFAULT '1',
  `kurs_jual` varchar(255) NOT NULL DEFAULT '1',
  `kurs_bayar` varchar(255) NOT NULL DEFAULT '1',
  `tanggal_surat` date DEFAULT NULL,
  `no_surat` varchar(255) NOT NULL DEFAULT '0',
  `sufix_no_surat` varchar(255) DEFAULT NULL,
  `keterangan_surat` text,
  `id_akun_piutang` int(11) DEFAULT '201' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_potongan` int(11) DEFAULT '202' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_pajak` int(11) DEFAULT '203' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_penjualan` int(11) DEFAULT '204' COMMENT 'ms_ref_jurnal => kode',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_penjualan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pen_penjualan: ~0 rows (lebih kurang)
DELETE FROM `pen_penjualan`;
/*!40000 ALTER TABLE `pen_penjualan` DISABLE KEYS */;
/*!40000 ALTER TABLE `pen_penjualan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pen_penjualan_barang
CREATE TABLE IF NOT EXISTS `pen_penjualan_barang` (
  `id_jual_barang` int(100) NOT NULL AUTO_INCREMENT,
  `id_penjualan` int(100) NOT NULL,
  `id_barang` int(100) NOT NULL,
  `nama_barang` text,
  `id_gudang` int(11) NOT NULL,
  `jml_barang` varchar(50) NOT NULL,
  `jml_barang_konv` varchar(50) NOT NULL DEFAULT '0',
  `harga_satuan` varchar(50) NOT NULL DEFAULT '0',
  `potongan` varchar(50) NOT NULL DEFAULT '0',
  `total` varchar(50) NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL DEFAULT '0',
  `id_satuan` mediumint(9) NOT NULL DEFAULT '0',
  `jumlah` double NOT NULL DEFAULT '0',
  `jumlah_konversi` double NOT NULL DEFAULT '0',
  `id_workorder` int(11) NOT NULL DEFAULT '0',
  `id_workorder_barang` int(11) NOT NULL DEFAULT '0',
  `id_komposisi` int(11) NOT NULL DEFAULT '0',
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `id_kualitas` mediumint(9) NOT NULL DEFAULT '0',
  `id_motif_barang` int(11) NOT NULL DEFAULT '0',
  `id_motif` int(100) NOT NULL,
  `id_kualitas_dudul` int(11) NOT NULL DEFAULT '0',
  `id_label` int(11) NOT NULL,
  `id_kemasan` int(11) NOT NULL,
  `id_kemasansatuan` int(11) NOT NULL,
  `id_kemasansepuluh` int(11) NOT NULL,
  `id_kemasanseratus` int(11) NOT NULL,
  `id_plat` int(11) NOT NULL,
  `id_cap` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_proses` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_periksa` int(11) NOT NULL DEFAULT '0',
  `id_perubahansatuan` int(11) NOT NULL,
  `jumlah_rencana` double NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_jual_barang`) USING BTREE,
  KEY `fk_idjual` (`id_penjualan`) USING BTREE,
  KEY `index_penjualan_brg` (`id_jual_barang`,`id_penjualan`,`id_barang`,`id_gudang`,`id_satuan`,`id_motif`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pen_penjualan_barang: ~0 rows (lebih kurang)
DELETE FROM `pen_penjualan_barang`;
/*!40000 ALTER TABLE `pen_penjualan_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pen_penjualan_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pen_penjualan_bayar
CREATE TABLE IF NOT EXISTS `pen_penjualan_bayar` (
  `id_jualbayar` int(11) NOT NULL AUTO_INCREMENT,
  `id_transaksi_bayar` int(11) NOT NULL,
  `id_penjualan` int(11) NOT NULL DEFAULT '0',
  `id_akun` int(11) DEFAULT NULL,
  `tgl_bayar` date NOT NULL,
  `jum_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(255) DEFAULT 'debet',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_jualbayar`) USING BTREE,
  KEY `fk_jual` (`id_penjualan`) USING BTREE,
  KEY `fk_transaksi_1` (`id_transaksi_bayar`) USING BTREE,
  KEY `index_penjualan_byr` (`id_jualbayar`,`id_transaksi_bayar`,`id_penjualan`,`id_akun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pen_penjualan_bayar: ~0 rows (lebih kurang)
DELETE FROM `pen_penjualan_bayar`;
/*!40000 ALTER TABLE `pen_penjualan_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pen_penjualan_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pen_penjualan_retur
CREATE TABLE IF NOT EXISTS `pen_penjualan_retur` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `cv` int(11) NOT NULL DEFAULT '1',
  `no_retur` varchar(100) NOT NULL,
  `sufix_no_retur` varchar(255) DEFAULT NULL,
  `tanggal` date NOT NULL,
  `tanggal_retur` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `id_pelanggan` int(100) NOT NULL,
  `id_penjualan` int(11) NOT NULL,
  `nominal_potongan` decimal(11,0) NOT NULL DEFAULT '0',
  `pajak` int(1) NOT NULL DEFAULT '0' COMMENT '1=iya,0=tidak',
  `no_faktur_pajak` varchar(255) NOT NULL DEFAULT '-',
  `status` varchar(5) NOT NULL DEFAULT '1' COMMENT '0=>retur, 1=>terima gudang',
  `keterangan` text NOT NULL,
  `mata_uang` int(11) NOT NULL DEFAULT '1',
  `kurs_jual` varchar(255) NOT NULL DEFAULT '1',
  `kurs_bayar` varchar(255) NOT NULL DEFAULT '1',
  `id_akun_piutang` int(11) DEFAULT '401' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_potongan` int(11) DEFAULT '402' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_pajak` int(11) DEFAULT '403' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_retur_penjualan` int(11) DEFAULT '404' COMMENT 'ms_ref_jurnal => kode',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_penjualan_retur` (`id`,`lokasi`,`user_id_create`,`user_id_update`,`id_pelanggan`,`id_penjualan`,`id_akun_piutang`,`id_akun_potongan`,`id_akun_pajak`,`id_akun_retur_penjualan`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pen_penjualan_retur: ~0 rows (lebih kurang)
DELETE FROM `pen_penjualan_retur`;
/*!40000 ALTER TABLE `pen_penjualan_retur` DISABLE KEYS */;
/*!40000 ALTER TABLE `pen_penjualan_retur` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pen_penjualan_retur_barang
CREATE TABLE IF NOT EXISTS `pen_penjualan_retur_barang` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_penjualan_retur` int(11) NOT NULL,
  `id_penjualan_barang` int(11) NOT NULL,
  `jml_retur` varchar(255) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `pen_penjualan_retur_barang_fk` (`id_penjualan_retur`),
  KEY `index_penjualan_returbrg` (`id`,`id_penjualan_retur`,`id_penjualan_barang`) USING BTREE,
  CONSTRAINT `pen_penjualan_retur_barang_fk` FOREIGN KEY (`id_penjualan_retur`) REFERENCES `pen_penjualan_retur` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pen_penjualan_retur_barang: ~0 rows (lebih kurang)
DELETE FROM `pen_penjualan_retur_barang`;
/*!40000 ALTER TABLE `pen_penjualan_retur_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pen_penjualan_retur_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pen_penjualan_retur_barang_nonfaktur
CREATE TABLE IF NOT EXISTS `pen_penjualan_retur_barang_nonfaktur` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_retur_nonfaktur` int(11) NOT NULL,
  `id_barang` int(11) NOT NULL,
  `id_satuan` int(11) NOT NULL,
  `jml_retur` varchar(255) NOT NULL DEFAULT '0',
  `harga_satuan` varchar(255) NOT NULL DEFAULT '0',
  `potongan` varchar(255) NOT NULL DEFAULT '0',
  `total` varchar(255) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `pen_penjualan_retur_barang_nonfaktur_fk` (`id_retur_nonfaktur`),
  CONSTRAINT `pen_penjualan_retur_barang_nonfaktur_fk` FOREIGN KEY (`id_retur_nonfaktur`) REFERENCES `pen_penjualan_retur_nonfaktur` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pen_penjualan_retur_barang_nonfaktur: ~0 rows (lebih kurang)
DELETE FROM `pen_penjualan_retur_barang_nonfaktur`;
/*!40000 ALTER TABLE `pen_penjualan_retur_barang_nonfaktur` DISABLE KEYS */;
/*!40000 ALTER TABLE `pen_penjualan_retur_barang_nonfaktur` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pen_penjualan_retur_nonfaktur
CREATE TABLE IF NOT EXISTS `pen_penjualan_retur_nonfaktur` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `cv` int(11) NOT NULL DEFAULT '1',
  `no_retur` varchar(100) NOT NULL,
  `sufix_no_retur` varchar(255) DEFAULT NULL,
  `tanggal` date NOT NULL,
  `tanggal_retur` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `id_pelanggan` int(100) NOT NULL,
  `nominal_potongan` decimal(11,0) NOT NULL DEFAULT '0',
  `pajak` int(1) NOT NULL DEFAULT '0' COMMENT '1=iya,0=tidak',
  `no_faktur_pajak` varchar(255) NOT NULL DEFAULT '-',
  `status` varchar(5) NOT NULL DEFAULT '1' COMMENT '0=>retur, 1=>terima gudang',
  `keterangan` text NOT NULL,
  `mata_uang` int(11) NOT NULL DEFAULT '1',
  `kurs_jual` varchar(255) NOT NULL DEFAULT '1',
  `kurs_bayar` varchar(255) NOT NULL DEFAULT '1',
  `id_akun_piutang` int(11) DEFAULT '401' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_potongan` int(11) DEFAULT '402' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_pajak` int(11) DEFAULT '403' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_retur_penjualan` int(11) DEFAULT '404' COMMENT 'ms_ref_jurnal => kode',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pen_penjualan_retur_nonfaktur: ~0 rows (lebih kurang)
DELETE FROM `pen_penjualan_retur_nonfaktur`;
/*!40000 ALTER TABLE `pen_penjualan_retur_nonfaktur` DISABLE KEYS */;
/*!40000 ALTER TABLE `pen_penjualan_retur_nonfaktur` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pen_penjualan_transaksi_bayar
CREATE TABLE IF NOT EXISTS `pen_penjualan_transaksi_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `no_transaksi_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tanggal_bayar` date DEFAULT NULL,
  `kurs_bayar` varchar(255) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pen_penjualan_transaksi_bayar: ~0 rows (lebih kurang)
DELETE FROM `pen_penjualan_transaksi_bayar`;
/*!40000 ALTER TABLE `pen_penjualan_transaksi_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pen_penjualan_transaksi_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pen_piutangawal
CREATE TABLE IF NOT EXISTS `pen_piutangawal` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `cv` int(11) NOT NULL DEFAULT '1',
  `no_faktur` varchar(100) NOT NULL,
  `sufix_no_faktur` varchar(255) DEFAULT NULL,
  `tanggal` date NOT NULL,
  `tanggal_faktur` date NOT NULL,
  `tanggal_tempo` date NOT NULL,
  `id_pelanggan` int(100) NOT NULL,
  `nominal` varchar(255) DEFAULT '0',
  `pajak` int(1) NOT NULL DEFAULT '0' COMMENT '1=iya,0=tidak',
  `no_faktur_pajak` varchar(255) NOT NULL DEFAULT '-',
  `keterangan` text NOT NULL,
  `id_akun_piutang` int(11) DEFAULT '201' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_pajak` int(11) DEFAULT '203' COMMENT 'ms_ref_jurnal => kode',
  `id_akun_penjualan` int(11) DEFAULT '204' COMMENT 'ms_ref_jurnal => kode',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_piutangawal` (`id`,`lokasi`,`user_id_create`,`user_id_update`,`id_pelanggan`,`id_akun_piutang`,`id_akun_pajak`,`id_akun_penjualan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pen_piutangawal: ~0 rows (lebih kurang)
DELETE FROM `pen_piutangawal`;
/*!40000 ALTER TABLE `pen_piutangawal` DISABLE KEYS */;
/*!40000 ALTER TABLE `pen_piutangawal` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pen_piutangawal_bayar
CREATE TABLE IF NOT EXISTS `pen_piutangawal_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_transaksi_bayar` int(11) NOT NULL,
  `id_piutangawal` int(11) NOT NULL DEFAULT '0',
  `id_akun` int(11) DEFAULT NULL,
  `tgl_bayar` date NOT NULL,
  `jum_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(255) DEFAULT 'K',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_piutangawal` (`id`) USING BTREE,
  KEY `fk_transaksi_1` (`id_transaksi_bayar`) USING BTREE,
  KEY `index_piutangawal_byr` (`id`,`id_transaksi_bayar`,`id_piutangawal`,`id_akun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pen_piutangawal_bayar: ~0 rows (lebih kurang)
DELETE FROM `pen_piutangawal_bayar`;
/*!40000 ALTER TABLE `pen_piutangawal_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pen_piutangawal_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_barangkeluar
CREATE TABLE IF NOT EXISTS `pro_barangkeluar` (
  `id_barangkeluar` int(11) NOT NULL AUTO_INCREMENT,
  `tanggal` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `id_rekanan` int(11) NOT NULL,
  `id_pegawai` int(11) NOT NULL,
  `id_mesin` int(11) NOT NULL,
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `id_proses_sebelum` int(11) NOT NULL DEFAULT '0',
  `id_workorder` int(100) NOT NULL,
  `id_workorder_barang` int(100) NOT NULL,
  `id_lokasi` int(100) NOT NULL DEFAULT '1',
  `tanggal_perkiraan` date NOT NULL,
  `jumlah` char(12) NOT NULL DEFAULT '0',
  `status` int(12) NOT NULL DEFAULT '0',
  `status_beem` int(11) NOT NULL DEFAULT '0',
  `tanggal_beem` date DEFAULT NULL,
  `status_workorder` int(11) NOT NULL,
  `noAuto` varchar(255) NOT NULL,
  `noAuto_ext` varchar(10) NOT NULL,
  `id_user` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_barangkeluar`) USING BTREE,
  KEY `index_barangkeluar` (`id_barangkeluar`,`id_rekanan`,`id_pegawai`,`id_mesin`,`id_proses`,`id_workorder`,`id_workorder_barang`,`id_lokasi`,`id_user`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_barangkeluar: ~0 rows (lebih kurang)
DELETE FROM `pro_barangkeluar`;
/*!40000 ALTER TABLE `pro_barangkeluar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_barangkeluar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_barangkeluar_barang
CREATE TABLE IF NOT EXISTS `pro_barangkeluar_barang` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_barangkeluar` int(11) NOT NULL,
  `id_barang` int(11) NOT NULL,
  `id_gudang` int(11) NOT NULL,
  `jumlah` double NOT NULL,
  `jumlah_rencana` double NOT NULL DEFAULT '0',
  `id_perubahansatuan` int(100) NOT NULL,
  `satuan_jumlah` int(100) NOT NULL,
  `jumlah_konversi` double NOT NULL,
  `satuan_jumlah_konversi` int(100) NOT NULL,
  `warna` int(100) NOT NULL,
  `id_motif` int(100) NOT NULL DEFAULT '0',
  `id_motif_barang` int(100) DEFAULT '0',
  `id_kualitas` int(100) NOT NULL,
  `id_proses_sebelum` int(100) NOT NULL,
  `id_kualitas_dudul` int(11) NOT NULL,
  `id_kemasan` int(11) NOT NULL,
  `id_label` int(11) NOT NULL,
  `id_kemasansatuan` int(11) NOT NULL,
  `id_kemasansepuluh` int(11) NOT NULL,
  `id_kemasanseratus` int(11) NOT NULL,
  `id_cap` int(11) NOT NULL,
  `id_kualitas_proses` int(11) NOT NULL,
  `id_kualitas_periksa` int(11) NOT NULL,
  `id_satuanhasil` int(11) NOT NULL,
  `keterangan` varchar(255) DEFAULT NULL,
  `tanggal_proses` date NOT NULL,
  `jenis` int(11) NOT NULL DEFAULT '0',
  `status` int(2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_idkeluar` (`id_barangkeluar`) USING BTREE,
  KEY `index_barangkeluar_brg` (`id`,`id_barangkeluar`,`id_barang`,`id_gudang`,`id_perubahansatuan`,`warna`,`id_motif`,`id_motif_barang`,`id_kualitas`,`id_kualitas_dudul`,`id_kemasan`,`id_label`,`id_kemasansatuan`) USING BTREE,
  KEY `index_barangkeluar_brg_2` (`id_kemasansepuluh`,`id_kemasanseratus`,`id_cap`,`id_kualitas_proses`,`id_kualitas_periksa`,`id_satuanhasil`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_barangkeluar_barang: ~0 rows (lebih kurang)
DELETE FROM `pro_barangkeluar_barang`;
/*!40000 ALTER TABLE `pro_barangkeluar_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_barangkeluar_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_barangkeluar_hasil
CREATE TABLE IF NOT EXISTS `pro_barangkeluar_hasil` (
  `id_keluarhasil` int(11) NOT NULL AUTO_INCREMENT,
  `id_barangkeluar` int(11) NOT NULL,
  `id_barangkeluar_barang` int(11) NOT NULL,
  `id_satuanhasil` int(11) NOT NULL,
  `hasil` int(11) NOT NULL,
  `jenis` int(11) NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_keluarhasil`),
  KEY `fk_hasil_idkeluar` (`id_barangkeluar_barang`),
  KEY `index_barangkeluar_hasil` (`id_keluarhasil`,`id_barangkeluar`,`id_barangkeluar_barang`,`id_satuanhasil`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_barangkeluar_hasil: 0 rows
DELETE FROM `pro_barangkeluar_hasil`;
/*!40000 ALTER TABLE `pro_barangkeluar_hasil` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_barangkeluar_hasil` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_barangkeluar_kemasan
CREATE TABLE IF NOT EXISTS `pro_barangkeluar_kemasan` (
  `id_barangkeluar_kemasan` int(11) NOT NULL AUTO_INCREMENT,
  `tanggal` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `id_pegawai` int(11) NOT NULL DEFAULT '0',
  `id_rekanan` int(11) NOT NULL DEFAULT '0',
  `id_mesin` int(11) NOT NULL DEFAULT '0',
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `tanggal_perkiraan` date NOT NULL,
  `id_lokasi` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `noAuto` varchar(50) NOT NULL,
  `noAuto_ext` varchar(50) NOT NULL,
  `id_user` int(11) NOT NULL,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_barangkeluar_kemasan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_barangkeluar_kemasan: ~0 rows (lebih kurang)
DELETE FROM `pro_barangkeluar_kemasan`;
/*!40000 ALTER TABLE `pro_barangkeluar_kemasan` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_barangkeluar_kemasan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_barangkeluar_kemasan_barang
CREATE TABLE IF NOT EXISTS `pro_barangkeluar_kemasan_barang` (
  `id_barangkeluar_kb` int(11) NOT NULL AUTO_INCREMENT,
  `id_barangkeluar_kemasan` int(11) NOT NULL DEFAULT '0',
  `id_barang` int(11) NOT NULL DEFAULT '0',
  `nama_barang` varchar(100) NOT NULL,
  `id_gudang` int(11) NOT NULL DEFAULT '0',
  `id_proses_sebelum` int(11) NOT NULL DEFAULT '0',
  `jumlah` double NOT NULL DEFAULT '0',
  `id_workorder` int(11) NOT NULL,
  `id_workorder_barang` int(11) NOT NULL,
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `id_komposisi` int(11) NOT NULL DEFAULT '0',
  `id_motif` int(11) NOT NULL DEFAULT '0',
  `id_motif_barang` int(11) NOT NULL DEFAULT '0',
  `id_kualitas` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_dudul` int(11) NOT NULL DEFAULT '0',
  `id_kemasan` int(11) NOT NULL DEFAULT '0',
  `id_label` int(11) NOT NULL DEFAULT '0',
  `id_kemasansatuan` int(11) NOT NULL DEFAULT '0',
  `id_kemasansepuluh` int(11) NOT NULL DEFAULT '0',
  `id_kemasanseratus` int(11) NOT NULL DEFAULT '0',
  `id_cap` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_proses` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_periksa` int(11) NOT NULL DEFAULT '0',
  `id_perubahansatuan` int(11) NOT NULL DEFAULT '0',
  `jumlah_rencana` double NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `status` int(2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_barangkeluar_kb`) USING BTREE,
  KEY `fk_idbarangkeluar_kemasan` (`id_barangkeluar_kemasan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_barangkeluar_kemasan_barang: ~0 rows (lebih kurang)
DELETE FROM `pro_barangkeluar_kemasan_barang`;
/*!40000 ALTER TABLE `pro_barangkeluar_kemasan_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_barangkeluar_kemasan_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_barangmasuk
CREATE TABLE IF NOT EXISTS `pro_barangmasuk` (
  `id_barangmasuk` int(11) NOT NULL AUTO_INCREMENT,
  `id_barangkeluar` int(11) NOT NULL DEFAULT '0',
  `tanggal` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `status` int(12) NOT NULL DEFAULT '0',
  `noAuto` varchar(20) NOT NULL,
  `noAuto_ext` varchar(20) NOT NULL,
  `id_user` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_barangmasuk`) USING BTREE,
  KEY `fk_barangkel` (`id_barangkeluar`) USING BTREE,
  KEY `index_barangmasuk` (`id_barangmasuk`,`id_barangkeluar`,`id_user`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_barangmasuk: ~0 rows (lebih kurang)
DELETE FROM `pro_barangmasuk`;
/*!40000 ALTER TABLE `pro_barangmasuk` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_barangmasuk` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_barangmasuk_barang
CREATE TABLE IF NOT EXISTS `pro_barangmasuk_barang` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `id_barangmasuk` int(100) NOT NULL,
  `id_barang` int(100) NOT NULL,
  `id_gudang` int(100) NOT NULL,
  `id_upah` int(12) DEFAULT NULL,
  `id_satuan` mediumint(9) NOT NULL DEFAULT '0',
  `jumlah` double NOT NULL DEFAULT '0',
  `jumlah_rencana` double NOT NULL DEFAULT '0',
  `id_perubahansatuan` int(12) NOT NULL DEFAULT '0',
  `jumlah_konversi` double NOT NULL DEFAULT '0',
  `id_komposisi` int(11) NOT NULL DEFAULT '0',
  `total_upah` mediumint(9) DEFAULT '0',
  `id_kualitas` mediumint(9) NOT NULL DEFAULT '0',
  `id_motif_barang` int(11) NOT NULL DEFAULT '0',
  `id_motif` int(100) NOT NULL,
  `panjang` int(11) NOT NULL DEFAULT '0',
  `lebar` int(11) NOT NULL DEFAULT '0',
  `pick` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_dudul` int(11) NOT NULL DEFAULT '0',
  `id_label` int(11) NOT NULL,
  `id_cap` int(11) NOT NULL,
  `id_kemasan` int(11) NOT NULL,
  `id_kemasansatuan` int(11) NOT NULL,
  `id_kemasansepuluh` int(11) NOT NULL,
  `id_kemasanseratus` int(11) NOT NULL,
  `id_plat` int(11) NOT NULL,
  `id_kualitas_proses` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_periksa` int(11) NOT NULL DEFAULT '0',
  `id_shift` int(11) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `status` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `id_jahit` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_idmasuk` (`id_barangmasuk`) USING BTREE,
  KEY `index_barangmasuk_brg` (`id`,`id_barangmasuk`,`id_barang`,`id_gudang`,`id_satuan`,`id_perubahansatuan`,`id_komposisi`,`id_kualitas`,`id_motif_barang`,`id_motif`,`id_kualitas_dudul`,`id_label`,`id_kemasan`) USING BTREE,
  KEY `index_barangmasuk_brg_2` (`id_kemasansatuan`,`id_kemasansepuluh`,`id_kemasanseratus`,`id_plat`,`id_kualitas_proses`,`id_kualitas_periksa`,`id_shift`,`id_user`,`id_jahit`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_barangmasuk_barang: ~0 rows (lebih kurang)
DELETE FROM `pro_barangmasuk_barang`;
/*!40000 ALTER TABLE `pro_barangmasuk_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_barangmasuk_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_barangmasuk_kemasan
CREATE TABLE IF NOT EXISTS `pro_barangmasuk_kemasan` (
  `id_barangmasuk_kemasan` int(11) NOT NULL AUTO_INCREMENT,
  `id_barangkeluar_kemasan` int(11) NOT NULL DEFAULT '0',
  `tanggal` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `status` int(11) NOT NULL,
  `noAuto` varchar(50) NOT NULL,
  `noAuto_ext` varchar(50) NOT NULL,
  `keterangan` text NOT NULL,
  `id_user` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_barangmasuk_kemasan`) USING BTREE,
  KEY `fk_barangmasuk_kemasan_id` (`id_barangkeluar_kemasan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_barangmasuk_kemasan: ~0 rows (lebih kurang)
DELETE FROM `pro_barangmasuk_kemasan`;
/*!40000 ALTER TABLE `pro_barangmasuk_kemasan` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_barangmasuk_kemasan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_barangmasuk_kemasan_barang
CREATE TABLE IF NOT EXISTS `pro_barangmasuk_kemasan_barang` (
  `id_barangmasuk_kb` int(11) NOT NULL AUTO_INCREMENT,
  `id_barangmasuk_kemasan` int(11) NOT NULL DEFAULT '0',
  `id_barang` int(11) NOT NULL DEFAULT '0',
  `id_gudang` int(11) NOT NULL DEFAULT '0',
  `jumlah` double NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `id_workorder` int(11) NOT NULL DEFAULT '0',
  `id_workorder_barang` int(11) NOT NULL DEFAULT '0',
  `id_komposisi` int(11) NOT NULL,
  `id_motif` int(11) NOT NULL,
  `id_motif_barang` int(11) NOT NULL,
  `id_kualitas` int(11) NOT NULL,
  `id_kualitas_dudul` int(11) NOT NULL,
  `id_kemasan` int(11) NOT NULL,
  `id_label` int(11) NOT NULL,
  `id_kemasansatuan` int(11) NOT NULL,
  `id_kemasansepuluh` int(11) NOT NULL,
  `id_kemasanseratus` int(11) NOT NULL,
  `id_cap` int(11) NOT NULL,
  `id_kualitas_proses` int(11) NOT NULL,
  `id_kualitas_periksa` int(11) NOT NULL,
  `id_perubahansatuan` int(11) NOT NULL,
  `jumlah_rencana` double NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `status` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_barangmasuk_kb`) USING BTREE,
  KEY `fk_idbarangmasuk_kemasan` (`id_barangmasuk_kemasan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_barangmasuk_kemasan_barang: ~0 rows (lebih kurang)
DELETE FROM `pro_barangmasuk_kemasan_barang`;
/*!40000 ALTER TABLE `pro_barangmasuk_kemasan_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_barangmasuk_kemasan_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_bom
CREATE TABLE IF NOT EXISTS `pro_bom` (
  `id_bom` int(100) NOT NULL AUTO_INCREMENT,
  `tanggal` date NOT NULL,
  `id_workorder` int(100) NOT NULL,
  `id_workorder_barang` int(100) NOT NULL,
  PRIMARY KEY (`id_bom`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_bom: ~0 rows (lebih kurang)
DELETE FROM `pro_bom`;
/*!40000 ALTER TABLE `pro_bom` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_bom` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_bom_keluar
CREATE TABLE IF NOT EXISTS `pro_bom_keluar` (
  `id_bom_keluar` int(100) NOT NULL AUTO_INCREMENT,
  `id_bom` int(100) DEFAULT NULL,
  `id_proses` int(11) NOT NULL,
  `id_barang` int(11) NOT NULL,
  `jumlah` double NOT NULL,
  `id_satuan` int(11) NOT NULL,
  `harga` double NOT NULL,
  `id_komposisi` int(11) NOT NULL,
  `id_motif_barang` int(11) NOT NULL,
  `id_motif` int(11) NOT NULL,
  `id_kualitas` int(11) NOT NULL,
  `id_kualitas_dudul` int(11) NOT NULL,
  `id_label` int(11) NOT NULL,
  `id_cap` int(11) NOT NULL,
  `id_kemasan` int(11) NOT NULL,
  `id_kemasansatuan` int(11) NOT NULL,
  `id_kemasansepuluh` int(11) NOT NULL,
  `id_kemasanseratus` int(11) NOT NULL,
  PRIMARY KEY (`id_bom_keluar`) USING BTREE,
  KEY `FK_pro_bom_keluar_pro_bom` (`id_bom`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_bom_keluar: ~0 rows (lebih kurang)
DELETE FROM `pro_bom_keluar`;
/*!40000 ALTER TABLE `pro_bom_keluar` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_bom_keluar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_bom_masuk
CREATE TABLE IF NOT EXISTS `pro_bom_masuk` (
  `id_bom_masuk` int(100) NOT NULL AUTO_INCREMENT,
  `id_bom` int(100) DEFAULT NULL,
  `id_proses` int(11) NOT NULL,
  `id_barang` int(11) NOT NULL,
  `jumlah` double NOT NULL,
  `id_satuan` int(11) NOT NULL,
  `harga` double NOT NULL,
  `id_komposisi` int(11) NOT NULL,
  `id_motif_barang` int(11) NOT NULL,
  `id_motif` int(11) NOT NULL,
  `id_kualitas` int(11) NOT NULL,
  `id_kualitas_dudul` int(11) NOT NULL,
  `id_label` int(11) NOT NULL,
  `id_cap` int(11) NOT NULL,
  `id_kemasan` int(11) NOT NULL,
  `id_kemasansatuan` int(11) NOT NULL,
  `id_kemasansepuluh` int(11) NOT NULL,
  `id_kemasanseratus` int(11) NOT NULL,
  PRIMARY KEY (`id_bom_masuk`) USING BTREE,
  KEY `FK_pro_bom_masuk_pro_bom` (`id_bom`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_bom_masuk: ~0 rows (lebih kurang)
DELETE FROM `pro_bom_masuk`;
/*!40000 ALTER TABLE `pro_bom_masuk` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_bom_masuk` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_bom_upah
CREATE TABLE IF NOT EXISTS `pro_bom_upah` (
  `id_bom_upah` int(100) NOT NULL AUTO_INCREMENT,
  `id_bom` int(100) DEFAULT NULL,
  `id_proses` int(11) NOT NULL,
  `upah` double NOT NULL,
  PRIMARY KEY (`id_bom_upah`) USING BTREE,
  KEY `FK_pro_bom_upah_pro_bom` (`id_bom`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_bom_upah: ~0 rows (lebih kurang)
DELETE FROM `pro_bom_upah`;
/*!40000 ALTER TABLE `pro_bom_upah` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_bom_upah` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_kembali
CREATE TABLE IF NOT EXISTS `pro_kembali` (
  `id_kembali` int(11) NOT NULL AUTO_INCREMENT,
  `tanggal` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `id_barangkeluar` int(11) NOT NULL DEFAULT '0',
  `id_barangmasuk` int(11) NOT NULL DEFAULT '0',
  `jenis` int(11) NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL DEFAULT '0',
  `id_user` int(11) NOT NULL DEFAULT '0',
  `id_lokasi` int(11) NOT NULL DEFAULT '0',
  `keterangan` text NOT NULL,
  `is_all` int(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_kembali`),
  KEY `index_kembali` (`id_kembali`,`id_barangkeluar`,`id_barangmasuk`,`id_user`,`id_lokasi`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_kembali: 0 rows
DELETE FROM `pro_kembali`;
/*!40000 ALTER TABLE `pro_kembali` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_kembali` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_kembali_barang
CREATE TABLE IF NOT EXISTS `pro_kembali_barang` (
  `id_kembali_barang` int(11) NOT NULL AUTO_INCREMENT,
  `id_kembali` int(11) NOT NULL DEFAULT '0',
  `id` int(11) NOT NULL DEFAULT '0',
  `id_barang` int(11) NOT NULL DEFAULT '0',
  `jumlah` varchar(50) NOT NULL,
  `id_gudang` int(11) NOT NULL,
  `id_satuan` int(11) NOT NULL,
  `id_proses` int(11) NOT NULL,
  `id_komposisi` int(11) NOT NULL,
  `id_motif` int(11) NOT NULL,
  `id_motif_barang` int(11) NOT NULL,
  `id_label` int(11) NOT NULL,
  `id_kualitas` int(11) NOT NULL,
  `id_kualitas_dudul` int(11) NOT NULL,
  `id_kemasan` int(11) NOT NULL,
  `id_kemasansatuan` int(11) NOT NULL,
  `id_kemasansepuluh` int(11) NOT NULL,
  `id_kemasanseratus` int(11) NOT NULL,
  `id_workorder` int(11) NOT NULL,
  `id_workorder_barang` int(11) NOT NULL,
  `id_cap` int(11) NOT NULL,
  `id_kualitas_proses` int(11) NOT NULL,
  `id_kualitas_periksa` int(11) NOT NULL,
  `id_perubahansatuan` int(11) NOT NULL,
  `jumlah_rencana` double NOT NULL,
  `id_satuanhasil` int(11) NOT NULL DEFAULT '0',
  `hasil` varchar(50) NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_kembali_barang`),
  KEY `fk_idkembali` (`id_kembali`),
  KEY `index_kembalibarang` (`id_kembali_barang`,`id_kembali`,`id`,`id_barang`,`id_gudang`,`id_satuan`,`id_proses`,`id_komposisi`,`id_motif`,`id_motif_barang`,`id_label`,`id_kualitas`,`id_kualitas_dudul`,`id_kemasan`) USING BTREE,
  KEY `index_kembalibarang_2` (`id_kemasansatuan`,`id_kemasansepuluh`,`id_kemasanseratus`,`id_workorder`,`id_workorder_barang`,`id_cap`,`id_kualitas_proses`,`id_kualitas_periksa`,`id_perubahansatuan`,`id_satuanhasil`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_kembali_barang: 0 rows
DELETE FROM `pro_kembali_barang`;
/*!40000 ALTER TABLE `pro_kembali_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_kembali_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahproduksi
CREATE TABLE IF NOT EXISTS `pro_upahproduksi` (
  `id_upahproduksi` int(100) NOT NULL AUTO_INCREMENT,
  `id_barangmasuk` int(100) DEFAULT NULL,
  `id_barangkeluar` int(11) NOT NULL,
  `id_proses` int(11) NOT NULL,
  `id_pegawai` int(11) NOT NULL,
  `id_rekanan` int(11) NOT NULL,
  `nomor` varchar(50) NOT NULL,
  `lap_hasil` varchar(255) NOT NULL DEFAULT '0',
  `id_workorder` int(11) NOT NULL,
  `id_workorder_barang` int(11) NOT NULL,
  `id_lokasi` int(11) NOT NULL DEFAULT '1',
  `tanggal` date NOT NULL,
  `id_jenis` int(11) NOT NULL,
  `id_akun_upah` int(11) NOT NULL DEFAULT '0',
  `status_bayar` int(11) NOT NULL DEFAULT '0',
  `akun_bayar` int(11) NOT NULL DEFAULT '0',
  `tanggal_bayar` date DEFAULT NULL,
  `jumlah_bayar` varchar(255) DEFAULT '0',
  `pajak` tinyint(2) NOT NULL DEFAULT '0',
  `id_akun_pajak` int(11) NOT NULL DEFAULT '402',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_upahproduksi`) USING BTREE,
  KEY `index_upah` (`id_upahproduksi`,`id_barangmasuk`,`id_barangkeluar`,`id_proses`,`id_pegawai`,`id_rekanan`,`id_workorder`,`id_workorder_barang`,`id_lokasi`,`id_akun_upah`,`akun_bayar`,`id_akun_pajak`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahproduksi: ~0 rows (lebih kurang)
DELETE FROM `pro_upahproduksi`;
/*!40000 ALTER TABLE `pro_upahproduksi` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahproduksi` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahproduksi2
CREATE TABLE IF NOT EXISTS `pro_upahproduksi2` (
  `id_upahproduksi` int(11) NOT NULL AUTO_INCREMENT,
  `id_barangkeluar` int(11) DEFAULT NULL,
  `id_proses` int(11) DEFAULT NULL,
  `id_rekanan` int(11) NOT NULL,
  `id_pegawai` int(11) NOT NULL,
  `nomor` varchar(50) NOT NULL,
  `id_workorder` int(11) NOT NULL,
  `id_workorder_barang` int(11) NOT NULL,
  `tanggal` date DEFAULT NULL,
  `hari_normal` varchar(50) NOT NULL,
  `absen` varchar(50) NOT NULL,
  `hari_kerja` varchar(50) NOT NULL,
  `jam_lembur` varchar(50) NOT NULL,
  `upah_hari` double NOT NULL DEFAULT '0',
  `upah_jam` double NOT NULL DEFAULT '0',
  `upah_total` double NOT NULL DEFAULT '0',
  `upah_lembur` double NOT NULL DEFAULT '0',
  `upah_makan` double NOT NULL DEFAULT '0',
  `potongan` double NOT NULL DEFAULT '0',
  `upah_diterima` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_upahproduksi`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahproduksi2: ~0 rows (lebih kurang)
DELETE FROM `pro_upahproduksi2`;
/*!40000 ALTER TABLE `pro_upahproduksi2` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahproduksi2` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahproduksi_barang
CREATE TABLE IF NOT EXISTS `pro_upahproduksi_barang` (
  `id_upahproduksi_barang` int(100) NOT NULL AUTO_INCREMENT,
  `id_upahproduksi` int(11) DEFAULT NULL,
  `id_perkiraan` int(11) DEFAULT NULL,
  `keterangan` varchar(100) NOT NULL,
  `satuan` char(50) NOT NULL,
  `satuan_waktu` int(11) NOT NULL,
  `upah` double NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_upahproduksi_barang`) USING BTREE,
  KEY `fk_idupahproduksi` (`id_upahproduksi`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahproduksi_barang: ~0 rows (lebih kurang)
DELETE FROM `pro_upahproduksi_barang`;
/*!40000 ALTER TABLE `pro_upahproduksi_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahproduksi_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahproduksi_harian
CREATE TABLE IF NOT EXISTS `pro_upahproduksi_harian` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `id_upahproduksi` int(11) DEFAULT NULL,
  `id_perkiraan` int(11) DEFAULT NULL,
  `keterangan` varchar(255) NOT NULL,
  `satuan` char(50) NOT NULL,
  `satuan_waktu` int(11) NOT NULL,
  `upah` varchar(255) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_idupahproduksi` (`id_upahproduksi`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahproduksi_harian: ~0 rows (lebih kurang)
DELETE FROM `pro_upahproduksi_harian`;
/*!40000 ALTER TABLE `pro_upahproduksi_harian` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahproduksi_harian` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahproduksi_harian_kemasan
CREATE TABLE IF NOT EXISTS `pro_upahproduksi_harian_kemasan` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `id_upah_kemasan` int(11) DEFAULT NULL,
  `id_perkiraan` int(11) DEFAULT NULL,
  `keterangan` varchar(255) NOT NULL,
  `satuan` char(50) NOT NULL,
  `satuan_waktu` int(11) NOT NULL,
  `upah` varchar(255) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_idupahproduksi` (`id_upah_kemasan`) USING BTREE,
  CONSTRAINT `fk_id_upahkemasan3` FOREIGN KEY (`id_upah_kemasan`) REFERENCES `pro_upahproduksi_kemasan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahproduksi_harian_kemasan: ~0 rows (lebih kurang)
DELETE FROM `pro_upahproduksi_harian_kemasan`;
/*!40000 ALTER TABLE `pro_upahproduksi_harian_kemasan` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahproduksi_harian_kemasan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahproduksi_kemasan
CREATE TABLE IF NOT EXISTS `pro_upahproduksi_kemasan` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `id_barangmasuk_kemasan` int(100) DEFAULT NULL,
  `id_barangkeluar_kemasan` int(11) NOT NULL,
  `id_proses` int(11) NOT NULL,
  `id_pegawai` int(11) NOT NULL,
  `id_rekanan` int(11) NOT NULL,
  `nomor` varchar(50) NOT NULL,
  `lap_hasil` varchar(255) NOT NULL DEFAULT '0',
  `id_lokasi` int(11) NOT NULL DEFAULT '1',
  `tanggal` date NOT NULL,
  `id_jenis` int(11) NOT NULL,
  `id_akun_upah` int(11) NOT NULL DEFAULT '0',
  `status_bayar` int(11) NOT NULL DEFAULT '0',
  `akun_bayar` int(11) NOT NULL DEFAULT '0',
  `tanggal_bayar` date DEFAULT NULL,
  `jumlah_bayar` varchar(255) DEFAULT '0',
  `pajak` tinyint(2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahproduksi_kemasan: ~0 rows (lebih kurang)
DELETE FROM `pro_upahproduksi_kemasan`;
/*!40000 ALTER TABLE `pro_upahproduksi_kemasan` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahproduksi_kemasan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahproduksi_lainnya
CREATE TABLE IF NOT EXISTS `pro_upahproduksi_lainnya` (
  `id_upahproduksi_lainnya` int(11) NOT NULL AUTO_INCREMENT,
  `id_pegawai` int(11) NOT NULL DEFAULT '0',
  `id_rekanan` int(11) NOT NULL DEFAULT '0',
  `id_lokasi` int(11) NOT NULL DEFAULT '0',
  `id_proses` int(11) NOT NULL DEFAULT '0',
  `tanggal_upah` date NOT NULL,
  `tanggal_hasil` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `nomor` varchar(50) NOT NULL DEFAULT '',
  `id_akun_upah` int(11) NOT NULL DEFAULT '0',
  `id_akun_bayar` int(11) NOT NULL DEFAULT '0',
  `status_bayar` int(11) NOT NULL DEFAULT '0',
  `tanggal_bayar` date NOT NULL DEFAULT '0000-00-00',
  `jenis` char(2) NOT NULL DEFAULT '0' COMMENT '0 -> Lainnya dengan laporan hasil, 1 -> Tanpa laporan hasil',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_upahproduksi_lainnya`),
  KEY `index_upahlain` (`id_upahproduksi_lainnya`,`id_pegawai`,`id_rekanan`,`id_lokasi`,`id_proses`,`id_akun_upah`,`id_akun_bayar`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahproduksi_lainnya: ~0 rows (lebih kurang)
DELETE FROM `pro_upahproduksi_lainnya`;
/*!40000 ALTER TABLE `pro_upahproduksi_lainnya` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahproduksi_lainnya` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahproduksi_lainnya_barang
CREATE TABLE IF NOT EXISTS `pro_upahproduksi_lainnya_barang` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_upahproduksi_lainnya` int(11) NOT NULL DEFAULT '0',
  `keterangan` varchar(100) NOT NULL DEFAULT '0',
  `id_upah` int(11) NOT NULL DEFAULT '0',
  `jumlah` int(11) NOT NULL DEFAULT '0',
  `upah` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `index_upahlain_brg` (`id`,`id_upahproduksi_lainnya`,`id_upah`,`id_satuan`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahproduksi_lainnya_barang: ~0 rows (lebih kurang)
DELETE FROM `pro_upahproduksi_lainnya_barang`;
/*!40000 ALTER TABLE `pro_upahproduksi_lainnya_barang` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahproduksi_lainnya_barang` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahproduksi_lainnya_lainlain
CREATE TABLE IF NOT EXISTS `pro_upahproduksi_lainnya_lainlain` (
  `id_` int(11) NOT NULL AUTO_INCREMENT,
  `id_upahproduksi_lainnya` int(11) NOT NULL,
  `id_akun` int(11) NOT NULL DEFAULT '0' COMMENT 'id_akun sementara tidak terpakai',
  `keterangan` varchar(50) NOT NULL,
  `tipe` enum('D','K') NOT NULL,
  `jenis_transaksi` enum('TAMBAHAN','KASBON') NOT NULL DEFAULT 'TAMBAHAN' COMMENT '''KASBON'' digunakan untuk bayar cicilan kasbon yg dipotongkan upah',
  `jumlah` varchar(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_`),
  KEY `index_upahlain_lain` (`id_`,`id_upahproduksi_lainnya`,`id_akun`,`tipe`,`jenis_transaksi`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahproduksi_lainnya_lainlain: ~0 rows (lebih kurang)
DELETE FROM `pro_upahproduksi_lainnya_lainlain`;
/*!40000 ALTER TABLE `pro_upahproduksi_lainnya_lainlain` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahproduksi_lainnya_lainlain` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahtenun
CREATE TABLE IF NOT EXISTS `pro_upahtenun` (
  `id_upahtenun` int(11) NOT NULL AUTO_INCREMENT,
  `id_rekanan` int(11) NOT NULL,
  `tanggal_upah` date NOT NULL,
  `nomor` varchar(10) NOT NULL,
  `id_akun_upah` int(11) NOT NULL,
  `id_akun_bayar` int(11) NOT NULL DEFAULT '0',
  `tanggal_bayar` date DEFAULT NULL,
  `status_bayar` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0 : Belum Bayar | 1 : Sudah Bayar',
  PRIMARY KEY (`id_upahtenun`),
  KEY `index_upahtenun` (`id_upahtenun`,`id_rekanan`,`id_akun_upah`,`id_akun_bayar`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahtenun: ~0 rows (lebih kurang)
DELETE FROM `pro_upahtenun`;
/*!40000 ALTER TABLE `pro_upahtenun` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahtenun` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahtenun_detail
CREATE TABLE IF NOT EXISTS `pro_upahtenun_detail` (
  `id_upahtenun_detail` int(11) NOT NULL AUTO_INCREMENT,
  `id_upahtenun` int(11) NOT NULL,
  `id_barangmasuk` int(11) NOT NULL,
  `id_barangmasuk_barang` int(11) NOT NULL,
  `id_barangkeluar` int(11) NOT NULL,
  `id_proses` int(11) NOT NULL,
  `keterangan` varchar(50) NOT NULL,
  `jumlah` varchar(50) NOT NULL DEFAULT '0',
  `upah_petenun` varchar(20) NOT NULL,
  `upah_makelar` varchar(20) NOT NULL,
  `upah_baik` varchar(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_upahtenun_detail`),
  KEY `index_upahtenun_detail` (`id_upahtenun_detail`,`id_upahtenun`,`id_barangmasuk`,`id_barangmasuk_barang`,`id_barangkeluar`,`id_proses`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahtenun_detail: ~0 rows (lebih kurang)
DELETE FROM `pro_upahtenun_detail`;
/*!40000 ALTER TABLE `pro_upahtenun_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahtenun_detail` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahtenun_lainlain
CREATE TABLE IF NOT EXISTS `pro_upahtenun_lainlain` (
  `id_upahtenun_lainlain` int(11) NOT NULL AUTO_INCREMENT,
  `id_upahtenun` int(11) NOT NULL,
  `id_akun` int(11) NOT NULL,
  `keterangan` varchar(50) NOT NULL,
  `tipe` enum('D','K') NOT NULL,
  `jumlah` varchar(20) NOT NULL,
  `jenis` char(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_upahtenun_lainlain`),
  KEY `index_upahtenun_lain` (`id_upahtenun_lainlain`,`id_upahtenun`,`id_akun`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahtenun_lainlain: ~0 rows (lebih kurang)
DELETE FROM `pro_upahtenun_lainlain`;
/*!40000 ALTER TABLE `pro_upahtenun_lainlain` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahtenun_lainlain` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upahtenun_pick
CREATE TABLE IF NOT EXISTS `pro_upahtenun_pick` (
  `id_upahtenun_pick` int(11) NOT NULL AUTO_INCREMENT,
  `id_upahtenun` int(11) NOT NULL,
  `id_barangmasuk_barang` int(11) NOT NULL,
  `keterangan` varchar(50) NOT NULL,
  `tipe_akun` enum('D','K') NOT NULL,
  `pick` int(5) NOT NULL,
  `jumlah` int(4) NOT NULL,
  `upah_pick` varchar(20) NOT NULL,
  PRIMARY KEY (`id_upahtenun_pick`),
  KEY `index_upahtenun_pick` (`id_upahtenun`,`id_barangmasuk_barang`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upahtenun_pick: ~0 rows (lebih kurang)
DELETE FROM `pro_upahtenun_pick`;
/*!40000 ALTER TABLE `pro_upahtenun_pick` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upahtenun_pick` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upah_borongan_lain_lain
CREATE TABLE IF NOT EXISTS `pro_upah_borongan_lain_lain` (
  `id_upah` int(11) NOT NULL AUTO_INCREMENT,
  `id_upah_borongan` int(11) NOT NULL,
  `id_akun_upah_lain` int(11) NOT NULL DEFAULT '0',
  `jenis` varchar(255) NOT NULL,
  `jumlah` int(11) NOT NULL,
  `jenis_transaksi` enum('TAMBAHAN','KASBON') NOT NULL DEFAULT 'TAMBAHAN' COMMENT '''KASBON'' untuk cicilan bayar kasbon melalui potongan upah',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_upah`) USING BTREE,
  KEY `index_upahborongan_lain` (`id_upah_borongan`,`id_akun_upah_lain`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upah_borongan_lain_lain: ~0 rows (lebih kurang)
DELETE FROM `pro_upah_borongan_lain_lain`;
/*!40000 ALTER TABLE `pro_upah_borongan_lain_lain` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upah_borongan_lain_lain` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upah_harian
CREATE TABLE IF NOT EXISTS `pro_upah_harian` (
  `id_upah_harian` int(11) NOT NULL AUTO_INCREMENT,
  `no_transaksi` varchar(255) NOT NULL,
  `tanggal_transaksi` date NOT NULL,
  `id_akun` int(11) NOT NULL,
  `tipe_id_akun` varchar(5) NOT NULL DEFAULT 'K',
  `id_akun_piutang` int(11) NOT NULL DEFAULT '22',
  `tipe_akun_piutang` varchar(5) NOT NULL DEFAULT 'D',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_upah_harian`),
  KEY `index_upahharian` (`id_upah_harian`,`id_akun`,`id_akun_piutang`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upah_harian: ~0 rows (lebih kurang)
DELETE FROM `pro_upah_harian`;
/*!40000 ALTER TABLE `pro_upah_harian` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upah_harian` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upah_harian1
CREATE TABLE IF NOT EXISTS `pro_upah_harian1` (
  `id_transaksi` int(10) NOT NULL AUTO_INCREMENT,
  `no_transaksi` varchar(255) NOT NULL,
  `tanggal_transaksi` date NOT NULL,
  `bulan_gaji` int(2) NOT NULL,
  `tahun_gaji` int(11) NOT NULL DEFAULT '2018',
  `id_akun` int(12) NOT NULL,
  `tipe_id_akun` varchar(255) NOT NULL DEFAULT 'K',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id_transaksi`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upah_harian1: ~0 rows (lebih kurang)
DELETE FROM `pro_upah_harian1`;
/*!40000 ALTER TABLE `pro_upah_harian1` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upah_harian1` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upah_harian_akun
CREATE TABLE IF NOT EXISTS `pro_upah_harian_akun` (
  `id_upah_harian_akun` int(11) NOT NULL AUTO_INCREMENT,
  `id_upah_harian` int(11) NOT NULL,
  `id_akun_upah_perhari` int(11) NOT NULL,
  `tipe_akun_upah_perhari` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_upah_lembur_jam` int(11) NOT NULL,
  `tipe_akun_upah_lembur_jam` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_upah_lembur_hari` int(11) NOT NULL,
  `tipe_akun_upah_lembur_hari` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_uang_makan_lembur_jam` int(11) NOT NULL,
  `tipe_akun_uang_makan_lembur_jam` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_uang_makan_lembur_hari` int(11) NOT NULL,
  `tipe_akun_uang_makan_lembur_hari` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_uang_makan_desa` int(11) NOT NULL,
  `tipe_akun_uang_makan_desa` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_uang_makan_kediri` int(11) NOT NULL,
  `tipe_akun_uang_makan_kediri` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_potongan_keterlambatan` int(11) NOT NULL,
  `tipe_akun_potongan_keterlambatan` enum('D','K') NOT NULL DEFAULT 'K',
  `id_akun_potongan_kas_bon` int(11) NOT NULL,
  `tipe_akun_potongan_kas_bon` enum('D','K') NOT NULL DEFAULT 'K',
  `id_akun_pembulatan` int(11) NOT NULL,
  `tipe_akun_pembulatan` enum('D','K') NOT NULL DEFAULT 'K',
  PRIMARY KEY (`id_upah_harian_akun`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upah_harian_akun: ~0 rows (lebih kurang)
DELETE FROM `pro_upah_harian_akun`;
/*!40000 ALTER TABLE `pro_upah_harian_akun` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upah_harian_akun` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upah_harian_akun1
CREATE TABLE IF NOT EXISTS `pro_upah_harian_akun1` (
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `id_pro_upah` int(12) NOT NULL,
  `id_akun_gaji_pokok` int(12) NOT NULL,
  `tipe_akun_gaji_pokok` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_tunjangan` int(12) NOT NULL,
  `tipe_akun_tunjangan` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_lembur_hari` int(12) NOT NULL,
  `tipe_akun_lembur_hari` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_lembur_jam` int(12) NOT NULL,
  `tipe_akun_lembur_jam` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_premi` int(12) NOT NULL,
  `tipe_akun_premi` enum('D','K') NOT NULL DEFAULT 'D',
  `id_akun_potongan` int(12) NOT NULL,
  `tipe_akun_potongan` enum('D','K') NOT NULL DEFAULT 'K',
  `id_akun_pembulatan` int(12) NOT NULL,
  `tipe_akun_pembulatan` enum('D','K') NOT NULL DEFAULT 'K',
  `total_pembulatan` varchar(20) NOT NULL,
  `total_akhir` varchar(20) NOT NULL,
  `keterangan` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upah_harian_akun1: ~0 rows (lebih kurang)
DELETE FROM `pro_upah_harian_akun1`;
/*!40000 ALTER TABLE `pro_upah_harian_akun1` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upah_harian_akun1` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upah_harian_detail
CREATE TABLE IF NOT EXISTS `pro_upah_harian_detail` (
  `id_upah_harian_detail` int(11) NOT NULL AUTO_INCREMENT,
  `id_upah_harian` int(11) NOT NULL,
  `id_pegawai` int(11) NOT NULL,
  `lokasi` int(11) NOT NULL,
  `hari_normal` varchar(5) NOT NULL,
  `absen_hari` varchar(5) NOT NULL,
  `hari_kerja` varchar(5) NOT NULL,
  `upah_perhari` varchar(20) NOT NULL,
  `jumlah_jam_lembur` varchar(5) NOT NULL,
  `upah_lembur_jam` varchar(20) NOT NULL,
  `jumlah_hari_lembur` varchar(5) NOT NULL,
  `upah_lembur_hari` varchar(20) NOT NULL,
  `jumlah_jam_um_lembur` varchar(5) NOT NULL,
  `um_lembur_jam` varchar(20) NOT NULL,
  `jumlah_hari_um_lembur` varchar(5) NOT NULL,
  `um_lembur_hari` varchar(20) NOT NULL,
  `jumlah_hari_um_desa` varchar(5) NOT NULL,
  `um_desa` varchar(20) NOT NULL,
  `jumlah_hari_um_kediri` varchar(5) NOT NULL,
  `um_kediri` varchar(20) NOT NULL,
  `jumlah_jam_keterlambatan` varchar(5) NOT NULL,
  `potongan_keterlambatan` varchar(20) NOT NULL,
  `potongan_kas_bon` varchar(20) NOT NULL,
  `pembulatan` varchar(20) NOT NULL,
  `upah_terima` varchar(20) NOT NULL,
  PRIMARY KEY (`id_upah_harian_detail`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upah_harian_detail: ~0 rows (lebih kurang)
DELETE FROM `pro_upah_harian_detail`;
/*!40000 ALTER TABLE `pro_upah_harian_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upah_harian_detail` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upah_harian_detail1
CREATE TABLE IF NOT EXISTS `pro_upah_harian_detail1` (
  `id` int(12) unsigned NOT NULL AUTO_INCREMENT,
  `id_pro_upah` int(12) NOT NULL,
  `id_akun` int(12) NOT NULL DEFAULT '152',
  `nomor_pegawai` varchar(10) NOT NULL,
  `jenis_pegawai` int(10) NOT NULL DEFAULT '0',
  `gaji_per_hari` varchar(20) NOT NULL,
  `tunjangan_jabatan` varchar(20) NOT NULL DEFAULT '0',
  `gaji_jam` varchar(20) NOT NULL,
  `hari_kerja` varchar(20) NOT NULL,
  `gaji_pokok` varchar(20) NOT NULL,
  `hari_lembur` varchar(5) NOT NULL DEFAULT '0',
  `gaji_lembur_hari_libur` varchar(20) NOT NULL DEFAULT '0',
  `jam_lembur` varchar(20) NOT NULL DEFAULT '0',
  `gaji_lembur` varchar(20) NOT NULL DEFAULT '0',
  `total_gaji_lembur` varchar(20) NOT NULL DEFAULT '0',
  `total_gaji` varchar(20) NOT NULL DEFAULT '0',
  `premi_bonus` varchar(20) NOT NULL DEFAULT '0',
  `potongan` varchar(20) NOT NULL DEFAULT '0',
  `gaji_bersih` varchar(20) NOT NULL,
  `lokasi` int(2) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(1) NOT NULL DEFAULT 'D',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upah_harian_detail1: ~0 rows (lebih kurang)
DELETE FROM `pro_upah_harian_detail1`;
/*!40000 ALTER TABLE `pro_upah_harian_detail1` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upah_harian_detail1` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upah_kemasan_lain_lain
CREATE TABLE IF NOT EXISTS `pro_upah_kemasan_lain_lain` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_upah_kemasan` int(11) NOT NULL,
  `id_akun_upah_lain` int(11) NOT NULL DEFAULT '0',
  `jenis` varchar(255) NOT NULL,
  `jumlah` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_id_upahkemasan2` (`id_upah_kemasan`),
  CONSTRAINT `fk_id_upahkemasan2` FOREIGN KEY (`id_upah_kemasan`) REFERENCES `pro_upahproduksi_kemasan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upah_kemasan_lain_lain: ~0 rows (lebih kurang)
DELETE FROM `pro_upah_kemasan_lain_lain`;
/*!40000 ALTER TABLE `pro_upah_kemasan_lain_lain` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upah_kemasan_lain_lain` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upah_total
CREATE TABLE IF NOT EXISTS `pro_upah_total` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `id_upah_borongan` int(10) NOT NULL,
  `id_pbb` int(100) NOT NULL,
  `id_proses` int(10) NOT NULL,
  `id_motif` int(10) NOT NULL,
  `id_motif_barang` int(10) NOT NULL,
  `id_barang` int(10) NOT NULL,
  `id_gudang` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `id_komposisi` int(11) NOT NULL DEFAULT '0',
  `id_kualitas` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_dudul` int(11) NOT NULL DEFAULT '0',
  `id_label` int(11) NOT NULL DEFAULT '0',
  `id_cap` int(11) NOT NULL DEFAULT '0',
  `id_kemasan` int(11) NOT NULL DEFAULT '0',
  `id_kemasansatuan` int(11) NOT NULL DEFAULT '0',
  `id_kemasansepuluh` int(11) NOT NULL DEFAULT '0',
  `id_kemasanseratus` int(11) NOT NULL DEFAULT '0',
  `id_plat` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_proses` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_periksa` int(11) NOT NULL DEFAULT '0',
  `jumlah_barang` int(10) NOT NULL,
  `upah_satuan` int(10) NOT NULL,
  `upah_satuan_2` varchar(255) NOT NULL DEFAULT '0',
  `potongan_upah_kualitas` varchar(255) NOT NULL DEFAULT '0',
  `upah_pick` varchar(255) NOT NULL DEFAULT '0',
  `upah_total` int(10) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upah_total: ~0 rows (lebih kurang)
DELETE FROM `pro_upah_total`;
/*!40000 ALTER TABLE `pro_upah_total` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upah_total` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.pro_upah_total_kemasan
CREATE TABLE IF NOT EXISTS `pro_upah_total_kemasan` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `id_upah_kemasan` int(11) NOT NULL,
  `id_barangmasuk_kb` int(11) NOT NULL,
  `id_workorder` int(11) NOT NULL,
  `id_workorder_barang` int(11) NOT NULL,
  `id_proses` int(11) NOT NULL,
  `id_motif` int(11) NOT NULL,
  `id_motif_barang` int(11) NOT NULL,
  `id_barang` int(11) NOT NULL,
  `id_gudang` int(11) NOT NULL DEFAULT '0',
  `id_satuan` int(11) NOT NULL DEFAULT '0',
  `id_komposisi` int(11) NOT NULL DEFAULT '0',
  `id_kualitas` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_dudul` int(11) NOT NULL DEFAULT '0',
  `id_label` int(11) NOT NULL DEFAULT '0',
  `id_cap` int(11) NOT NULL DEFAULT '0',
  `id_kemasan` int(11) NOT NULL DEFAULT '0',
  `id_kemasansatuan` int(11) NOT NULL DEFAULT '0',
  `id_kemasansepuluh` int(11) NOT NULL DEFAULT '0',
  `id_kemasanseratus` int(11) NOT NULL DEFAULT '0',
  `id_plat` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_proses` int(11) NOT NULL DEFAULT '0',
  `id_kualitas_periksa` int(11) NOT NULL DEFAULT '0',
  `jumlah_barang` varchar(255) NOT NULL,
  `jenis_kegiatan` varchar(500) DEFAULT '-',
  `upah_satuan` varchar(255) NOT NULL,
  `upah_total` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_id_upahkemasan1` (`id_upah_kemasan`),
  CONSTRAINT `fk_id_upahkemasan1` FOREIGN KEY (`id_upah_kemasan`) REFERENCES `pro_upahproduksi_kemasan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.pro_upah_total_kemasan: ~0 rows (lebih kurang)
DELETE FROM `pro_upah_total_kemasan`;
/*!40000 ALTER TABLE `pro_upah_total_kemasan` DISABLE KEYS */;
/*!40000 ALTER TABLE `pro_upah_total_kemasan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.retur_tagihan_penjualan
CREATE TABLE IF NOT EXISTS `retur_tagihan_penjualan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL,
  `user_id_create` int(11) NOT NULL,
  `user_id_update` int(11) NOT NULL,
  `cv` int(11) NOT NULL,
  `no_retur` varchar(100) NOT NULL,
  `sufix_no_retur` varchar(100) NOT NULL,
  `tanggal` date NOT NULL,
  `tanggal_retur` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `id_pelanggan` int(11) NOT NULL,
  `id_penjualan` int(11) NOT NULL,
  `mata_uang` int(11) NOT NULL,
  `kurs` varchar(100) NOT NULL,
  `nominal_retur` varchar(100) NOT NULL,
  `id_akun` int(11) NOT NULL,
  `tipe_id_akun` enum('D','K') NOT NULL DEFAULT 'K',
  `keterangan` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.retur_tagihan_penjualan: ~0 rows (lebih kurang)
DELETE FROM `retur_tagihan_penjualan`;
/*!40000 ALTER TABLE `retur_tagihan_penjualan` DISABLE KEYS */;
/*!40000 ALTER TABLE `retur_tagihan_penjualan` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.retur_tagihan_piutangawal
CREATE TABLE IF NOT EXISTS `retur_tagihan_piutangawal` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL,
  `user_id_create` int(11) NOT NULL,
  `user_id_update` int(11) NOT NULL,
  `cv` int(11) NOT NULL,
  `no_retur` varchar(100) NOT NULL,
  `sufix_no_retur` varchar(100) NOT NULL,
  `tanggal` date NOT NULL,
  `tanggal_retur` date NOT NULL,
  `tanggal_full` datetime NOT NULL,
  `id_pelanggan` int(11) NOT NULL,
  `id_piutangawal` int(11) NOT NULL,
  `mata_uang` int(11) NOT NULL,
  `kurs` varchar(100) NOT NULL,
  `nominal_retur` varchar(100) NOT NULL,
  `id_akun` int(11) NOT NULL,
  `tipe_id_akun` enum('D','K') NOT NULL DEFAULT 'K',
  `keterangan` text,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.retur_tagihan_piutangawal: ~0 rows (lebih kurang)
DELETE FROM `retur_tagihan_piutangawal`;
/*!40000 ALTER TABLE `retur_tagihan_piutangawal` DISABLE KEYS */;
/*!40000 ALTER TABLE `retur_tagihan_piutangawal` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.serv_orderservice
CREATE TABLE IF NOT EXISTS `serv_orderservice` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `lokasi` int(11) NOT NULL DEFAULT '1',
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `cv` int(11) NOT NULL DEFAULT '1',
  `no_nota` varchar(100) NOT NULL,
  `sufix_no_nota` varchar(255) DEFAULT NULL,
  `tanggal` date NOT NULL,
  `tanggal_nota` date NOT NULL,
  `id_penyedia` int(100) NOT NULL,
  `no_faktur_pajak` varchar(255) NOT NULL DEFAULT '-',
  `keterangan` text NOT NULL,
  `syarat_bayar` text,
  `penerima` varchar(255) NOT NULL DEFAULT 'Owner',
  `id_akun_hutang` int(11) DEFAULT '301' COMMENT 'ms_ref_jurnal => kode',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.serv_orderservice: ~0 rows (lebih kurang)
DELETE FROM `serv_orderservice`;
/*!40000 ALTER TABLE `serv_orderservice` DISABLE KEYS */;
/*!40000 ALTER TABLE `serv_orderservice` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.serv_orderservice_bayar
CREATE TABLE IF NOT EXISTS `serv_orderservice_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_transaksi_bayar` int(11) NOT NULL,
  `id_orderservice` int(11) NOT NULL DEFAULT '0',
  `id_akun` int(11) DEFAULT NULL,
  `tgl_bayar` date NOT NULL,
  `jum_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tipe_id_akun` varchar(255) DEFAULT 'K',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_orderservice` (`id_orderservice`) USING BTREE,
  KEY `fk_transaksi_bayar` (`id_transaksi_bayar`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.serv_orderservice_bayar: ~0 rows (lebih kurang)
DELETE FROM `serv_orderservice_bayar`;
/*!40000 ALTER TABLE `serv_orderservice_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `serv_orderservice_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.serv_orderservice_detail
CREATE TABLE IF NOT EXISTS `serv_orderservice_detail` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `id_nota` int(100) NOT NULL,
  `id_akun` int(100) NOT NULL,
  `deskripsi` varchar(255) NOT NULL,
  `jumlah` varchar(50) NOT NULL DEFAULT '0',
  `harga_satuan` varchar(255) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_id_nota` (`id_nota`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.serv_orderservice_detail: ~0 rows (lebih kurang)
DELETE FROM `serv_orderservice_detail`;
/*!40000 ALTER TABLE `serv_orderservice_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `serv_orderservice_detail` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.serv_orderservice_pajak
CREATE TABLE IF NOT EXISTS `serv_orderservice_pajak` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `id_nota` int(100) NOT NULL,
  `id_akun` int(100) NOT NULL,
  `nominal` varchar(255) NOT NULL DEFAULT '0',
  `pemotongan` int(11) NOT NULL DEFAULT '0',
  `id_akun_pajak` varchar(255) NOT NULL DEFAULT '302',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_id_nota` (`id_nota`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.serv_orderservice_pajak: ~0 rows (lebih kurang)
DELETE FROM `serv_orderservice_pajak`;
/*!40000 ALTER TABLE `serv_orderservice_pajak` DISABLE KEYS */;
/*!40000 ALTER TABLE `serv_orderservice_pajak` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.serv_orderservice_transaksi_bayar
CREATE TABLE IF NOT EXISTS `serv_orderservice_transaksi_bayar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id_create` int(11) NOT NULL DEFAULT '1',
  `user_id_update` int(11) NOT NULL DEFAULT '1',
  `no_transaksi_bayar` varchar(255) NOT NULL DEFAULT '0',
  `tanggal_bayar` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.serv_orderservice_transaksi_bayar: ~0 rows (lebih kurang)
DELETE FROM `serv_orderservice_transaksi_bayar`;
/*!40000 ALTER TABLE `serv_orderservice_transaksi_bayar` DISABLE KEYS */;
/*!40000 ALTER TABLE `serv_orderservice_transaksi_bayar` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.tb_group
CREATE TABLE IF NOT EXISTS `tb_group` (
  `kode_group` int(5) NOT NULL AUTO_INCREMENT,
  `nama_group` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`kode_group`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.tb_group: ~19 rows (lebih kurang)
DELETE FROM `tb_group`;
/*!40000 ALTER TABLE `tb_group` DISABLE KEYS */;
INSERT INTO `tb_group` (`kode_group`, `nama_group`, `created_at`, `updated_at`) VALUES
	(1, 'Pembelian', '2019-05-07 15:25:01', '2019-05-07 15:25:01'),
	(3, 'Super Admin', '2019-05-07 15:25:01', '2019-05-07 15:25:01'),
	(4, 'Produksi Gresik', '2019-10-15 12:01:06', '2019-10-15 12:01:06'),
	(5, 'Keuangan', '2019-05-07 15:25:01', '2019-05-07 15:25:01'),
	(6, 'Penjualan', '2019-05-07 15:25:01', '2019-05-07 15:25:01'),
	(7, 'Order_Penjualan', '2019-06-26 16:02:50', '2019-06-26 16:02:50'),
	(8, 'Keuangan_Transaksi', '2019-06-26 16:02:50', '2019-06-26 16:02:50'),
	(9, 'Keuangan_Kasir', '2019-06-26 16:02:50', '2019-06-26 16:02:50'),
	(10, 'Pembelian dan Penerimaan Segoro Madu', '2019-07-02 10:47:27', '2019-07-02 10:47:27'),
	(11, 'Penerimaan dan Produksi Sarung ATBM Gresik', '2019-07-03 09:35:04', '2019-07-03 09:35:04'),
	(12, 'Developer', '2019-07-16 09:54:50', '2019-07-16 09:54:50'),
	(13, 'Produksi Baku Gresik', '2019-10-15 11:51:48', '2019-10-15 11:51:48'),
	(14, 'Produksi Baku ATM', '2019-12-30 10:05:26', '2019-12-30 10:05:26'),
	(15, 'Produksi ATM', '2019-12-30 10:05:36', '2019-12-30 10:05:36'),
	(16, 'Penerimaan dan Produksi Sarung ATM', '2019-12-30 10:05:45', '2019-12-30 10:05:45'),
	(17, 'Gudang Sarung', '2020-03-23 08:45:49', '2020-03-23 08:45:49'),
	(18, 'Produksi ATM Segoro Madu', '2020-10-12 13:04:18', '2020-10-12 13:04:18'),
	(19, 'Admin', '2020-12-24 10:06:57', '2020-12-24 10:06:57'),
	(20, 'Admin Cat', '2021-01-01 09:18:16', '2021-01-01 09:18:16');
/*!40000 ALTER TABLE `tb_group` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.tb_menu
CREATE TABLE IF NOT EXISTS `tb_menu` (
  `kode_menu` int(11) NOT NULL AUTO_INCREMENT,
  `nama_menu` varchar(50) DEFAULT NULL,
  `link_menu` varchar(50) DEFAULT NULL,
  `parent_menu` int(11) DEFAULT NULL,
  `sort_menu` int(11) DEFAULT NULL,
  `icon_menu` varchar(20) DEFAULT NULL,
  `active` char(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`kode_menu`)
) ENGINE=InnoDB AUTO_INCREMENT=131 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.tb_menu: ~128 rows (lebih kurang)
DELETE FROM `tb_menu`;
/*!40000 ALTER TABLE `tb_menu` DISABLE KEYS */;
INSERT INTO `tb_menu` (`kode_menu`, `nama_menu`, `link_menu`, `parent_menu`, `sort_menu`, `icon_menu`, `active`, `created_at`, `updated_at`) VALUES
	(1, 'Dashboard', '/', 0, 1, 'icon-home4', '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(2, 'Master', '#', 0, 2, 'icon-server', '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(3, 'Service', '#', 0, 3, 'fa fa-wrench', '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(4, 'Pembelian', '#', 0, 4, 'icon-arrow-right16', '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(5, 'Inventori', '#', 0, 5, 'icon-stack2', '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(6, 'Penjualan', '#', 0, 6, 'icon-arrow-left16', '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(7, 'Produksi', '#', 0, 7, 'icon-hammer', '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(8, 'Produksi (ATM)', '#', 0, 8, 'icon-hammer-wrench', '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(9, 'Keuangan', '#', 0, 9, 'icon-calculator2', '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(10, 'Laporan', 'laporan', 0, 10, 'icon-printer', '1', '2019-06-18 08:59:08', '2019-06-18 08:59:08'),
	(11, 'Barang', '#', 2, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(12, 'Kelompok', 'kelompok', 11, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(13, 'Kategori', 'kategori', 11, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(14, 'Satuan', 'satuan', 11, 3, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(15, 'Barang', 'barang', 11, 4, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(16, 'Warna', '#', 11, 5, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(17, 'Warna', 'warna', 16, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(18, 'Komposisi Warna', 'komposisi', 16, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(19, 'Konversi Satuan', 'konversi', 11, 6, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(20, 'Akuntansi', '#', 2, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(21, 'Perkiraan', 'perkiraan', 20, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(22, 'Pelanggan', 'pelanggan', 2, 3, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(23, 'Penyedia', 'penyedia', 2, 4, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(24, 'Rekanan', 'rekanan', 2, 5, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(25, 'Produksi', '#', 2, 6, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(26, 'Lokasi Produksi', 'lokasi_produksi', 25, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(27, 'Proses Produksi', 'proses', 25, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(28, 'Upah', '#', 25, 3, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(29, 'Borongan', 'upah_borongan', 28, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(30, 'Tenun', 'upahtenun', 25, 3, '', '1', '2019-10-07 15:56:09', '2019-10-07 15:56:09'),
	(31, 'Karyawan', 'upah_karyawan', 28, 3, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(32, 'Motif', 'motif', 25, 4, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(33, 'Mesin', 'mesin', 25, 5, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(34, 'Perubahan Satuan', 'perubahansatuan', 25, 6, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(35, 'Shift', 'shift', 25, 7, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(36, 'Penyerahan Pembelian', 'tempat_penyerahan', 2, 7, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(37, 'Gudang', 'gudang', 2, 8, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(38, 'Pegawai', '#', 2, 9, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(39, 'Departement', 'departement', 38, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(40, 'Pegawai', 'pegawai', 38, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(41, 'Mata Uang', 'matauang', 2, 10, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(42, 'Konversi Mata Uang', 'konversimatauang', 2, 11, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(43, 'Order Service', 'order_service', 3, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(44, 'Laporan', 'order_service/laporan', 3, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(45, 'Order Pembelian', 'orderbeli', 4, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(46, 'Pembelian', 'pembelian', 4, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(47, 'Hutang Awal', 'hutang_awal', 4, 3, '', '1', '2019-07-24 19:39:36', '2019-07-24 19:39:36'),
	(48, 'Laporan', '#', 4, 4, '', '1', '2019-09-06 13:58:36', '2019-09-06 13:58:36'),
	(49, 'Order Pembelian', 'laporan_orderbeli', 48, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(50, 'Pembelian', 'laporan_pembelian', 48, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(51, 'Penerimaan Barang Produksi', 'penerimaan', 5, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(52, 'Penerimaan Barang Non Produksi', 'penerimaan_nonproduksi', 5, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(53, 'Pemberian Nomor Order', 'rubah_spk', 5, 3, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(54, 'Transfer Barang Antar Gudang', 'transfergudang', 5, 4, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(55, 'Persediaan', '#', 5, 5, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(56, 'Persediaan Gudang', 'persediaan', 55, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(57, 'Persediaan dalam Proses', 'persediaan/rekanan', 55, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(58, 'Stock Opname', 'opname', 5, 6, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(59, 'Approval', '#', 5, 8, NULL, '1', '2019-12-27 10:10:35', '2019-12-27 10:10:35'),
	(60, 'Proses Mixing', 'persetujuankeluar', 59, 1, '', '1', '2021-01-01 09:59:56', '2021-01-01 09:59:56'),
	(61, 'Hasil Mixing', 'persetujuanmasuk', 59, 2, '', '1', '2021-01-01 10:01:01', '2021-01-01 10:01:01'),
	(62, 'Transfer Barang Keluar', 'persetujuangudang', 59, 4, NULL, '1', '2019-06-20 09:43:30', '2019-06-20 09:43:30'),
	(63, 'Transfer Barang Masuk', 'persetujuangudang_masuk', 59, 5, NULL, '1', '2019-06-20 09:43:30', '2019-06-20 09:43:30'),
	(64, 'Laporan', '#', 5, 9, NULL, '1', '2019-12-27 10:10:37', '2019-12-27 10:10:37'),
	(65, 'Persediaan Gudang', 'laporan_inventori', 64, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(66, 'Monitoring', '#', 5, 10, NULL, '1', '2019-12-27 10:10:42', '2019-12-27 10:10:42'),
	(67, 'Persediaan', 'monitoring', 66, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(68, 'Proses', 'prosesmonitoring', 66, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(69, 'Saldo Awal Barang', 'saldoawal_barang', 5, 11, NULL, '1', '2019-12-27 10:10:44', '2019-12-27 10:10:44'),
	(70, 'Surat Jalan', 'surat_jalan', 6, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(71, 'Penjualan', 'penjualan', 6, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(72, 'Piutang Awal', 'piutangawal', 9, 8, '', '1', '2020-02-28 10:08:55', '2020-02-28 10:08:55'),
	(73, 'Laporan', '#', 6, 5, '', '1', '2019-09-06 13:58:44', '2019-09-06 13:58:44'),
	(74, 'Penjualan', 'laporan_penjualan', 73, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(75, 'Surat Perintah Kerja', 'workorder', 7, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(76, 'Proses Mixing', 'barangkeluar', 7, 2, '', '1', '2021-01-01 10:00:12', '2021-01-01 10:00:12'),
	(77, 'Bon Bahan Multi', 'barangkeluar_kemasan', 7, 3, NULL, '1', '2019-05-23 09:18:54', '2019-05-23 09:18:54'),
	(78, 'Hasil Mixing', 'barangmasuk', 7, 4, '', '1', '2021-01-01 10:00:33', '2021-01-01 10:00:33'),
	(79, 'Laporan Hasil Multi', 'barangmasuk_kemasan', 7, 5, NULL, '1', '2019-05-23 09:19:10', '2019-05-23 09:19:10'),
	(80, 'Upah Produksi', 'upahproduksi', 7, 6, '', '1', '2019-05-14 09:24:08', '2019-05-14 09:24:08'),
	(81, 'Bill of Material', 'bom', 7, 7, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(82, 'Laporan', '#', 7, 13, NULL, '1', '2020-09-29 08:38:30', '2020-09-29 08:38:30'),
	(83, 'Bon Bahan', 'laporan_barangkeluar', 82, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(84, 'Laporan Hasil', 'laporan_barangmasuk', 82, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(85, 'Bon Bahan', 'barangkeluar_atm', 8, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(86, 'Laporan Hasil', 'barangmasuk_atm', 8, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(87, 'Sumber Dana', 'sumberdana', 9, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(88, 'Upah Harian', 'upahharian', 9, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(89, 'Kasbon Pegawai/Rekanan', 'piutang_pegawai', 9, 3, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(90, 'BOP', 'overhead_pabrik', 9, 4, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(91, 'Hutang', 'hutang', 9, 5, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(92, 'Piutang', 'piutang', 9, 6, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(93, 'Saldo Awal', 'saldoawal', 9, 11, '', '1', '2020-02-28 10:09:34', '2020-02-28 10:09:34'),
	(94, 'User Management', '#', 0, 11, 'icon-users4', '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(95, 'User', 'user', 94, 1, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(96, 'Menu', 'menu', 94, 2, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(97, 'Group', 'group', 94, 3, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(98, 'Pengaturan Menu', 'role', 94, 4, NULL, '1', '2019-05-07 15:25:01', '2019-05-07 15:25:02'),
	(99, 'Pengembalian Produksi', 'kembalibarang', 7, 8, NULL, '1', '2019-05-23 09:23:57', '2019-05-23 09:23:57'),
	(100, 'Upah Produksi Kemasan', 'upahproduksi_kemasan', 7, 6, '', '1', '2019-06-18 09:26:37', '2019-06-18 09:26:37'),
	(102, 'Produksi', 'laporanproduksi', 82, 3, '', '1', '2019-08-02 09:32:39', '2019-08-02 09:32:39'),
	(103, 'Kosong', '#', 0, 99, '#', '2', '2019-06-19 11:43:29', '2019-06-19 11:43:29'),
	(104, 'Profil', 'myprofil', 103, 1, '#', '1', '2019-06-19 11:48:20', '2019-06-19 11:48:20'),
	(105, 'Pengembalian Produksi', 'terimakembali', 59, 3, NULL, '1', '2019-06-20 09:43:30', '2019-06-20 09:43:30'),
	(106, 'Sales Kontrak', '#', 9, 2, '', '1', '2019-07-31 21:28:19', '2019-07-31 21:28:19'),
	(107, 'Kontrak', 'sales_contract', 106, 1, '', '1', '2019-07-31 21:30:53', '2019-07-31 21:30:53'),
	(108, 'Tagihan', 'sales_contract_tagihan', 106, 2, '', '1', '2019-07-31 21:30:39', '2019-07-31 21:30:39'),
	(109, 'Retur Penjualan', 'penjualan/retur_penjualan', 6, 3, '', '1', '2019-09-06 13:55:09', '2019-09-06 13:55:09'),
	(110, 'Pick Tenun', 'pick', 25, 3, '', '1', '2019-10-07 15:55:01', '2019-10-07 15:55:01'),
	(111, 'Mapping Upah Tenun', 'mapingtenun', 28, 4, '', '1', '2019-10-07 15:55:32', '2019-10-07 15:55:32'),
	(112, 'Penggunaan Barang', 'penggunaanbarang', 5, 7, NULL, '1', '2019-12-27 10:16:07', '2019-12-27 10:16:07'),
	(113, 'Stok Opname Produksi', 'opnameproduksi', 5, 6, NULL, '1', '2019-12-27 10:16:05', '2019-12-27 10:16:05'),
	(114, 'Retur Penjualan (Non Faktur)', 'penjualan/retur-penjualan-nonfaktur', 6, 4, '', '1', '2020-01-21 15:42:04', '2020-01-21 15:42:04'),
	(115, 'Upah Tenun', 'upahproduksitenun', 7, 10, '', '1', '2020-03-10 11:52:47', '2020-03-10 11:52:47'),
	(116, 'Retur Tagihan Piutang', 'retur-tagihan-piutang', 9, 9, '', '1', '2020-02-28 10:09:10', '2020-02-28 10:09:10'),
	(117, 'Retur Tagihan Piutang Awal', 'retur-tagihan-piutang-awal', 9, 10, '', '1', '2020-02-28 10:09:18', '2020-02-28 10:09:18'),
	(118, 'Jurnal Peny. Piutang', 'jurnal-piutang', 9, 12, '', '1', '2020-03-04 06:41:38', '2020-03-04 06:41:38'),
	(119, 'Pengembalian Produksi Keseluruhan', 'kembaliseluruh', 7, 9, NULL, '1', '2020-03-10 11:46:06', '2020-03-10 11:46:06'),
	(120, 'Borongan Lainnya', 'upah_boronganlain', 28, 2, NULL, '1', '2020-03-24 09:11:16', '2020-03-24 09:11:16'),
	(121, 'Upah Produksi Lainnya', 'upah_produksilainnya', 7, 11, NULL, '1', '2020-03-24 09:11:16', '2020-03-24 09:11:16'),
	(122, 'Komposisi Produksi', 'komposisi_produksi', 25, 8, NULL, '1', '2020-03-27 15:40:49', '2020-03-27 15:40:49'),
	(123, 'Harga Barang', 'harga', 2, 12, '', '1', '2020-09-07 15:18:04', '2020-09-07 15:18:04'),
	(124, 'Laporan Harga Barang', 'harga_barang', 9, 13, '', '1', '2020-09-09 13:18:09', '2020-09-09 13:18:09'),
	(125, 'Laporan Kas Bon', 'laporankasbon', 9, 14, '', '1', '2020-09-22 13:31:27', '2020-09-22 13:31:27'),
	(126, 'Upah Produksi Langsung', 'upah_produksitanpahasil', 7, 12, '', '1', '2020-09-29 08:38:22', '2020-09-29 08:38:22'),
	(127, 'Penggunaan Produksi', 'penggunaan_produksi', 25, 9, '', '1', '2020-10-08 10:44:59', '2020-10-08 10:44:59'),
	(128, 'Sewa', 'sewa', 4, 3, '', '1', '2020-10-09 15:00:17', '2020-10-09 15:00:17'),
	(129, 'Jurnal Peny. Sewa', 'jurnal-penyesuaian-sewa', 9, 13, '', '1', '2020-10-12 10:50:57', '2020-10-12 10:50:57');
/*!40000 ALTER TABLE `tb_menu` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.tb_role
CREATE TABLE IF NOT EXISTS `tb_role` (
  `kode_role` int(10) NOT NULL AUTO_INCREMENT,
  `kode_group` int(10) DEFAULT NULL,
  `kode_menu` int(10) DEFAULT NULL,
  `status_role` enum('0','1') DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`kode_role`),
  KEY `FK_tb_role` (`kode_group`),
  KEY `FK_tb_roleg` (`kode_menu`),
  CONSTRAINT `FK_tb_role` FOREIGN KEY (`kode_group`) REFERENCES `tb_group` (`kode_group`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_tb_roleg` FOREIGN KEY (`kode_menu`) REFERENCES `tb_menu` (`kode_menu`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2478 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.tb_role: ~2.565 rows (lebih kurang)
DELETE FROM `tb_role`;
/*!40000 ALTER TABLE `tb_role` DISABLE KEYS */;
INSERT INTO `tb_role` (`kode_role`, `kode_group`, `kode_menu`, `status_role`, `created_at`, `updated_at`) VALUES
	(3, 3, 1, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(7, 3, 2, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(9, 3, 3, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(10, 3, 4, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(11, 3, 5, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(16, 3, 6, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(17, 3, 7, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(54, 3, 8, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(55, 3, 9, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(56, 3, 10, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(57, 3, 11, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(58, 3, 12, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(59, 3, 13, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(60, 3, 14, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(61, 3, 15, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(62, 3, 16, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(63, 3, 17, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(64, 3, 18, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(65, 3, 19, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(66, 3, 20, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(67, 3, 21, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(68, 3, 22, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(69, 3, 23, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(70, 3, 24, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(71, 3, 25, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(72, 3, 26, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(73, 3, 27, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(74, 3, 28, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(75, 3, 29, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(76, 3, 30, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(77, 3, 31, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(78, 3, 32, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(79, 3, 33, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(80, 3, 34, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(81, 3, 35, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(82, 3, 36, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(83, 3, 37, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(84, 3, 38, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(85, 3, 39, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(86, 3, 40, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(87, 3, 41, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(88, 3, 42, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(89, 3, 43, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(90, 3, 44, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(91, 3, 45, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(92, 3, 46, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(93, 3, 47, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(94, 3, 48, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(95, 3, 49, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(96, 3, 50, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(97, 3, 51, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(98, 3, 52, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(99, 3, 53, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(100, 3, 54, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(101, 3, 55, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(102, 3, 56, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(103, 3, 57, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(104, 3, 58, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(105, 3, 59, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(106, 3, 60, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(107, 3, 61, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(108, 3, 62, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(109, 3, 63, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(110, 3, 64, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(111, 3, 65, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(112, 3, 66, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(113, 3, 67, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(114, 3, 68, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(115, 3, 69, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(116, 3, 70, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(117, 3, 71, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(118, 3, 72, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(119, 3, 73, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(120, 3, 74, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(121, 3, 75, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(122, 3, 76, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(123, 3, 77, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(124, 3, 78, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(125, 3, 79, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(126, 3, 80, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(127, 3, 81, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(128, 3, 82, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(129, 3, 83, '0', '2019-06-10 09:40:55', '2019-06-10 09:40:55'),
	(130, 3, 84, '0', '2019-06-10 09:41:16', '2019-06-10 09:41:16'),
	(131, 3, 85, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(132, 3, 86, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(133, 3, 87, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(134, 3, 88, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(135, 3, 89, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(136, 3, 90, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(137, 3, 91, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(138, 3, 92, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(139, 3, 93, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(140, 3, 94, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(141, 3, 95, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(142, 3, 96, '0', '2019-07-16 10:01:47', '2019-07-16 10:01:47'),
	(143, 3, 97, '0', '2019-07-16 10:01:47', '2019-07-16 10:01:47'),
	(144, 3, 98, '0', '2019-07-16 10:01:47', '2019-07-16 10:01:47'),
	(491, 3, 99, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(495, 3, 102, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(498, 3, 100, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(500, 3, 103, '0', '2019-06-19 11:48:46', '2019-06-19 11:48:46'),
	(501, 3, 104, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1036, 12, 1, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1037, 12, 2, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1038, 12, 3, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1039, 12, 4, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1040, 12, 5, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1041, 12, 6, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1042, 12, 7, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1043, 12, 8, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1044, 12, 9, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1045, 12, 10, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1046, 12, 11, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1047, 12, 12, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1048, 12, 13, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1049, 12, 14, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1050, 12, 15, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1051, 12, 16, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1052, 12, 17, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1053, 12, 18, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1054, 12, 19, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1055, 12, 20, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1056, 12, 21, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1057, 12, 22, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1058, 12, 23, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1059, 12, 24, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1060, 12, 25, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1061, 12, 26, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1062, 12, 27, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1063, 12, 28, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1064, 12, 29, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1065, 12, 30, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1066, 12, 31, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1067, 12, 32, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1068, 12, 33, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1069, 12, 34, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1070, 12, 35, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1071, 12, 36, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1072, 12, 37, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1073, 12, 38, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1074, 12, 39, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1075, 12, 40, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1076, 12, 41, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1077, 12, 42, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1078, 12, 43, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1079, 12, 44, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1080, 12, 45, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1081, 12, 46, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1082, 12, 47, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1083, 12, 48, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1084, 12, 49, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1085, 12, 50, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1086, 12, 51, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1087, 12, 52, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1088, 12, 53, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1089, 12, 54, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1090, 12, 55, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1091, 12, 56, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1092, 12, 57, '0', '2020-09-30 20:53:33', '2020-09-30 20:53:33'),
	(1093, 12, 58, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1094, 12, 59, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1095, 12, 60, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1096, 12, 61, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1097, 12, 62, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1098, 12, 63, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1099, 12, 64, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1100, 12, 65, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1101, 12, 66, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1102, 12, 67, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1103, 12, 68, '0', '2020-09-30 20:53:33', '2020-09-30 20:53:33'),
	(1104, 12, 69, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1105, 12, 70, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1106, 12, 71, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1107, 12, 72, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1108, 12, 73, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1109, 12, 74, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1110, 12, 75, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1111, 12, 76, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1112, 12, 77, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1113, 12, 78, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1114, 12, 79, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1115, 12, 80, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1116, 12, 81, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1117, 12, 82, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1118, 12, 83, '0', '2020-09-30 20:53:33', '2020-09-30 20:53:33'),
	(1119, 12, 84, '0', '2020-09-30 20:53:33', '2020-09-30 20:53:33'),
	(1120, 12, 85, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1121, 12, 86, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1122, 12, 87, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1123, 12, 88, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1124, 12, 89, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1125, 12, 90, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1126, 12, 91, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1127, 12, 92, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1128, 12, 93, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1129, 12, 94, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1130, 12, 95, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1131, 12, 96, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1132, 12, 97, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1133, 12, 98, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1134, 12, 99, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1135, 12, 100, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1136, 12, 102, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1137, 12, 103, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1138, 12, 104, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1139, 12, 105, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1140, 3, 105, '0', '2019-07-16 09:59:10', '2019-07-16 09:59:10'),
	(1141, 12, 106, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1151, 3, 106, '0', '2019-08-05 10:00:22', '2019-08-05 10:00:22'),
	(1152, 3, 107, '0', '2019-08-05 10:00:22', '2019-08-05 10:00:22'),
	(1153, 3, 108, '0', '2019-08-05 10:00:22', '2019-08-05 10:00:22'),
	(1154, 12, 107, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1155, 12, 108, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1156, 12, 109, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1165, 12, 110, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1166, 12, 111, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1167, 3, 109, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1168, 3, 110, '0', '2019-10-07 15:56:43', '2019-10-07 15:56:43'),
	(1169, 3, 111, '0', '2019-10-07 15:56:43', '2019-10-07 15:56:43'),
	(1298, 12, 112, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1302, 12, 113, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1646, 3, 112, '0', '2020-01-11 11:25:48', '2020-01-11 11:25:48'),
	(1647, 3, 113, '0', '2020-01-11 11:25:48', '2020-01-11 11:25:48'),
	(1648, 12, 114, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1649, 3, 114, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1655, 12, 115, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1658, 3, 115, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1659, 3, 116, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1671, 12, 116, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1672, 3, 117, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1673, 12, 117, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1674, 3, 118, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1675, 12, 118, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1680, 12, 119, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1926, 12, 120, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1927, 12, 121, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1930, 3, 119, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1931, 3, 120, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1932, 3, 121, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1937, 12, 122, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1938, 3, 122, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1956, 12, 123, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1957, 3, 123, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1958, 3, 124, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1959, 12, 124, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1963, 12, 125, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1964, 3, 125, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1970, 12, 126, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1979, 12, 127, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1980, 3, 126, '0', '2020-10-08 10:45:30', '2020-10-08 10:45:30'),
	(1981, 3, 127, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(1997, 12, 128, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(1998, 3, 128, '1', '2020-12-16 11:18:04', '2020-12-16 11:18:04'),
	(2045, 12, 129, '1', '2020-10-12 10:51:31', '2020-10-12 10:51:31'),
	(2204, 3, 129, '0', '2020-12-16 11:16:16', '2020-12-16 11:16:16'),
	(2350, 20, 1, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2351, 20, 2, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2352, 20, 3, '0', '2021-01-01 09:18:43', '2021-01-01 09:18:43'),
	(2353, 20, 4, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2354, 20, 5, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2355, 20, 6, '0', '2021-01-01 09:18:43', '2021-01-01 09:18:43'),
	(2356, 20, 7, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2357, 20, 8, '0', '2021-01-01 09:18:43', '2021-01-01 09:18:43'),
	(2358, 20, 9, '0', '2021-01-01 09:18:43', '2021-01-01 09:18:43'),
	(2359, 20, 10, '0', '2021-01-01 09:18:43', '2021-01-01 09:18:43'),
	(2360, 20, 11, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2361, 20, 12, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2362, 20, 13, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2363, 20, 14, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2364, 20, 15, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2365, 20, 16, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2366, 20, 17, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2367, 20, 18, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2368, 20, 19, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2369, 20, 20, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2370, 20, 21, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2371, 20, 22, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2372, 20, 23, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2373, 20, 24, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2374, 20, 25, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2375, 20, 26, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2376, 20, 27, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2377, 20, 28, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2378, 20, 29, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2379, 20, 30, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2380, 20, 31, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2381, 20, 32, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2382, 20, 33, '0', '2021-01-01 09:18:44', '2021-01-01 09:18:44'),
	(2383, 20, 34, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2384, 20, 35, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2385, 20, 36, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2386, 20, 37, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2387, 20, 38, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2388, 20, 39, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2389, 20, 40, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2390, 20, 41, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2391, 20, 42, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2392, 20, 43, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2393, 20, 44, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2394, 20, 45, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2395, 20, 46, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2396, 20, 47, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2397, 20, 48, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2398, 20, 49, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2399, 20, 50, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2400, 20, 51, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2401, 20, 52, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2402, 20, 53, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2403, 20, 54, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2404, 20, 55, '0', '2021-01-01 09:18:45', '2021-01-01 09:18:45'),
	(2405, 20, 56, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2406, 20, 57, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2407, 20, 58, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2408, 20, 59, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2409, 20, 60, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2410, 20, 61, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2411, 20, 62, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2412, 20, 63, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2413, 20, 64, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2414, 20, 65, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2415, 20, 66, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2416, 20, 67, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2417, 20, 68, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2418, 20, 69, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2419, 20, 70, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2420, 20, 71, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2421, 20, 72, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2422, 20, 73, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2423, 20, 74, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2424, 20, 75, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2425, 20, 76, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2426, 20, 77, '0', '2021-01-01 09:18:46', '2021-01-01 09:18:46'),
	(2427, 20, 78, '1', '2021-01-01 09:41:20', '2021-01-01 09:41:20'),
	(2428, 20, 79, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2429, 20, 80, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2430, 20, 81, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2431, 20, 82, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2432, 20, 83, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2433, 20, 84, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2434, 20, 85, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2435, 20, 86, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2436, 20, 87, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2437, 20, 88, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2438, 20, 89, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2439, 20, 90, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2440, 20, 91, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2441, 20, 92, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2442, 20, 93, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2443, 20, 94, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2444, 20, 95, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2445, 20, 96, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2446, 20, 97, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2447, 20, 98, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2448, 20, 99, '0', '2021-01-01 09:18:47', '2021-01-01 09:18:47'),
	(2449, 20, 100, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2450, 20, 102, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2451, 20, 103, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2452, 20, 104, '1', '2021-01-01 09:41:19', '2021-01-01 09:41:19'),
	(2453, 20, 105, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2454, 20, 106, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2455, 20, 107, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2456, 20, 108, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2457, 20, 109, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2458, 20, 110, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2459, 20, 111, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2460, 20, 112, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2461, 20, 113, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2462, 20, 114, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2463, 20, 115, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2464, 20, 116, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2465, 20, 117, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2466, 20, 118, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2467, 20, 119, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2468, 20, 120, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2469, 20, 121, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2470, 20, 122, '0', '2021-01-01 09:18:48', '2021-01-01 09:18:48'),
	(2471, 20, 123, '0', '2021-01-01 09:18:49', '2021-01-01 09:18:49'),
	(2472, 20, 124, '0', '2021-01-01 09:18:49', '2021-01-01 09:18:49'),
	(2473, 20, 125, '0', '2021-01-01 09:18:49', '2021-01-01 09:18:49'),
	(2474, 20, 126, '0', '2021-01-01 09:18:49', '2021-01-01 09:18:49'),
	(2475, 20, 127, '0', '2021-01-01 09:18:49', '2021-01-01 09:18:49'),
	(2476, 20, 128, '0', '2021-01-01 09:18:49', '2021-01-01 09:18:49'),
	(2477, 20, 129, '0', '2021-01-01 09:18:49', '2021-01-01 09:18:49');
/*!40000 ALTER TABLE `tb_role` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.tb_user
CREATE TABLE IF NOT EXISTS `tb_user` (
  `kode_user` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) DEFAULT NULL,
  `password` varchar(50) DEFAULT NULL,
  `nama` varchar(50) DEFAULT NULL,
  `id_gudang` varchar(50) DEFAULT '0',
  `id_lokasi` int(11) DEFAULT NULL,
  `is_aktif` int(11) DEFAULT '1',
  `kode_group` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `id_proses` varchar(50) DEFAULT '0',
  `kelamin` int(11) NOT NULL DEFAULT '1',
  `foto` text,
  PRIMARY KEY (`kode_user`),
  KEY `FK_tb_user` (`kode_group`),
  CONSTRAINT `FK_tb_user` FOREIGN KEY (`kode_group`) REFERENCES `tb_group` (`kode_group`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.tb_user: ~26 rows (lebih kurang)
DELETE FROM `tb_user`;
/*!40000 ALTER TABLE `tb_user` DISABLE KEYS */;
INSERT INTO `tb_user` (`kode_user`, `username`, `password`, `nama`, `id_gudang`, `id_lokasi`, `is_aktif`, `kode_group`, `created_at`, `updated_at`, `id_proses`, `kelamin`, `foto`) VALUES
	(1, 'admin', 'adminbismillah', 'admin', '', 0, 1, 3, '2019-06-13 09:12:26', '2019-06-13 09:12:26', '', 1, NULL),
	(17, 'developer', 'pemimpi', 'Developer', '', NULL, 1, 12, '2019-07-16 13:53:52', '2019-07-16 13:53:52', '', 1, NULL),
	(29, 'admin_cat', 'admin_cat', 'admin_cat', '', 0, 1, 20, '2021-01-01 09:20:11', '2021-01-01 09:20:11', '', 1, NULL);
/*!40000 ALTER TABLE `tb_user` ENABLE KEYS */;

-- membuang struktur untuk table si_sarung.t_users
CREATE TABLE IF NOT EXISTS `t_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(25) NOT NULL,
  `password` varchar(8) NOT NULL,
  `is_aktif` tinyint(1) NOT NULL DEFAULT '0',
  `flags` char(1) NOT NULL,
  `id_groupcabang` int(11) NOT NULL DEFAULT '0',
  `id_admin` int(11) NOT NULL DEFAULT '0',
  `tahun` year(4) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

-- Membuang data untuk tabel si_sarung.t_users: ~1 rows (lebih kurang)
DELETE FROM `t_users`;
/*!40000 ALTER TABLE `t_users` DISABLE KEYS */;
INSERT INTO `t_users` (`id`, `username`, `password`, `is_aktif`, `flags`, `id_groupcabang`, `id_admin`, `tahun`) VALUES
	(1, 'superadmin', 'admin', 1, 'S', 1, 2, '2018');
/*!40000 ALTER TABLE `t_users` ENABLE KEYS */;

-- membuang struktur untuk view si_sarung.view_barangkeluar_barang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_barangkeluar_barang` (
	`id` INT(11) NOT NULL,
	`id_barangkeluar` INT(11) NOT NULL,
	`id_barang` INT(11) NOT NULL,
	`jumlah` DOUBLE NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_komposisi` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`id_motif_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`motif_keterangan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`keterangan` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_byr_peny_ptg
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_byr_peny_ptg` (
	`id_penjualan` INT(11) NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nomor_jurnal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_jurnal` DATE NOT NULL,
	`jum_bayar` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_byr_peny_ptg_dt
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_byr_peny_ptg_dt` (
	`id_penjualan` INT(11) NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nomor_jurnal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_jurnal` DATE NOT NULL,
	`tipe_akun_debet` ENUM('D','K') NULL COLLATE 'latin1_swedish_ci',
	`tipe_akun_kredit` ENUM('D','K') NULL COLLATE 'latin1_swedish_ci',
	`nominal_debet` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_kredit` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_barangkeluar_kemasan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_barangkeluar_kemasan` (
	`id_barangkeluar_kemasan` INT(11) NOT NULL,
	`id_barangkeluar_kb` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` INT(1) NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_komposisi` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`status` INT(2) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_barangmasuk_kemasan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_barangmasuk_kemasan` (
	`id_barangmasuk_kemasan` INT(11) NOT NULL,
	`id_barangmasuk_kb` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_komposisi` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_getedit_keluar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_getedit_keluar` (
	`id` INT(11) NOT NULL,
	`id_barangkeluar` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`jumlah_konversi` DOUBLE NOT NULL,
	`masuk` INT(1) NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`status` INT(12) NOT NULL,
	`keterangan` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_proses_sebelum` INT(100) NOT NULL,
	`namabarang_subkategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`namabarang_kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_komposisi` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan_jumlah` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`satuan_jumlah` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan_konv` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`satuan_jumlah_konv` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_proses_sebelumnya` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_proses` DATE NOT NULL,
	`status_barang` INT(2) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_keluar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_keluar` (
	`id_barangkeluar_barang` INT(11) NOT NULL,
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` INT(1) NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_komposisi` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`keterangan` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_proses` DATE NOT NULL,
	`status` INT(2) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_kembali
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_kembali` (
	`id_kembali_barang` INT(11) NOT NULL,
	`id_kembali` INT(11) NOT NULL,
	`id_barang` INT(50) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_komposisi` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` INT(1) NOT NULL,
	`nilai_akhir` INT(1) NOT NULL,
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_dudul` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_label` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`keterangan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`status` INT(11) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_masuk
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_masuk` (
	`id_barangmasuk` INT(11) NOT NULL,
	`id` INT(100) NOT NULL,
	`id_barang` INT(100) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_proses` INT(11) NOT NULL,
	`nama_proses` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` INT(11) NOT NULL,
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_komposisi` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`status` INT(11) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_masukatm
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_masukatm` (
	`id_barangmasuk` INT(11) NOT NULL,
	`id` INT(100) NOT NULL,
	`id_barang` INT(100) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` INT(11) NOT NULL,
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_shift` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_shift` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_opname
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_opname` (
	`id_opname_barang` INT(100) NOT NULL,
	`id_opname` INT(100) NOT NULL,
	`jumlah_stok` FLOAT NOT NULL,
	`jumlah_opname` FLOAT NOT NULL,
	`jumlah_selisih` FLOAT NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(9) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_opnameproduksi
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_opnameproduksi` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` INT(11) NULL,
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_1` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_2` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_3` VARCHAR(6) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_awal` INT(1) NOT NULL,
	`nilai_akhir` INT(1) NOT NULL,
	`id_detail` INT(10) NOT NULL,
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_proses_sekarang` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL,
	`id_kategori` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kategori` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`id_subkategori` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_subkategori` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_pegawai` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_pegawai` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_rekanan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_rekanan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_mesin` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_mesin` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_penerimaan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_penerimaan` (
	`id` INT(100) NOT NULL,
	`id_penerimaan` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` DOUBLE NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_komposisi` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` BIGINT(11) NULL,
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_motif` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_dudul` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasansepuluh` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasanseratus` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_cap` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_periksa` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perubahansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`jumlah_rencana` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_rubahspk
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_rubahspk` (
	`id_rubahspk` INT(11) NOT NULL,
	`id_rubahspk_barang` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` INT(1) NOT NULL,
	`keluar` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_akhir` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_akhir` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang_akhir` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang_akhir` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_transferbarang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_transferbarang` (
	`id_transfergudang_detail` INT(100) NOT NULL,
	`kode_transfergudang` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` CHAR(12) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_gudangtujuan` INT(11) NOT NULL,
	`status` INT(100) NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_workorder
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_workorder` (
	`id_workorder` INT(100) NOT NULL,
	`nomor` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_barang` INT(100) NOT NULL,
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`dasar_jumlah` INT(100) NOT NULL,
	`dasar2_jumlah` INT(100) NOT NULL,
	`dasar3_jumlah` INT(100) NOT NULL,
	`dasar4_jumlah` INT(100) NOT NULL,
	`dasar5_jumlah` INT(100) NOT NULL,
	`dasar6_jumlah` INT(100) NOT NULL,
	`dasar7_jumlah` INT(100) NOT NULL,
	`dasar8_jumlah` INT(100) NOT NULL,
	`dasar9_jumlah` INT(100) NOT NULL,
	`dasar10_jumlah` INT(100) NOT NULL,
	`streep_jumlah` INT(100) NOT NULL,
	`kombinasi1_jumlah` INT(100) NOT NULL,
	`kombinasi2_jumlah` INT(100) NOT NULL,
	`kombinasi3_jumlah` INT(100) NOT NULL,
	`kluwungan1_jumlah` INT(100) NOT NULL,
	`kluwungan2_jumlah` INT(100) NOT NULL,
	`kluwungan3_jumlah` INT(100) NOT NULL,
	`kluwungan4_jumlah` INT(100) NOT NULL,
	`timbulan1_jumlah` INT(100) NOT NULL,
	`timbulan2_jumlah` INT(100) NOT NULL,
	`timbulan3_jumlah` INT(100) NOT NULL,
	`timbulan4_jumlah` INT(100) NOT NULL,
	`songketan1_jumlah` INT(100) NOT NULL,
	`songketan2_jumlah` INT(100) NOT NULL,
	`songketan3_jumlah` INT(100) NOT NULL,
	`songketan4_jumlah` INT(100) NOT NULL,
	`songketan5_jumlah` INT(100) NOT NULL,
	`songketan6_jumlah` INT(100) NOT NULL,
	`songketan7_jumlah` INT(100) NOT NULL,
	`songketan8_jumlah` INT(100) NOT NULL,
	`songketan9_jumlah` INT(100) NOT NULL,
	`songketan10_jumlah` INT(100) NOT NULL,
	`songketan11_jumlah` INT(100) NOT NULL,
	`songketan12_jumlah` INT(100) NOT NULL,
	`songketan13_jumlah` INT(100) NOT NULL,
	`songketan14_jumlah` INT(100) NOT NULL,
	`songketan15_jumlah` INT(100) NOT NULL,
	`pancingan1_jumlah` INT(100) NOT NULL,
	`pancingan2_jumlah` INT(100) NOT NULL,
	`gunungan1_atas_jumlah` INT(100) NOT NULL,
	`gunungan2_atas_jumlah` INT(100) NOT NULL,
	`gunungan3_atas_jumlah` INT(100) NOT NULL,
	`gunungan1_bawah_jumlah` INT(100) NOT NULL,
	`gunungan2_bawah_jumlah` INT(100) NOT NULL,
	`gunungan3_bawah_jumlah` INT(100) NOT NULL,
	`garis1_jumlah` INT(100) NOT NULL,
	`garis2_jumlah` INT(100) NOT NULL,
	`dasar_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`dasar2_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar2_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`dasar3_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar3_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`streep_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_streep_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`kombinasi1_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kombinasi1_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`kombinasi2_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kombinasi2_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`kombinasi3_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kombinasi3_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`kluwungan1_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kluwungan1_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`kluwungan2_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kluwungan2_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`kluwungan3_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kluwungan3_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`kluwungan4_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kluwungan4_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`timbulan1_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_timbulan1_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`timbulan2_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_timbulan2_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`timbulan3_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_timbulan3_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`timbulan4_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_timbulan4_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan1_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan1_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan2_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan2_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan3_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan3_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan4_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan4_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`pancingan1_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_pancingan1_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`pancingan2_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_pancingan2_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`gunungan1_atas_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan1_atas_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`gunungan2_atas_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan2_atas_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`gunungan3_atas_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan3_atas_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`gunungan1_bawah_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan1_bawah_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`gunungan2_bawah_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan2_bawah_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`gunungan3_bawah_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan3_bawah_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`garis1_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_garis1_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`garis2_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_garis2_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`dasar4_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar4_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`dasar5_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar5_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`dasar6_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar6_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`dasar7_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar7_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`dasar8_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar8_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`dasar9_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar9_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`dasar10_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar10_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan5_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan5_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan6_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan6_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan7_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan7_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan8_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan8_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan9_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan9_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan10_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan10_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan11_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan11_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan12_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan12_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan13_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan13_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan14_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan14_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`songketan15_satuan` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan15_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_workorder_barang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_workorder_barang` (
	`id_workorder_barang` INT(100) NOT NULL,
	`id_workorder` INT(100) NOT NULL,
	`no_workorder` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`motif` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_celup` DATE NOT NULL,
	`hb` DATE NOT NULL,
	`jumlah_beem` INT(12) NOT NULL,
	`beem` DATE NOT NULL,
	`pakan` DATE NOT NULL,
	`nama_motif` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`dasar` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_dasar` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`dasar2` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar2` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_dasar2` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`dasar3` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar3` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_dasar3` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`streep` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_streep` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_streep` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`kombinasi1` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kombinasi1` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_kombinasi1` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`kombinasi2` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kombinasi2` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_kombinasi2` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`kombinasi3` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kombinasi3` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_kombinasi3` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`kluwungan1` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kluwungan1` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_kluwungan1` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`kluwungan2` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kluwungan2` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_kluwungan2` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`kluwungan3` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kluwungan3` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_kluwungan3` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`kluwungan4` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kluwungan4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_kluwungan4` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`timbulan1` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_timbulan1` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_timbulan1` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`timbulan2` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_timbulan2` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_timbulan2` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`timbulan3` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_timbulan3` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_timbulan3` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`timbulan4` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_timbulan4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_timbulan4` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan1` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan1` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan1` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan2` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan2` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan2` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan3` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan3` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan3` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan4` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan4` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`pancingan1` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_pancingan1` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_pancingan1` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`pancingan2` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_pancingan2` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_pancingan2` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`gunungan1_atas` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan1_atas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_gunungan1_atas` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`gunungan2_atas` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan2_atas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_gunungan2_atas` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`gunungan3_atas` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan3_atas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_gunungan3_atas` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`gunungan1_bawah` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan1_bawah` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_gunungan1_bawah` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`gunungan2_bawah` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan2_bawah` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_gunungan2_bawah` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`gunungan3_bawah` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_gunungan3_bawah` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_gunungan3_bawah` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`garis1` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_garis1` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_garis1` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`garis2` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_garis2` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_garis2` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`dasar4` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_dasar4` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`dasar5` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar5` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_dasar5` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`dasar6` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar6` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_dasar6` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`dasar7` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar7` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_dasar7` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`dasar8` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar8` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_dasar8` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`dasar9` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar9` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_dasar9` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`dasar10` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_dasar10` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_dasar10` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan5` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan5` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan5` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan6` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan6` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan6` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan7` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan7` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan7` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan8` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan8` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan8` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan9` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan9` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan9` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan10` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan10` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan10` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan11` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan11` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan11` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan12` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan12` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan12` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan13` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan13` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan13` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan14` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan14` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan14` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`songketan15` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_songketan15` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_songketan15` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_edit_workorder_ket
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_edit_workorder_ket` (
	`id_workorder_ket` INT(100) NOT NULL,
	`id_workorder` INT(100) NOT NULL,
	`keterangan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_barang` INT(100) NOT NULL,
	`jumlah` FLOAT NOT NULL,
	`jumlah_konversi` FLOAT NOT NULL,
	`satuan_jumlah` INT(100) NOT NULL,
	`satuan_jumlah_konversi` INT(100) NOT NULL,
	`nama_keterangan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_satuan_jumlah` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`nama_satuan_konversi` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_hargabarang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_hargabarang` (
	`id_harga` INT(11) NOT NULL,
	`tanggal` DATE NOT NULL,
	`id_barang` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_komposisi` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` INT(11) NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jenis` CHAR(2) NOT NULL COMMENT '0 -> barang di gudang 1 -> barang dalam proses' COLLATE 'latin1_swedish_ci',
	`harga` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_hutang_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_hutang_bayar` (
	`id_hutang` INT(100) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`id_penyedia` INT(100) NOT NULL,
	`id_transaksi` INT(100) NOT NULL,
	`id_carabayar` INT(100) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`nominal_total` DECIMAL(11,0) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`nominal_pajak` DECIMAL(11,0) NULL,
	`nominal_ongkir` DECIMAL(11,0) NOT NULL,
	`nominal_netto` DECIMAL(11,0) NOT NULL,
	`nominal_bayar` DECIMAL(11,2) NOT NULL,
	`total_bayar` DOUBLE NULL,
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`created_at` TIMESTAMP NOT NULL,
	`update_at` TIMESTAMP NOT NULL,
	`nama_penyedia` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_transaksi` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_transaksi` CHAR(2) NOT NULL COLLATE 'latin1_swedish_ci',
	`cara_bayar` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jenis_bayar` INT(5) NOT NULL COMMENT '0=>none, 1=>tunai, 2=>kredit, 3=>uang muka',
	`tipe_bayar` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_inv_saldoawal
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_inv_saldoawal` (
	`id` INT(255) NOT NULL,
	`id_barang` INT(255) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(255) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_inv_saldoawal_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_inv_saldoawal_sub` (
	`id` INT(255) NOT NULL,
	`id_barang` INT(255) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah_saldoawal` DOUBLE NOT NULL,
	`id_gudang` INT(255) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_proses` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_jurnal_peny_piutang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_jurnal_peny_piutang` (
	`id_jph` INT(11) NOT NULL,
	`id_penjualan` INT(11) NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nomor_jurnal` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_jurnal` DATE NOT NULL,
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_akun` INT(11) NOT NULL,
	`tipe_akun` ENUM('D','K') NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_jurnal_peny_sewa
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_jurnal_peny_sewa` (
	`id_jsh` INT(11) NOT NULL,
	`id_sewa` INT(11) NOT NULL,
	`id_penyedia` INT(11) NOT NULL,
	`no_faktur` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`nomor_jurnal` VARCHAR(25) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_jurnal` DATE NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_sewa` INT(11) NOT NULL,
	`id_akun` INT(11) NOT NULL,
	`tipe_akun` ENUM('D','K') NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_kasbon_pegawai_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_kasbon_pegawai_bayar` (
	`id` INT(11) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`id_pegawai` INT(11) NOT NULL,
	`nomor_transaksi` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_transaksi` DATE NOT NULL,
	`dari_akun` INT(11) NOT NULL,
	`tipe_dari_akun` VARCHAR(10) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_id_akun_piutang` VARCHAR(10) NOT NULL COLLATE 'latin1_swedish_ci',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`total_bayar` DOUBLE NULL,
	`nomor_pegawai` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_pegawai` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_departement` INT(100) NOT NULL,
	`departement` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_kasbon_rekanan_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_kasbon_rekanan_bayar` (
	`id` INT(11) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`id_rekanan` INT(11) NOT NULL,
	`nomor_transaksi` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_transaksi` DATE NOT NULL,
	`dari_akun` INT(11) NOT NULL,
	`tipe_dari_akun` VARCHAR(10) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tipe_id_akun_piutang` VARCHAR(10) NOT NULL COLLATE 'latin1_swedish_ci',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`total_bayar` DOUBLE NULL,
	`nama_rekanan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan_rekanan` VARCHAR(15) NOT NULL COLLATE 'utf8mb4_unicode_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_keluar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_keluar` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` INT(1) NOT NULL,
	`keluar` DOUBLE NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_keluarkemasan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_keluarkemasan` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` INT(1) NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_keluarkemasan_all
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_keluarkemasan_all` (
	`id` INT(11) NOT NULL,
	`id_detail` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` DOUBLE NOT NULL,
	`masuk` INT(1) NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL,
	`id_proses_sekarang` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_keluarkemasan_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_keluarkemasan_sub` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` DOUBLE NOT NULL,
	`masuk` INT(1) NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_keluar_all
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_keluar_all` (
	`id` INT(11) NOT NULL,
	`id_detail` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` INT(1) NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_proses_sekarang` INT(11) NOT NULL,
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_keluar_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_keluar_sub` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` INT(1) NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_kembali
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_kembali` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_dudul` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_label` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_kembali_all
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_kembali_all` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(11) NOT NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_label` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`is_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_1` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_2` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_3` VARCHAR(21) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_4` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_5` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_awal` INT(1) NOT NULL,
	`nilai_akhir` INT(1) NOT NULL,
	`id_detail` INT(11) NOT NULL,
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_proses_sekarang` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL,
	`id_kategori` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kategori` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`id_subkategori` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_subkategori` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` BIGINT(11) NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_pegawai` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_pegawai` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_rekanan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_rekanan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_mesin` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_mesin` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_keu_sumber_dana
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_keu_sumber_dana` (
	`id` INT(11) NOT NULL,
	`tahun` INT(4) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`nomor_transaksi` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_transaksi` DATE NOT NULL,
	`jenis_transaksi` INT(11) NOT NULL,
	`dari_akun` INT(11) NOT NULL,
	`tipe_id_akun` VARCHAR(65) NULL COLLATE 'latin1_swedish_ci',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`penerima_transaksi` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_laporan_orderbeli
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_laporan_orderbeli` (
	`id_orderbeli` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_order` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_tempo` DATE NULL,
	`id_penyedia` INT(100) NOT NULL,
	`potongan` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`termasuk_pajak` INT(11) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`nominal_ongkir` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`syarat_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tempat_serah` INT(11) NULL,
	`tanggal_serah` DATE NULL,
	`penerima` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nama` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_kelompok` INT(11) NOT NULL,
	`id_kategori` INT(11) NOT NULL,
	`kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_sub_kategori` INT(11) NOT NULL,
	`sub_kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang_konv` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`nilai_ppn` DOUBLE NULL,
	`sub_total` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_laporan_orderservice
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_laporan_orderservice` (
	`id` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_nota` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_nota` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_nota` DATE NOT NULL,
	`id_penyedia` INT(100) NOT NULL,
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`id_akun` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`deskripsi` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`total` DOUBLE NOT NULL,
	`nama` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_laporan_pembelian
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_laporan_pembelian` (
	`id_pembelian` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NULL,
	`id_penyedia` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`nominal_ongkir` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`termasuk_pajak` INT(11) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`syarat_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tempat_serah` INT(11) NULL,
	`tanggal_serah` DATE NULL,
	`penerima` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`id_beli` INT(100) NOT NULL,
	`nama` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_kelompok` INT(11) NOT NULL,
	`id_kategori` INT(11) NOT NULL,
	`kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_sub_kategori` INT(11) NOT NULL,
	`sub_kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang_konv` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`nilai_ppn` DOUBLE NULL,
	`total` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_laporan_penjualan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_laporan_penjualan` (
	`tanggal` DATE NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_jual_barang` INT(100) NOT NULL,
	`id_penjualan` INT(100) NOT NULL,
	`id_barang` INT(100) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`jml_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang_konv` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`potongan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`total` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` INT(11) NOT NULL,
	`id_satuan` MEDIUMINT(9) NOT NULL,
	`jumlah` DOUBLE NOT NULL,
	`jumlah_konversi` DOUBLE NOT NULL,
	`id_workorder` INT(11) NOT NULL,
	`id_workorder_barang` INT(11) NOT NULL,
	`id_komposisi` INT(11) NOT NULL,
	`id_proses` INT(11) NOT NULL,
	`id_kualitas` MEDIUMINT(9) NOT NULL,
	`id_motif_barang` INT(11) NOT NULL,
	`id_motif` INT(100) NOT NULL,
	`id_kualitas_dudul` INT(11) NOT NULL,
	`id_label` INT(11) NOT NULL,
	`id_kemasan` INT(11) NOT NULL,
	`id_kemasansatuan` INT(11) NOT NULL,
	`id_kemasansepuluh` INT(11) NOT NULL,
	`id_kemasanseratus` INT(11) NOT NULL,
	`id_plat` INT(11) NOT NULL,
	`id_cap` INT(11) NOT NULL,
	`id_kualitas_proses` INT(11) NOT NULL,
	`id_kualitas_periksa` INT(11) NOT NULL,
	`id_perubahansatuan` INT(11) NOT NULL,
	`jumlah_rencana` DOUBLE NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`update_at` TIMESTAMP NOT NULL,
	`nama_pelanggan` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_pelanggan` INT(11) NOT NULL,
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_laporan_penjualan_langganan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_laporan_penjualan_langganan` (
	`tanggal` DATE NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_jual_barang` INT(100) NOT NULL,
	`id_penjualan` INT(100) NOT NULL,
	`id_barang` INT(100) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`jml_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang_konv` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`potongan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`total` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` INT(11) NOT NULL,
	`id_satuan` MEDIUMINT(9) NOT NULL,
	`jumlah` DOUBLE NOT NULL,
	`jumlah_konversi` DOUBLE NOT NULL,
	`id_workorder` INT(11) NOT NULL,
	`id_workorder_barang` INT(11) NOT NULL,
	`id_komposisi` INT(11) NOT NULL,
	`id_proses` INT(11) NOT NULL,
	`id_kualitas` MEDIUMINT(9) NOT NULL,
	`id_motif_barang` INT(11) NOT NULL,
	`id_motif` INT(100) NOT NULL,
	`id_kualitas_dudul` INT(11) NOT NULL,
	`id_label` INT(11) NOT NULL,
	`id_kemasan` INT(11) NOT NULL,
	`id_kemasansatuan` INT(11) NOT NULL,
	`id_kemasansepuluh` INT(11) NOT NULL,
	`id_kemasanseratus` INT(11) NOT NULL,
	`id_plat` INT(11) NOT NULL,
	`id_cap` INT(11) NOT NULL,
	`id_kualitas_proses` INT(11) NOT NULL,
	`id_kualitas_periksa` INT(11) NOT NULL,
	`id_perubahansatuan` INT(11) NOT NULL,
	`jumlah_rencana` DOUBLE NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`update_at` TIMESTAMP NOT NULL,
	`nama_pelanggan` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_pelanggan` INT(11) NOT NULL,
	`total_jmlbarang` DOUBLE NULL,
	`total_satuan` DOUBLE NULL,
	`diskon` DOUBLE NULL,
	`piutang` DOUBLE NULL,
	`penjualan` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_laporan_penjualan_pelanggan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_laporan_penjualan_pelanggan` (
	`id_penjualan` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`status_kirim` INT(1) NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_surat` DATE NULL,
	`no_surat` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_surat` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keterangan_surat` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_piutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_penjualan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`penjualan` DOUBLE NULL,
	`diskon` DOUBLE NULL,
	`piutang` DOUBLE NULL,
	`nama_pelanggan` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_laporan_penjualan_pelanggan_detail
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_laporan_penjualan_pelanggan_detail` (
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status_penjualan` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`status_kirim` INT(1) NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_piutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_penjualan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_jual_barang` INT(100) NOT NULL,
	`id_penjualan` INT(100) NOT NULL,
	`id_barang` INT(100) NOT NULL,
	`nama_barang` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`jml_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang_konv` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`potongan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`total` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` INT(11) NOT NULL,
	`id_satuan` MEDIUMINT(9) NOT NULL,
	`satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`jumlah_konversi` DOUBLE NOT NULL,
	`id_workorder` INT(11) NOT NULL,
	`id_workorder_barang` INT(11) NOT NULL,
	`id_komposisi` INT(11) NOT NULL,
	`id_proses` INT(11) NOT NULL,
	`id_kualitas` MEDIUMINT(9) NOT NULL,
	`id_motif_barang` INT(11) NOT NULL,
	`id_motif` INT(100) NOT NULL,
	`id_kualitas_dudul` INT(11) NOT NULL,
	`id_label` INT(11) NOT NULL,
	`id_kemasan` INT(11) NOT NULL,
	`id_kemasansatuan` INT(11) NOT NULL,
	`id_kemasansepuluh` INT(11) NOT NULL,
	`id_kemasanseratus` INT(11) NOT NULL,
	`id_plat` INT(11) NOT NULL,
	`id_cap` INT(11) NOT NULL,
	`id_kualitas_proses` INT(11) NOT NULL,
	`id_kualitas_periksa` INT(11) NOT NULL,
	`id_perubahansatuan` INT(11) NOT NULL,
	`jumlah_rencana` DOUBLE NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`update_at` TIMESTAMP NOT NULL,
	`nama_pelanggan` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` INT(11) NOT NULL,
	`kurs_jual` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_mapingupahtenun
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_mapingupahtenun` (
	`id_mapingupahtenun` INT(255) NOT NULL,
	`id_kelompok` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kelompok` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_pick_barang` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_pick` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_motif_pick` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif_pick` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jenis_pick` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nama_jenis_pick` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`pick_atas` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`pick_bawah` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`upah_pick` VARCHAR(12) NULL COLLATE 'utf8mb4_general_ci',
	`status_pick` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_status_pick` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`id_upahtenun` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_upahtenun` TEXT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_berlaku_upahtenun` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_motif_upahtenun` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif_upahtenun` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi_upahtenun` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_lokasi_upahtenun` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nominal_rekanan_upahtenun` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nominal_rekanan_kelompok_upahtenun` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`potongan_d_upahtenun` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`potongan_n_upahtenun` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`potongan_bs_upahtenun` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`status_upahtenun` VARCHAR(2) NULL COLLATE 'latin1_swedish_ci',
	`nama_status_upahtenun` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_masuk
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_masuk` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` DOUBLE NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` INT(11) NULL,
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(9) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_masukkemasan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_masukkemasan` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_masukkemasan_all
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_masukkemasan_all` (
	`id` INT(11) NOT NULL,
	`id_detail` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_proses_sekarang` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_masukkemasan_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_masukkemasan_sub` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_masuk_all
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_masuk_all` (
	`id` INT(11) NOT NULL,
	`id_detail` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` INT(11) NULL,
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(9) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_proses_sekarang` INT(11) NULL,
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_masuk_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_masuk_sub` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` INT(11) NULL,
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(9) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_monitoring
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_monitoring` (
	`nomor` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` INT(100) NOT NULL,
	`id_workorder_barang` INT(100) NOT NULL,
	`id_barangkeluar` INT(11) NULL,
	`tanggal` DATE NOT NULL,
	`jumlah` INT(12) NOT NULL,
	`id_proses` INT(11) NULL,
	`id_proses2` INT(11) NULL,
	`jumlah_beem` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`motif_keterangan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_monitoring_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_monitoring_sub` (
	`nomor` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` INT(100) NOT NULL,
	`id_workorder_barang` INT(100) NOT NULL,
	`id_barangkeluar` INT(11) NULL,
	`tanggal` DATE NOT NULL,
	`jumlah` INT(12) NOT NULL,
	`id_proses` INT(11) NULL,
	`id_proses2` INT(11) NULL,
	`jumlah_beem` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`motif_keterangan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_ms_barang_full
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_ms_barang_full` (
	`id` INT(50) NOT NULL,
	`id_kb` INT(11) NOT NULL,
	`id_warna` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`ukuran_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` INT(11) NOT NULL,
	`ket_barang` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`min_stok` FLOAT NOT NULL,
	`id_akun_pembelian` INT(11) NOT NULL,
	`id_akun_penjualan` INT(11) NOT NULL,
	`id_akun` INT(11) NOT NULL,
	`create_at` TIMESTAMP NOT NULL,
	`update_at` TIMESTAMP NOT NULL,
	`nama` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`inisial` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_kelompok` INT(11) NOT NULL,
	`nama_kelompok` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_kategori` INT(11) NOT NULL,
	`kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_sub_kategori` INT(11) NOT NULL,
	`sub_kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan_pembelian` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan_penjualan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_ms_makelar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_ms_makelar` (
	`id_kelompok` INT(11) NOT NULL,
	`id_rekanan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`nama` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NOT NULL,
	`id_akun_piutang` INT(11) NOT NULL,
	`keterangan` VARCHAR(15) NOT NULL COLLATE 'utf8mb4_unicode_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_mutasi
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_mutasi` (
	`id` INT(255) NOT NULL,
	`id_barang` INT(255) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` TEXT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keluar` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(255) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(20) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_label` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NULL,
	`ket_1` TEXT NULL COLLATE 'latin1_swedish_ci',
	`ket_2` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`ket_3` VARCHAR(117) NULL COLLATE 'latin1_swedish_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_detail` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_kategori` INT(11) NOT NULL,
	`nama_kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_subkategori` INT(11) NOT NULL,
	`nama_subkategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` INT(11) NOT NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_mutasitenun
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_mutasitenun` (
	`id` INT(255) NOT NULL,
	`id_barang` INT(255) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` TEXT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keluar` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(255) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(20) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_label` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NULL,
	`ket_1` TEXT NULL COLLATE 'latin1_swedish_ci',
	`ket_2` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`ket_3` VARCHAR(117) NULL COLLATE 'latin1_swedish_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_detail` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci',
	`lebar` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`panjang` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`pick` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`id_kategori` INT(11) NOT NULL,
	`nama_kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_subkategori` INT(11) NOT NULL,
	`nama_subkategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` INT(11) NOT NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_mutasitenun_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_mutasitenun_sub` (
	`id` INT(255) NOT NULL,
	`id_barang` INT(255) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` TEXT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keluar` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(255) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(20) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_label` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NULL,
	`ket_1` TEXT NULL COLLATE 'latin1_swedish_ci',
	`ket_2` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`ket_3` VARCHAR(117) NULL COLLATE 'latin1_swedish_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_detail` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci',
	`lebar` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`panjang` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`pick` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_opname
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_opname` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(100) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` DOUBLE NULL,
	`keluar` DOUBLE NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(9) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_opnameproduksi
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_opnameproduksi` (
	`id` INT(11) NOT NULL,
	`id_barang` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` BIGINT(11) NULL,
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_1` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_2` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_3` VARCHAR(6) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_awal` INT(1) NOT NULL,
	`nilai_akhir` INT(1) NOT NULL,
	`id_detail` INT(10) NOT NULL,
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_proses_sekarang` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL,
	`id_kategori` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kategori` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`id_subkategori` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_subkategori` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_pegawai` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_pegawai` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_rekanan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_rekanan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_mesin` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_mesin` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_opname_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_opname_sub` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(100) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` DOUBLE NULL,
	`keluar` DOUBLE NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(9) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_orderbeli
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_orderbeli` (
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_order` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_penyedia` INT(100) NOT NULL,
	`termasuk_pajak` INT(11) NOT NULL,
	`nama` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_orderbeli_barang` INT(11) NOT NULL,
	`id_barang` INT(11) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`nilai_ppn` DOUBLE NULL,
	`id_satuan` INT(11) NOT NULL,
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`beli` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`ambil` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_orderbeli_2
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_orderbeli_2` (
	`id_orderbeli` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_order` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_tempo` DATE NULL,
	`id_penyedia` INT(100) NOT NULL,
	`potongan` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`termasuk_pajak` INT(11) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`nominal_ongkir` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan_revisi` TEXT NULL COLLATE 'latin1_swedish_ci',
	`syarat_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tempat_serah` INT(11) NULL,
	`tanggal_serah` DATE NULL,
	`penerima` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nominal_total` DOUBLE NULL,
	`nominal_pajak_detail` DOUBLE NULL,
	`nominal_pajak` DOUBLE NULL,
	`data_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nominal_netto` DOUBLE NULL,
	`nama_penyedia` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tempat_penyerahan` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`alamat` TEXT NULL COLLATE 'latin1_swedish_ci',
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_orderbeli_barang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_orderbeli_barang` (
	`id_orderbeli` INT(100) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_order` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_penyedia` INT(100) NOT NULL,
	`keterangan_revisi` TEXT NULL COLLATE 'latin1_swedish_ci',
	`nama` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_orderbeli_barang` INT(11) NOT NULL,
	`id_barang` INT(11) NOT NULL,
	`keterangan_revisi_brg` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`nilai_ppn` DOUBLE NULL,
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang_konv` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_orderbeli_barang_st_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_orderbeli_barang_st_bayar` (
	`id_orderbeli` INT(100) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_order` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_penyedia` INT(100) NOT NULL,
	`nama` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_orderbeli_barang` INT(11) NOT NULL,
	`id_barang` INT(11) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`nilai_ppn` DOUBLE NULL,
	`nama_satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang_konv` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_kelompok` INT(11) NOT NULL,
	`id_kategori` INT(11) NOT NULL,
	`kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_sub_kategori` INT(11) NOT NULL,
	`sub_kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`satuan` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_netto` DOUBLE NULL,
	`total_bayar` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_orderservice_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_orderservice_bayar` (
	`id` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_nota` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_nota` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nomor_nota` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_nota` DATE NOT NULL,
	`id_penyedia` INT(100) NOT NULL,
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nominal_total` DOUBLE NOT NULL,
	`nominal_pajak` DOUBLE NOT NULL,
	`nominal_netto` DOUBLE NOT NULL,
	`nominal_bayar` DOUBLE NULL,
	`nama_penyedia` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_orderservice_kartu_hutang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_orderservice_kartu_hutang` (
	`id` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_nota` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_nota` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_nota` DATE NOT NULL,
	`id_penyedia` INT(100) NOT NULL,
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nominal_total` DOUBLE NOT NULL,
	`nominal_pajak` DOUBLE NOT NULL,
	`nominal_netto` DOUBLE NOT NULL,
	`nominal_bayar` DOUBLE NULL,
	`nama_penyedia` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_bukti` DATE NULL,
	`no_bukti` VARCHAR(355) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan_bukti` TEXT NULL COLLATE 'latin1_swedish_ci',
	`orderservice` DOUBLE NOT NULL,
	`pembayaran` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_pegawai_bayar_kasbon
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_pegawai_bayar_kasbon` (
	`id_ref` INT(11) NOT NULL,
	`nomor_ref` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_ref` DATE NULL,
	`tanggal` DATE NOT NULL,
	`id_pegawai` INT(11) NOT NULL,
	`tanggal_transaksi` DATE NULL,
	`bayar_kasbon` VARCHAR(20) NULL COLLATE 'latin1_swedish_ci',
	`id_dari_akun` INT(11) NOT NULL,
	`tipe_dari_akun` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_ke_akun` INT(11) NOT NULL,
	`tipe_ke_akun` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`keterangan` VARCHAR(13) NOT NULL COLLATE 'utf8mb4_general_ci',
	`flag` VARCHAR(21) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_pembelian2
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_pembelian2` (
	`id_pembelian` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nomor_faktur` VARCHAR(355) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NULL,
	`id_penyedia` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(19,0) NOT NULL,
	`termasuk_pajak` INT(11) NOT NULL,
	`pajak` INT(11) NOT NULL,
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_ongkir` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`syarat_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tempat_serah` BIGINT(20) NULL,
	`tanggal_serah` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`penerima` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NULL,
	`id_akun_potongan` BIGINT(20) NULL,
	`id_akun_pajak` INT(11) NULL,
	`id_akun_ongkir` BIGINT(20) NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`data_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nominal_total` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nominal_pajak` DOUBLE NULL,
	`nominal_netto` DOUBLE NULL,
	`total_bayar` DOUBLE NULL,
	`nama_penyedia` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`kode_sebagai` BIGINT(20) NOT NULL,
	`sebagai` VARCHAR(16) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_pembelian_2
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_pembelian_2` (
	`id_pembelian` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NULL,
	`id_penyedia` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`termasuk_pajak` INT(11) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_ongkir` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`syarat_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tempat_serah` INT(11) NULL,
	`tanggal_serah` DATE NULL,
	`penerima` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_ongkir` INT(11) NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`data_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nominal_total` DOUBLE NULL,
	`nominal_pajak` DOUBLE NULL,
	`nominal_netto` DOUBLE NULL,
	`nama_penyedia` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tempat_penyerahan` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`alamat` TEXT NULL COLLATE 'latin1_swedish_ci',
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_pembelian_barang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_pembelian_barang` (
	`id_pembelian` INT(100) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_penyedia` INT(100) NOT NULL,
	`nama` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_beli_barang` INT(100) NOT NULL,
	`id_barang` INT(100) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`harga_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`nilai_ppn` DOUBLE NULL,
	`id_satuan` INT(11) NULL,
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jml_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`jml_barang_konv` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_pembelian_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_pembelian_bayar` (
	`id_pembelian` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NULL,
	`id_penyedia` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`termasuk_pajak` INT(11) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_ongkir` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`syarat_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tempat_serah` INT(11) NULL,
	`tanggal_serah` DATE NULL,
	`penerima` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_ongkir` INT(11) NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`data_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nominal_total` DOUBLE NULL,
	`nominal_pajak` DOUBLE NULL,
	`nominal_netto` DOUBLE NULL,
	`total_bayar` DOUBLE NULL,
	`nama_penyedia` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_pembelian_hutang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_pembelian_hutang` (
	`id_pembelian` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NULL,
	`id_penyedia` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`termasuk_pajak` INT(11) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`total_bayar_hutang` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_pembelian_kartu_hutang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_pembelian_kartu_hutang` (
	`id_pembelian` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NULL,
	`id_penyedia` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(19,0) NOT NULL,
	`termasuk_pajak` INT(11) NOT NULL,
	`pajak` INT(11) NOT NULL,
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_ongkir` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`syarat_bayar` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tempat_serah` BIGINT(20) NULL,
	`tanggal_serah` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`penerima` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_akun_hutang` INT(11) NULL,
	`id_akun_potongan` BIGINT(20) NULL,
	`id_akun_pajak` INT(11) NULL,
	`id_akun_ongkir` BIGINT(20) NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`data_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nominal_total` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nominal_pajak` DOUBLE NULL,
	`nominal_netto` DOUBLE NULL,
	`total_bayar` DOUBLE NULL,
	`nama_penyedia` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`kode_sebagai` BIGINT(20) NOT NULL,
	`sebagai` VARCHAR(16) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_bukti` DATE NULL,
	`no_bukti` VARCHAR(355) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan_bukti` TEXT NULL COLLATE 'latin1_swedish_ci',
	`pembelian` DOUBLE NOT NULL,
	`pembayaran` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penerimaan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penerimaan` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` DOUBLE NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NULL,
	`id_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_komposisi` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` BIGINT(11) NULL,
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_motif` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_dudul` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasansepuluh` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasanseratus` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_cap` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_periksa` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perubahansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`jumlah_rencana` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penerimaan_all
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penerimaan_all` (
	`id` INT(100) NOT NULL,
	`id_penerimaan` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_komposisi` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_awal` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_akhir` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` BIGINT(11) NULL,
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_motif` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_dudul` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasansepuluh` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasanseratus` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_cap` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_periksa` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perubahansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`jumlah_rencana` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penerimaan_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penerimaan_sub` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NULL,
	`id_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_komposisi` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_awal` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_akhir` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` BIGINT(11) NULL,
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_motif` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_dudul` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasansepuluh` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasanseratus` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_cap` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_periksa` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perubahansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`jumlah_rencana` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_akhir` DATETIME NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penggunaanbarang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penggunaanbarang` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(11) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` TEXT NULL COLLATE 'latin1_swedish_ci',
	`masuk` INT(1) NOT NULL,
	`keluar` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_komposisi` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` INT(11) NULL,
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_motif` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_dudul` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasansepuluh` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kemasanseratus` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_cap` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas_periksa` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_perubahansatuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahan_satuan` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`jumlah_rencana` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penggunaan_produksi
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penggunaan_produksi` (
	`id` INT(11) NOT NULL,
	`id_lokasi` INT(11) NOT NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NULL,
	`id_barang` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` INT(11) NOT NULL,
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_barangkeluar` VARCHAR(50) NULL COLLATE 'utf8mb4_general_ci',
	`nama_barangkeluar` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlahkeluar` VARCHAR(25) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_satuankeluar` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuankeluar` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`is_aktif` INT(11) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penjualan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penjualan` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`keluar` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` INT(11) NOT NULL,
	`nama_proses` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penjualan2
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penjualan2` (
	`id_penjualan` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`mata_uang` BIGINT(20) NOT NULL,
	`nominal_potongan` DECIMAL(19,0) NOT NULL,
	`pajak` INT(11) NOT NULL,
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`status_kirim` BIGINT(20) NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_surat` VARCHAR(10) NULL COLLATE 'utf8mb4_unicode_ci',
	`no_surat` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_surat` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keterangan_surat` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_piutang` INT(11) NULL,
	`id_akun_potongan` BIGINT(20) NULL,
	`id_akun_pajak` INT(11) NULL,
	`id_akun_penjualan` INT(11) NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nominal_total` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nominal_pajak` DOUBLE NULL,
	`nominal_netto` DOUBLE NULL,
	`total_bayar` DOUBLE NULL,
	`nama_pelanggan` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`kode_sebagai` BIGINT(20) NOT NULL,
	`sebagai` VARCHAR(17) NOT NULL COLLATE 'utf8mb4_unicode_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penjualan_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penjualan_bayar` (
	`id_penjualan` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`mata_uang` BIGINT(20) NOT NULL,
	`nominal_potongan` DECIMAL(19,0) NOT NULL,
	`pajak` INT(11) NOT NULL,
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`status_kirim` BIGINT(20) NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_surat` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`no_surat` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_surat` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keterangan_surat` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_piutang` INT(11) NULL,
	`id_akun_potongan` BIGINT(20) NULL,
	`id_akun_pajak` INT(11) NULL,
	`id_akun_penjualan` INT(11) NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nominal_total` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nominal_pajak` DOUBLE NULL,
	`nominal_netto` DOUBLE NULL,
	`total_bayar` DOUBLE NULL,
	`nama_pelanggan` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`kode_sebagai` BIGINT(20) NOT NULL,
	`sebagai` VARCHAR(17) NOT NULL COLLATE 'utf8mb4_general_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penjualan_hutang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penjualan_hutang` (
	`id_penjualan` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(11,0) NOT NULL,
	`pajak` INT(1) NOT NULL COMMENT '1=iya,0=tidak',
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`status_kirim` INT(1) NOT NULL,
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_piutang` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_potongan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_pajak` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`id_akun_penjualan` INT(11) NULL COMMENT 'ms_ref_jurnal => kode',
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nama` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tgl` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`tgl_faktur` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`tgl_tempo` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jualbayar` INT(0) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penjualan_kartu_hutang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penjualan_kartu_hutang` (
	`id_penjualan` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(19,0) NOT NULL,
	`pajak` INT(11) NOT NULL,
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_piutang` INT(11) NULL,
	`id_akun_potongan` BIGINT(20) NULL,
	`id_akun_pajak` INT(11) NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nominal_total` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nominal_pajak` DOUBLE NULL,
	`nominal_netto` DOUBLE NULL,
	`total_bayar` DOUBLE NULL,
	`nama_pelanggan` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_bukti` DATE NULL,
	`no_bukti` VARCHAR(355) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan_bukti` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`penjualan` DOUBLE NOT NULL,
	`pembayaran` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penjualan_kartu_piutang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penjualan_kartu_piutang` (
	`id_penjualan` INT(100) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_faktur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_faktur` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_faktur` DATE NOT NULL,
	`tanggal_tempo` DATE NOT NULL,
	`id_pelanggan` INT(100) NOT NULL,
	`nominal_potongan` DECIMAL(19,0) NOT NULL,
	`pajak` INT(11) NOT NULL,
	`no_faktur_pajak` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_piutang` INT(11) NULL,
	`id_akun_potongan` BIGINT(20) NULL,
	`id_akun_pajak` INT(11) NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nominal_total` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`nominal_pajak` DOUBLE NULL,
	`nominal_netto` DOUBLE NULL,
	`total_bayar` DOUBLE NULL,
	`nama_pelanggan` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_bukti` DATE NULL,
	`no_bukti` VARCHAR(355) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan_bukti` TEXT NULL COLLATE 'latin1_swedish_ci',
	`penjualan` DOUBLE NOT NULL,
	`pembayaran` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`mata_uang` BIGINT(20) NULL,
	`kurs_jual` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penjualan_retur
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penjualan_retur` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`keluar` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` INT(11) NOT NULL,
	`nama_proses` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_workorder` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_kualitas` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_penjualan_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_penjualan_sub` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` INT(1) NOT NULL,
	`keluar` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` INT(11) NOT NULL,
	`nama_proses` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(9) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_rekanan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_rekanan` (
	`id_barangkeluar` INT(11) NOT NULL,
	`tanggal` DATE NOT NULL,
	`id_rekanan` INT(11) NOT NULL,
	`id_pegawai` INT(11) NOT NULL,
	`id_mesin` INT(11) NOT NULL,
	`id_proses` INT(11) NOT NULL,
	`id_proses_sebelum` INT(11) NOT NULL,
	`id_workorder` INT(100) NOT NULL,
	`id_workorder_barang` INT(100) NOT NULL,
	`id_lokasi` INT(100) NOT NULL,
	`tanggal_perkiraan` DATE NOT NULL,
	`jumlah` CHAR(12) NOT NULL COLLATE 'latin1_swedish_ci',
	`status` INT(12) NOT NULL,
	`status_beem` INT(11) NOT NULL,
	`tanggal_beem` DATE NULL,
	`status_workorder` INT(11) NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`update_at` TIMESTAMP NOT NULL,
	`noAuto` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_rekanan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_pegawai` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jum_keluar` DOUBLE NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_rekanan_kemasan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_rekanan_kemasan` (
	`id_barangkeluar_kemasan` INT(11) NOT NULL,
	`tanggal` DATE NOT NULL,
	`tanggal_perkiraan` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_pegawai` INT(11) NOT NULL,
	`nama_pegawai` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_rekanan` INT(11) NOT NULL,
	`nama_rekanan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` INT(11) NOT NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_retur_tagihan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_retur_tagihan` (
	`id_rtp` INT(11) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_retur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_retur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_retur` DATE NOT NULL,
	`id_pelanggan` INT(11) NOT NULL,
	`id_penjualan` INT(11) NOT NULL,
	`mata_uang` INT(11) NOT NULL,
	`kurs` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nominal_retur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun` INT(11) NOT NULL,
	`tipe_akun` VARCHAR(1) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`kode_sebagai` BIGINT(20) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_retur_tagihan_bypelanggan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_retur_tagihan_bypelanggan` (
	`id_rtp` INT(11) NOT NULL,
	`lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`cv` INT(11) NOT NULL,
	`no_retur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`sufix_no_retur` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`tanggal_retur` DATE NOT NULL,
	`id_pelanggan` INT(11) NOT NULL,
	`id_penjualan` INT(11) NOT NULL,
	`mata_uang` INT(11) NOT NULL,
	`kurs` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`total_retur` DOUBLE NULL,
	`id_akun` INT(11) NOT NULL,
	`tipe_akun` VARCHAR(1) NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`kode_sebagai` INT(1) NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_rubahspk
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_rubahspk` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`keluar` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_rubahspk_keluar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_rubahspk_keluar` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` INT(1) NOT NULL,
	`keluar` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_rubahspk_masuk
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_rubahspk_masuk` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_saldoawal
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_saldoawal` (
	`id` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`level` INT(12) NOT NULL,
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`used` INT(100) NOT NULL,
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`locked` INT(100) NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`id_tanggal_saldo` BIGINT(11) NULL,
	`tanggal_awal` DATE NULL,
	`tanggal_akhir` DATE NULL,
	`tahun` INT(4) UNSIGNED NULL,
	`id_saldoawal` INT(100) NOT NULL,
	`id_perkiraan` INT(100) NOT NULL,
	`nominal` DOUBLE NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_saldoawal_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_saldoawal_sub` (
	`id` INT(100) NOT NULL,
	`kd_rek_1` INT(100) NOT NULL,
	`kode_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`level` INT(12) NOT NULL,
	`saldo_normal` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`used` INT(100) NOT NULL,
	`parent` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`locked` INT(100) NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`id_tanggal_saldo` BIGINT(11) NULL,
	`tanggal_awal` DATE NULL,
	`tanggal_akhir` DATE NULL,
	`tahun` INT(4) UNSIGNED NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_semua_workorder
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_semua_workorder` (
	`id_workorder` INT(100) NOT NULL,
	`nomor` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` INT(100) NOT NULL,
	`no_workorder` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_sewa_bayar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_sewa_bayar` (
	`id_sewa` INT(11) NOT NULL,
	`id_lokasi` INT(11) NOT NULL,
	`user_id_create` INT(11) NOT NULL,
	`user_id_update` INT(11) NOT NULL,
	`no_faktur` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_faktur` DATE NOT NULL,
	`tahun` INT(3) NOT NULL,
	`harga_per_tahun` VARCHAR(25) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_awal` DATE NOT NULL,
	`tanggal_akhir` DATE NOT NULL,
	`id_penyedia` INT(11) NOT NULL,
	`fungsi` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jenis` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`alamat` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci',
	`costing` VARCHAR(35) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_akun_sewa` INT(11) NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`updated_at` TIMESTAMP NOT NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nominal_total` DOUBLE NOT NULL,
	`total_bayar` DOUBLE NULL,
	`nama_penyedia` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`pic` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_sub_mutasi
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_sub_mutasi` (
	`id` INT(255) NOT NULL,
	`id_barang` INT(255) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` TEXT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keluar` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(255) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(20) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_label` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NULL,
	`ket_1` TEXT NULL COLLATE 'latin1_swedish_ci',
	`ket_2` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`ket_3` VARCHAR(117) NULL COLLATE 'latin1_swedish_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_detail` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_tenun_barangmasuk
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_tenun_barangmasuk` (
	`id_barangkeluar` INT(11) NOT NULL,
	`id_workorder` INT(100) NOT NULL,
	`id_workorder_barang` INT(100) NOT NULL,
	`no_workorder` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_motif` INT(100) NOT NULL,
	`nama_motif` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_transaksi
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_transaksi` (
	`lokasi` INT(11) NOT NULL,
	`tanggal_transaksi` DATE NULL,
	`no_bukti` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`id_akun` INT(100) NULL,
	`kode_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tipe_id_akun` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`kode_perkiraan_dariakun` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan_dariakun` VARCHAR(301) NULL COLLATE 'latin1_swedish_ci',
	`kode_perkiraan_keakun` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_perkiraan_keakun` VARCHAR(301) NULL COLLATE 'latin1_swedish_ci',
	`nominal_transaksi` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keterangan` TEXT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_transfer
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_transfer` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` DOUBLE NULL,
	`keluar` DOUBLE NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_transferkeluar
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_transferkeluar` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` INT(1) NOT NULL,
	`keluar` DOUBLE NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_transferkeluar_all
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_transferkeluar_all` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` CHAR(12) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` INT(1) NOT NULL,
	`keluar` CHAR(12) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_transferkeluar_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_transferkeluar_sub` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` CHAR(12) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` INT(1) NOT NULL,
	`keluar` CHAR(12) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_transfermasuk
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_transfermasuk` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` DOUBLE NULL,
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_transfermasuk_all
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_transfermasuk_all` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` CHAR(12) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` CHAR(12) NOT NULL COLLATE 'latin1_swedish_ci',
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`keterangan` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_transfermasuk_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_transfermasuk_sub` (
	`id` INT(100) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jum_barang` CHAR(12) NOT NULL COLLATE 'latin1_swedish_ci',
	`masuk` CHAR(12) NOT NULL COLLATE 'latin1_swedish_ci',
	`keluar` INT(1) NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_upah_harian
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_upah_harian` (
	`id_upah_harian` INT(11) NOT NULL,
	`no_transaksi` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_transaksi` DATE NOT NULL,
	`id_pegawai` INT(11) NOT NULL,
	`nomor_pegawai` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_pegawai` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`bagian` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi_produksi` INT(11) NOT NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`hari_normal` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`absen_hari` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`hari_kerja` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`upah_perhari` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah_jam_lembur` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`upah_lembur_jam` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah_hari_lembur` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`upah_lembur_hari` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah_jam_um_lembur` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`um_lembur_jam` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah_hari_um_lembur` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`um_lembur_hari` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah_hari_um_desa` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`um_desa` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah_hari_um_kediri` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`um_kediri` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah_jam_keterlambatan` VARCHAR(5) NOT NULL COLLATE 'latin1_swedish_ci',
	`potongan_keterlambatan` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`potongan_kas_bon` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`pembulatan` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`upah_terima` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
	`created_at` DATETIME NOT NULL
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_workorderbarang
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_workorderbarang` (
	`id_workorder_barang` INT(100) NOT NULL,
	`id_workorder` INT(100) NOT NULL,
	`no_workorder` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`motif` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal_celup` DATE NOT NULL,
	`hb` DATE NOT NULL,
	`jumlah_beem` INT(12) NOT NULL,
	`dasar` INT(100) NOT NULL,
	`dasar2` INT(100) NOT NULL,
	`dasar3` INT(100) NOT NULL,
	`streep` INT(100) NOT NULL,
	`kombinasi1` INT(100) NOT NULL,
	`kombinasi2` INT(100) NOT NULL,
	`kombinasi3` INT(100) NOT NULL,
	`kluwungan1` INT(100) NOT NULL,
	`kluwungan2` INT(100) NOT NULL,
	`kluwungan3` INT(100) NOT NULL,
	`kluwungan4` INT(100) NOT NULL,
	`timbulan1` INT(100) NOT NULL,
	`timbulan2` INT(100) NOT NULL,
	`timbulan3` INT(100) NOT NULL,
	`songketan1` INT(100) NOT NULL,
	`songketan2` INT(100) NOT NULL,
	`songketan3` INT(100) NOT NULL,
	`songketan4` INT(100) NOT NULL,
	`pancingan1` INT(100) NOT NULL,
	`pancingan2` INT(100) NOT NULL,
	`gunungan1_atas` INT(100) NOT NULL,
	`gunungan2_atas` INT(100) NOT NULL,
	`gunungan3_atas` INT(100) NOT NULL,
	`gunungan1_bawah` INT(100) NOT NULL,
	`gunungan2_bawah` INT(100) NOT NULL,
	`gunungan3_bawah` INT(100) NOT NULL,
	`garis1` INT(100) NOT NULL,
	`garis2` INT(100) NOT NULL,
	`beem` DATE NOT NULL,
	`pakan` DATE NOT NULL,
	`created_at` TIMESTAMP NOT NULL,
	`update_at` TIMESTAMP NOT NULL,
	`id_komposisi` INT(100) NOT NULL,
	`nama_komposisi` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_barang` INT(50) NOT NULL,
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`inisial` VARCHAR(25) NOT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.view_workorder_ket
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `view_workorder_ket` (
	`id` INT(11) NOT NULL,
	`id_barangkeluar` INT(11) NOT NULL,
	`id_workorder` INT(100) NOT NULL,
	`nomor` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_workorder_ket` INT(100) NOT NULL,
	`id_motif_barang` INT(100) NULL,
	`motif_keterangan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` FLOAT NOT NULL,
	`id_komposisi` INT(100) NULL,
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.v_mutasi
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `v_mutasi` (
	`id` INT(255) NOT NULL,
	`id_barang` INT(255) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` TEXT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keluar` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(255) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(20) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_label` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NULL,
	`ket_1` TEXT NULL COLLATE 'latin1_swedish_ci',
	`ket_2` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`ket_3` VARCHAR(120) NULL COLLATE 'latin1_swedish_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` DOUBLE NULL,
	`nilai_akhir` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`id_detail` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_kategori` INT(11) NOT NULL,
	`nama_kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_subkategori` INT(11) NOT NULL,
	`nama_subkategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` INT(11) NOT NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.v_mutasi_
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `v_mutasi_` (
	`id` INT(255) NOT NULL,
	`id_barang` INT(255) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` TEXT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keluar` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(255) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(20) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_label` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NULL,
	`ket_1` TEXT NULL COLLATE 'latin1_swedish_ci',
	`ket_2` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`ket_3` VARCHAR(120) NULL COLLATE 'latin1_swedish_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` DOUBLE NULL,
	`nilai_akhir` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`id_detail` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.v_mutasi_base
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `v_mutasi_base` (
	`id` INT(255) NOT NULL,
	`id_barang` INT(255) NULL,
	`kode_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`jumlah` TEXT NULL COLLATE 'latin1_swedish_ci',
	`masuk` VARCHAR(255) NULL COLLATE 'latin1_swedish_ci',
	`keluar` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_gudang` INT(255) NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` VARCHAR(10) NULL COLLATE 'utf8mb4_general_ci',
	`id_proses` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(20) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_label` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(255) NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(23) NULL COLLATE 'utf8mb4_general_ci',
	`tanggal_full` DATETIME NULL,
	`ket_1` TEXT NULL COLLATE 'latin1_swedish_ci',
	`ket_2` VARCHAR(200) NULL COLLATE 'latin1_swedish_ci',
	`ket_3` VARCHAR(120) NULL COLLATE 'latin1_swedish_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` TEXT NOT NULL COLLATE 'latin1_swedish_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_detail` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.v_produksi
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `v_produksi` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` DOUBLE NULL,
	`keluar` DOUBLE NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NULL COLLATE 'utf8mb4_general_ci',
	`ket_1` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_2` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_3` VARCHAR(13) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_awal` DOUBLE NULL,
	`nilai_akhir` DOUBLE NULL,
	`id_detail` INT(11) NOT NULL,
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_proses_sekarang` INT(11) NULL,
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL,
	`id_kategori` INT(11) NOT NULL,
	`nama_kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_subkategori` INT(11) NOT NULL,
	`nama_subkategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` INT(11) NOT NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_pegawai` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_pegawai` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_rekanan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_rekanan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_mesin` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_mesin` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.v_produksi_kemasan
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `v_produksi_kemasan` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_1` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_2` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_3` VARCHAR(13) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_detail` INT(11) NOT NULL,
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_proses_sekarang` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL,
	`id_kategori` INT(11) NOT NULL,
	`nama_kategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_subkategori` INT(11) NOT NULL,
	`nama_subkategori` VARCHAR(200) NOT NULL COLLATE 'latin1_swedish_ci',
	`id_lokasi` INT(11) NOT NULL,
	`nama_lokasi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_pegawai` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_pegawai` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_rekanan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_rekanan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.v_produksi_kemasan_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `v_produksi_kemasan_sub` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NOT NULL,
	`masuk` DOUBLE NOT NULL,
	`keluar` DOUBLE NOT NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_1` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_2` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_3` VARCHAR(13) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_awal` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_akhir` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_detail` INT(11) NOT NULL,
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_proses_sekarang` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL,
	`id_pegawai` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_pegawai` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_rekanan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_rekanan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.v_produksi_sub
-- Membuat tabel sementara untuk menangani kesalahan ketergantungan VIEW
CREATE TABLE `v_produksi_sub` (
	`id` INT(11) NOT NULL,
	`id_barang` INT(50) NOT NULL,
	`kode_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`nama_barang` VARCHAR(100) NOT NULL COLLATE 'latin1_swedish_ci',
	`jumlah` DOUBLE NULL,
	`masuk` DOUBLE NULL,
	`keluar` DOUBLE NULL,
	`id_gudang` INT(11) NOT NULL,
	`nama_gudang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal` DATE NOT NULL,
	`id_proses` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_komposisi` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_komposisi` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_satuan` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_satuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`id_corak` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_corak` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_motif` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_motif` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_workorder_barang` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`no_workorder_barang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_dudul` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`kualitas_dudul` VARCHAR(5) NOT NULL COLLATE 'utf8mb4_general_ci',
	`id_label` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_label` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansatuan` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansatuan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasansepuluh` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasansepuluh` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kemasanseratus` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_kemasanseratus` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_cap` VARCHAR(11) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nama_cap` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_proses` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_proses` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_kualitas_periksa` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_kualitas_periksa` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_perubahansatuan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_perubahansatuan` VARCHAR(50) NULL COLLATE 'latin1_swedish_ci',
	`jumlah_rencana` VARCHAR(22) NULL COLLATE 'utf8mb4_general_ci',
	`ket_1` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_2` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_3` VARCHAR(13) NOT NULL COLLATE 'utf8mb4_general_ci',
	`ket_4` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`ket_5` CHAR(0) NOT NULL COLLATE 'utf8mb4_general_ci',
	`nilai_awal` DOUBLE NULL,
	`nilai_akhir` DOUBLE NULL,
	`id_detail` INT(11) NOT NULL,
	`id_warna` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_warna` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`inisial_warna` VARCHAR(25) NULL COLLATE 'latin1_swedish_ci',
	`ket_proses` TEXT NULL COLLATE 'latin1_swedish_ci',
	`id_proses_sekarang` INT(11) NULL,
	`nama_proses_sekarang` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`tanggal_full` DATETIME NOT NULL,
	`id_pegawai` VARCHAR(100) NULL COLLATE 'utf8mb4_general_ci',
	`nama_pegawai` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_rekanan` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_rekanan` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci',
	`id_mesin` VARCHAR(11) NULL COLLATE 'utf8mb4_general_ci',
	`nama_mesin` VARCHAR(100) NULL COLLATE 'latin1_swedish_ci'
) ENGINE=MyISAM;

-- membuang struktur untuk view si_sarung.a_keu_bop
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_keu_bop`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_keu_bop` AS select `keu_bop_detail`.`id_bop` AS `id_bop`,sum(`keu_bop_detail`.`nominal`) AS `total_nominal`,sum(`keu_bop_detail`.`nominal_realisasi`) AS `total_realisasi` from `keu_bop_detail` group by `keu_bop_detail`.`id_bop`;

-- membuang struktur untuk view si_sarung.a_keu_jurnal_lain
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_keu_jurnal_lain`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_keu_jurnal_lain` AS select `keu_jurnal_lain_detail`.`id_jurnal_lain` AS `id_jurnal_lain`,sum(`keu_jurnal_lain_detail`.`debet`) AS `total_debet`,sum(`keu_jurnal_lain_detail`.`kredit`) AS `total_kredit` from `keu_jurnal_lain_detail` group by `keu_jurnal_lain_detail`.`id_jurnal_lain`;

-- membuang struktur untuk view si_sarung.a_pem_orderbeli
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pem_orderbeli`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pem_orderbeli` AS select `p`.`id_orderbeli` AS `id_orderbeli`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_faktur` AS `no_faktur`,`p`.`sufix_no_order` AS `sufix_no_order`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_tempo` AS `tanggal_tempo`,`p`.`id_penyedia` AS `id_penyedia`,`p`.`potongan` AS `potongan`,`p`.`termasuk_pajak` AS `termasuk_pajak`,`p`.`pajak` AS `pajak`,`p`.`nominal_ongkir` AS `nominal_ongkir`,`p`.`status` AS `status`,`p`.`keterangan` AS `keterangan`,`p`.`keterangan_revisi` AS `keterangan_revisi`,`p`.`syarat_bayar` AS `syarat_bayar`,`p`.`tempat_serah` AS `tempat_serah`,`p`.`tanggal_serah` AS `tanggal_serah`,`p`.`penerima` AS `penerima`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`d`.`nominal_total` AS `nominal_total`,`d`.`nominal_ppn` AS `nominal_pajak_detail`,(case when (`p`.`pajak` = 1) then ((10 * (`d`.`nominal_total` - `p`.`potongan`)) / 100) else 0 end) AS `nominal_pajak`,`l`.`nama_lokasi` AS `data_lokasi` from ((`pem_orderbeli` `p` join `a_total_pem_orderbeli_detail` `d` on((`d`.`id_orderbeli` = `p`.`id_orderbeli`))) join `ms_lokasi_produksi` `l` on((`l`.`id_lokasi` = `p`.`lokasi`)));

-- membuang struktur untuk view si_sarung.a_pem_pembelian
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pem_pembelian`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pem_pembelian` AS select `p`.`id_pembelian` AS `id_pembelian`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_faktur` AS `no_faktur`,`p`.`sufix_no_faktur` AS `sufix_no_faktur`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_faktur` AS `tanggal_faktur`,`p`.`tanggal_tempo` AS `tanggal_tempo`,`p`.`id_penyedia` AS `id_penyedia`,`p`.`nominal_potongan` AS `nominal_potongan`,`p`.`termasuk_pajak` AS `termasuk_pajak`,`p`.`pajak` AS `pajak`,`p`.`no_faktur_pajak` AS `no_faktur_pajak`,`p`.`nominal_ongkir` AS `nominal_ongkir`,`p`.`status` AS `status`,`p`.`keterangan` AS `keterangan`,`p`.`syarat_bayar` AS `syarat_bayar`,`p`.`tempat_serah` AS `tempat_serah`,`p`.`tanggal_serah` AS `tanggal_serah`,`p`.`penerima` AS `penerima`,`p`.`id_akun_hutang` AS `id_akun_hutang`,`p`.`id_akun_potongan` AS `id_akun_potongan`,`p`.`id_akun_pajak` AS `id_akun_pajak`,`p`.`id_akun_ongkir` AS `id_akun_ongkir`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`l`.`nama_lokasi` AS `data_lokasi`,`d`.`nominal_total` AS `nominal_total`,(case when (`p`.`pajak` = 1) then ((`d`.`nominal_total` - `p`.`nominal_potongan`) / 10) else 0 end) AS `nominal_pajak` from ((`pem_pembelian` `p` join `a_total_pem_pembelian_detail` `d` on((`d`.`id_pembelian` = `p`.`id_pembelian`))) join `ms_lokasi_produksi` `l` on((`l`.`id_lokasi` = `p`.`lokasi`)));

-- membuang struktur untuk view si_sarung.a_pem_sewa
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pem_sewa`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pem_sewa` AS select `s`.`id` AS `id_sewa`,`s`.`id_lokasi` AS `id_lokasi`,`l`.`nama_lokasi` AS `nama_lokasi`,`s`.`user_id_create` AS `user_id_create`,`s`.`user_id_update` AS `user_id_update`,`s`.`no_faktur` AS `no_faktur`,`s`.`tanggal_faktur` AS `tanggal_faktur`,`s`.`tahun` AS `tahun`,`s`.`harga_per_tahun` AS `harga_per_tahun`,`s`.`tgl_awal` AS `tanggal_awal`,`s`.`tgl_akhir` AS `tanggal_akhir`,`s`.`id_penyedia` AS `id_penyedia`,`s`.`fungsi` AS `fungsi`,`s`.`jenis` AS `jenis`,`s`.`alamat` AS `alamat`,`s`.`keterangan` AS `keterangan`,`s`.`costing` AS `costing`,`s`.`id_akun_sewa` AS `id_akun_sewa`,`s`.`created_at` AS `created_at`,`s`.`updated_at` AS `updated_at`,`t`.`nominal_total` AS `nominal_total` from ((`pem_sewa` `s` join `a_total_pem_sewa` `t` on((`t`.`id_sewa` = `s`.`id`))) join `ms_lokasi_produksi` `l` on((`l`.`id_lokasi` = `s`.`id_lokasi`)));

-- membuang struktur untuk view si_sarung.a_pen_penjualan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pen_penjualan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pen_penjualan` AS select `p`.`id_penjualan` AS `id_penjualan`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_faktur` AS `no_faktur`,`p`.`sufix_no_faktur` AS `sufix_no_faktur`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_faktur` AS `tanggal_faktur`,`p`.`tanggal_tempo` AS `tanggal_tempo`,`p`.`tanggal_full` AS `tanggal_full`,`p`.`id_pelanggan` AS `id_pelanggan`,`p`.`nominal_potongan` AS `nominal_potongan`,`p`.`pajak` AS `pajak`,`p`.`no_faktur_pajak` AS `no_faktur_pajak`,`p`.`status` AS `status`,`p`.`status_kirim` AS `status_kirim`,`p`.`keterangan` AS `keterangan`,`p`.`mata_uang` AS `mata_uang`,`p`.`kurs_jual` AS `kurs_jual`,`p`.`kurs_bayar` AS `kurs_bayar`,`p`.`tanggal_surat` AS `tanggal_surat`,`p`.`no_surat` AS `no_surat`,`p`.`sufix_no_surat` AS `sufix_no_surat`,`p`.`keterangan_surat` AS `keterangan_surat`,`p`.`id_akun_piutang` AS `id_akun_piutang`,`p`.`id_akun_potongan` AS `id_akun_potongan`,`p`.`id_akun_pajak` AS `id_akun_pajak`,`p`.`id_akun_penjualan` AS `id_akun_penjualan`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`d`.`total_barang` AS `total_barang`,`d`.`nominal_total` AS `nominal_total`,(case when (`p`.`pajak` = 1) then ((`d`.`total` - `p`.`nominal_potongan`) / 10) else 0 end) AS `nominal_pajak` from (`pen_penjualan` `p` join `a_total_pen_penjualan_detail` `d` on((`d`.`id_penjualan` = `p`.`id_penjualan`)));

-- membuang struktur untuk view si_sarung.a_pen_penjualan_retur
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pen_penjualan_retur`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pen_penjualan_retur` AS select `re`.`id` AS `id`,`re`.`lokasi` AS `lokasi`,`re`.`user_id_create` AS `user_id_create`,`re`.`user_id_update` AS `user_id_update`,`re`.`cv` AS `cv`,`re`.`no_retur` AS `no_retur`,`re`.`sufix_no_retur` AS `sufix_no_retur`,`re`.`tanggal` AS `tanggal`,`re`.`tanggal_retur` AS `tanggal_retur`,`re`.`tanggal_full` AS `tanggal_full`,`re`.`id_pelanggan` AS `id_pelanggan`,`re`.`id_penjualan` AS `id_penjualan`,`re`.`nominal_potongan` AS `nominal_potongan`,`re`.`pajak` AS `pajak`,`re`.`no_faktur_pajak` AS `no_faktur_pajak`,`re`.`status` AS `status`,`re`.`keterangan` AS `keterangan`,`re`.`mata_uang` AS `mata_uang`,`re`.`kurs_jual` AS `kurs_jual`,`re`.`kurs_bayar` AS `kurs_bayar`,`re`.`id_akun_piutang` AS `id_akun_piutang`,`re`.`id_akun_potongan` AS `id_akun_potongan`,`re`.`id_akun_pajak` AS `id_akun_pajak`,`re`.`id_akun_retur_penjualan` AS `id_akun_retur_penjualan`,`re`.`created_at` AS `created_at`,`re`.`updated_at` AS `updated_at`,`red`.`total_barang` AS `total_barang`,`red`.`nominal_total` AS `nominal_total`,(case when (`re`.`pajak` = 1) then ((`red`.`nominal_total` - `re`.`nominal_potongan`) / 10) else 0 end) AS `nominal_pajak` from (`pen_penjualan_retur` `re` join `a_total_pen_penjualan_retur_detail` `red` on((`red`.`id_penjualan_retur` = `re`.`id`)));

-- membuang struktur untuk view si_sarung.a_pen_penjualan_retur_barang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pen_penjualan_retur_barang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pen_penjualan_retur_barang` AS select `pb`.`id_jual_barang` AS `id_jual_barang`,`pb`.`id_penjualan` AS `id_penjualan`,`pb`.`id_barang` AS `id_barang`,`pb`.`nama_barang` AS `nama_barang`,`pb`.`id_gudang` AS `id_gudang`,`pb`.`jml_barang` AS `jml_barang`,`pb`.`jml_barang_konv` AS `jml_barang_konv`,`pb`.`harga_satuan` AS `harga_satuan`,`pb`.`potongan` AS `potongan`,`pb`.`total` AS `total`,`pb`.`status` AS `status`,`pb`.`id_satuan` AS `id_satuan`,`pb`.`jumlah` AS `jumlah`,`pb`.`jumlah_konversi` AS `jumlah_konversi`,`pb`.`id_workorder` AS `id_workorder`,`pb`.`id_workorder_barang` AS `id_workorder_barang`,`pb`.`id_komposisi` AS `id_komposisi`,`pb`.`id_proses` AS `id_proses`,`pb`.`id_kualitas` AS `id_kualitas`,`pb`.`id_motif_barang` AS `id_motif_barang`,`pb`.`id_motif` AS `id_motif`,`pb`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`pb`.`id_label` AS `id_label`,`pb`.`id_kemasan` AS `id_kemasan`,`pb`.`id_kemasansatuan` AS `id_kemasansatuan`,`pb`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`pb`.`id_kemasanseratus` AS `id_kemasanseratus`,`pb`.`id_plat` AS `id_plat`,`pb`.`id_cap` AS `id_cap`,`pb`.`id_kualitas_proses` AS `id_kualitas_proses`,`pb`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`pb`.`id_perubahansatuan` AS `id_perubahansatuan`,`pb`.`jumlah_rencana` AS `jumlah_rencana`,`pb`.`created_at` AS `created_at`,`pb`.`update_at` AS `update_at`,`reb`.`id` AS `id`,`reb`.`id_penjualan_retur` AS `id_penjualan_retur`,`reb`.`id_penjualan_barang` AS `id_penjualan_barang`,`reb`.`jml_retur` AS `jml_retur`,(`reb`.`jml_retur` * (`pb`.`harga_satuan` - `pb`.`potongan`)) AS `total_retur` from (`pen_penjualan_barang` `pb` join `pen_penjualan_retur_barang` `reb` on((`reb`.`id_penjualan_barang` = `pb`.`id_jual_barang`)));

-- membuang struktur untuk view si_sarung.a_pen_penjualan_retur_barang_nonfaktur
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pen_penjualan_retur_barang_nonfaktur`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pen_penjualan_retur_barang_nonfaktur` AS select `reb`.`id` AS `id`,`reb`.`id_retur_nonfaktur` AS `id_penjualan_retur`,`reb`.`id_barang` AS `id_barang`,`reb`.`jml_retur` AS `jml_retur`,(`reb`.`jml_retur` * (`reb`.`harga_satuan` - `reb`.`potongan`)) AS `total_retur` from `pen_penjualan_retur_barang_nonfaktur` `reb`;

-- membuang struktur untuk view si_sarung.a_pen_penjualan_retur_groupby_penjualan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pen_penjualan_retur_groupby_penjualan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pen_penjualan_retur_groupby_penjualan` AS select `re`.`id_penjualan` AS `id_penjualan`,`re`.`mata_uang` AS `mata_uang`,`re`.`kurs_jual` AS `kurs_jual`,`re`.`kurs_bayar` AS `kurs_bayar`,sum(`red`.`total_barang`) AS `total_barang`,sum(`red`.`nominal_total`) AS `nominal_total`,(case when (`re`.`pajak` = 1) then sum(((`red`.`nominal_total` - `re`.`nominal_potongan`) / 10)) else 0 end) AS `nominal_pajak` from (`pen_penjualan_retur` `re` join `a_total_pen_penjualan_retur_detail` `red` on((`red`.`id_penjualan_retur` = `re`.`id`))) group by `re`.`id_penjualan`;

-- membuang struktur untuk view si_sarung.a_pen_penjualan_retur_nonfaktur
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pen_penjualan_retur_nonfaktur`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pen_penjualan_retur_nonfaktur` AS select `re`.`id` AS `id`,`re`.`lokasi` AS `lokasi`,`re`.`user_id_create` AS `user_id_create`,`re`.`user_id_update` AS `user_id_update`,`re`.`cv` AS `cv`,`re`.`no_retur` AS `no_retur`,`re`.`sufix_no_retur` AS `sufix_no_retur`,`re`.`tanggal` AS `tanggal`,`re`.`tanggal_retur` AS `tanggal_retur`,`re`.`tanggal_full` AS `tanggal_full`,`re`.`id_pelanggan` AS `id_pelanggan`,0 AS `id_penjualan`,`re`.`nominal_potongan` AS `nominal_potongan`,`re`.`pajak` AS `pajak`,`re`.`no_faktur_pajak` AS `no_faktur_pajak`,`re`.`status` AS `status`,`re`.`keterangan` AS `keterangan`,`re`.`mata_uang` AS `mata_uang`,`re`.`kurs_jual` AS `kurs_jual`,`re`.`kurs_bayar` AS `kurs_bayar`,`re`.`id_akun_piutang` AS `id_akun_piutang`,`re`.`id_akun_potongan` AS `id_akun_potongan`,`re`.`id_akun_pajak` AS `id_akun_pajak`,`re`.`id_akun_retur_penjualan` AS `id_akun_retur_penjualan`,`re`.`created_at` AS `created_at`,`re`.`updated_at` AS `updated_at`,`red`.`total_barang` AS `total_barang`,`red`.`nominal_total` AS `nominal_total`,(case when (`re`.`pajak` = 1) then ((`red`.`nominal_total` - `re`.`nominal_potongan`) / 10) else 0 end) AS `nominal_pajak` from (`pen_penjualan_retur_nonfaktur` `re` join `a_total_pen_penjualan_retur_nonfaktur_detail` `red` on((`red`.`id_penjualan_retur` = `re`.`id`)));

-- membuang struktur untuk view si_sarung.a_pro_upahproduksi
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upahproduksi`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upahproduksi` AS select `u`.`id_upahproduksi` AS `id_upahproduksi`,`u`.`id_barangmasuk` AS `id_barangmasuk`,`u`.`id_barangkeluar` AS `id_barangkeluar`,`u`.`id_proses` AS `id_proses`,`u`.`id_pegawai` AS `id_pegawai`,`u`.`id_rekanan` AS `id_rekanan`,`u`.`nomor` AS `nomor`,`u`.`lap_hasil` AS `lap_hasil`,`u`.`id_workorder` AS `id_workorder`,`u`.`id_workorder_barang` AS `id_workorder_barang`,`u`.`id_lokasi` AS `id_lokasi`,`u`.`tanggal` AS `tanggal`,`u`.`id_jenis` AS `id_jenis`,`u`.`id_akun_upah` AS `id_akun_upah`,`u`.`status_bayar` AS `status_bayar`,`u`.`akun_bayar` AS `akun_bayar`,`u`.`tanggal_bayar` AS `tanggal_bayar`,`u`.`jumlah_bayar` AS `jumlah_bayar`,`u`.`pajak` AS `pajak`,`u`.`id_akun_pajak` AS `id_akun_pajak`,`u`.`created_at` AS `created_at`,`u`.`updated_at` AS `updated_at`,ifnull(`t`.`total_upah`,0) AS `total_upah`,ifnull(`h`.`total_upah_harian`,0) AS `total_upah_harian`,ifnull(`l`.`total_lain`,0) AS `total_lain`,ifnull(`l`.`total_bayar_kasbon`,0) AS `total_bayar_kasbon` from (((`pro_upahproduksi` `u` left join `a_pro_upah_total` `t` on((`t`.`id_upah_borongan` = `u`.`id_upahproduksi`))) left join `a_pro_upah_borongan_lain_lain` `l` on((`l`.`id_upah_borongan` = `u`.`id_upahproduksi`))) left join `a_pro_upahproduksi_harian` `h` on((`h`.`id_upahproduksi` = `u`.`id_upahproduksi`)));

-- membuang struktur untuk view si_sarung.a_pro_upahproduksi_harian
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upahproduksi_harian`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upahproduksi_harian` AS select `pro_upahproduksi_harian`.`id_upahproduksi` AS `id_upahproduksi`,sum((ifnull(`pro_upahproduksi_harian`.`satuan`,0) * ifnull(`pro_upahproduksi_harian`.`upah`,0))) AS `total_upah_harian` from `pro_upahproduksi_harian` group by `pro_upahproduksi_harian`.`id_upahproduksi`;

-- membuang struktur untuk view si_sarung.a_pro_upahproduksi_harian_kemasan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upahproduksi_harian_kemasan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upahproduksi_harian_kemasan` AS select `pro_upahproduksi_harian_kemasan`.`id_upah_kemasan` AS `id_upah_kemasan`,sum((ifnull(`pro_upahproduksi_harian_kemasan`.`satuan`,0) * ifnull(`pro_upahproduksi_harian_kemasan`.`upah`,0))) AS `total_upah_harian` from `pro_upahproduksi_harian_kemasan` group by `pro_upahproduksi_harian_kemasan`.`id_upah_kemasan`;

-- membuang struktur untuk view si_sarung.a_pro_upahproduksi_kemasan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upahproduksi_kemasan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upahproduksi_kemasan` AS select `u`.`id` AS `id`,`u`.`id_barangmasuk_kemasan` AS `id_barangmasuk_kemasan`,`u`.`id_barangkeluar_kemasan` AS `id_barangkeluar_kemasan`,`u`.`id_proses` AS `id_proses`,`u`.`id_pegawai` AS `id_pegawai`,`u`.`id_rekanan` AS `id_rekanan`,`u`.`nomor` AS `nomor`,`u`.`lap_hasil` AS `lap_hasil`,`u`.`id_lokasi` AS `id_lokasi`,`u`.`tanggal` AS `tanggal`,`u`.`id_jenis` AS `id_jenis`,`u`.`id_akun_upah` AS `id_akun_upah`,`u`.`status_bayar` AS `status_bayar`,`u`.`akun_bayar` AS `akun_bayar`,`u`.`tanggal_bayar` AS `tanggal_bayar`,`u`.`jumlah_bayar` AS `jumlah_bayar`,`u`.`pajak` AS `pajak`,`u`.`created_at` AS `created_at`,`u`.`updated_at` AS `updated_at`,ifnull(`t`.`total_upah`,0) AS `total_upah`,ifnull(`h`.`total_upah_harian`,0) AS `total_upah_harian`,ifnull(`l`.`total_lain`,0) AS `total_lain` from (((`pro_upahproduksi_kemasan` `u` left join `a_pro_upah_total_kemasan` `t` on((`t`.`id_upah_kemasan` = `u`.`id`))) left join `a_pro_upah_kemasan_lain_lain` `l` on((`l`.`id_upah_kemasan` = `u`.`id`))) left join `a_pro_upahproduksi_harian_kemasan` `h` on((`h`.`id_upah_kemasan` = `u`.`id`)));

-- membuang struktur untuk view si_sarung.a_pro_upahproduksi_lainnya
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upahproduksi_lainnya`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upahproduksi_lainnya` AS select `u`.`id_upahproduksi_lainnya` AS `id_upahproduksi`,`u`.`id_pegawai` AS `id_pegawai`,`u`.`id_rekanan` AS `id_rekanan`,`u`.`id_lokasi` AS `id_lokasi`,`u`.`id_proses` AS `id_proses`,`u`.`tanggal_upah` AS `tanggal_upah`,`u`.`tanggal_hasil` AS `tanggal_hasil`,`u`.`nomor` AS `nomor`,`u`.`id_akun_upah` AS `id_akun_upah`,`u`.`id_akun_bayar` AS `id_akun_bayar`,`u`.`status_bayar` AS `status_bayar`,`u`.`tanggal_bayar` AS `tanggal_bayar`,`u`.`jenis` AS `jenis`,`u`.`created_at` AS `created_at`,`u`.`update_at` AS `updated_at`,ifnull(`t`.`total_upah`,0) AS `total_upah`,ifnull(`l`.`total_lain`,0) AS `total_lain`,ifnull(`l`.`total_bayar_kasbon`,0) AS `total_bayar_kasbon` from ((`pro_upahproduksi_lainnya` `u` left join `a_upahproduksi_lainnya_total` `t` on((`t`.`id_upahproduksi_lainnya` = `u`.`id_upahproduksi_lainnya`))) left join `a_upahproduksi_lainnya_lainlain_total` `l` on((`l`.`id_upahproduksi_lainnya` = `u`.`id_upahproduksi_lainnya`)));

-- membuang struktur untuk view si_sarung.a_pro_upahtenun
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upahtenun`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upahtenun` AS select `ut`.`id_upahtenun` AS `id_upahproduksi`,`ut`.`id_rekanan` AS `id_rekanan`,`ut`.`nomor` AS `nomor`,`ut`.`tanggal_upah` AS `tanggal`,`ut`.`id_akun_upah` AS `id_akun_upah`,`ut`.`status_bayar` AS `status_bayar`,`ut`.`id_akun_bayar` AS `akun_bayar`,`ut`.`tanggal_bayar` AS `tanggal_bayar`,(`utt`.`total_upah` + `utl`.`total_lain`) AS `jumlah_bayar`,0 AS `pajak`,0 AS `id_akun_pajak`,ifnull(`utt`.`total_upah`,0) AS `total_upah`,ifnull(`utl`.`total_lain`,0) AS `total_lain` from ((`pro_upahtenun` `ut` left join `a_pro_upahtenun_total` `utt` on((`utt`.`id_upah_borongan` = `ut`.`id_upahtenun`))) left join `a_pro_upahtenun_lain_total` `utl` on((`utl`.`id_upahtenun` = `ut`.`id_upahtenun`)));

-- membuang struktur untuk view si_sarung.a_pro_upahtenun_detail_total
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upahtenun_detail_total`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upahtenun_detail_total` AS select `ut`.`id_upahtenun` AS `id_upahtenun`,(sum((ifnull(`utd`.`jumlah`,0) * ifnull(`utd`.`upah_petenun`,0))) + sum((ifnull(`utd`.`jumlah`,0) * ifnull(`utd`.`upah_makelar`,0)))) AS `total_upah` from (`pro_upahtenun` `ut` join `pro_upahtenun_detail` `utd` on((`utd`.`id_upahtenun` = `ut`.`id_upahtenun`))) group by `ut`.`id_upahtenun`;

-- membuang struktur untuk view si_sarung.a_pro_upahtenun_lain_total
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upahtenun_lain_total`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upahtenun_lain_total` AS select `ut`.`id_upahtenun` AS `id_upahtenun`,sum((case when (`utl`.`tipe` = 'K') then (ifnull(`utl`.`jumlah`,0) * -(1)) else ifnull(`utl`.`jumlah`,0) end)) AS `total_lain` from (`pro_upahtenun` `ut` left join `pro_upahtenun_lainlain` `utl` on((`utl`.`id_upahtenun` = `ut`.`id_upahtenun`))) group by `ut`.`id_upahtenun`;

-- membuang struktur untuk view si_sarung.a_pro_upahtenun_pick_total
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upahtenun_pick_total`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upahtenun_pick_total` AS select `ut`.`id_upahtenun` AS `id_upahtenun`,sum((case when (`utp`.`tipe_akun` = 'K') then (`utp`.`upah_pick` * -(1)) else `utp`.`upah_pick` end)) AS `total_pick` from (`pro_upahtenun` `ut` left join `pro_upahtenun_pick` `utp` on((`utp`.`id_upahtenun` = `ut`.`id_upahtenun`))) group by `ut`.`id_upahtenun`;

-- membuang struktur untuk view si_sarung.a_pro_upahtenun_total
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upahtenun_total`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upahtenun_total` AS select `ut`.`id_upahtenun` AS `id_upah_borongan`,(`utd_total`.`total_upah` + `utp_total`.`total_pick`) AS `total_upah` from ((`pro_upahtenun` `ut` join `a_pro_upahtenun_detail_total` `utd_total` on((`utd_total`.`id_upahtenun` = `ut`.`id_upahtenun`))) join `a_pro_upahtenun_pick_total` `utp_total` on((`utp_total`.`id_upahtenun` = `ut`.`id_upahtenun`))) group by `ut`.`id_upahtenun`;

-- membuang struktur untuk view si_sarung.a_pro_upah_borongan_lain_lain
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upah_borongan_lain_lain`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upah_borongan_lain_lain` AS select `pro_upah_borongan_lain_lain`.`id_upah_borongan` AS `id_upah_borongan`,(sum((case when (`pro_upah_borongan_lain_lain`.`jenis_transaksi` = 'TAMBAHAN') then `pro_upah_borongan_lain_lain`.`jumlah` else 0 end)) - sum((case when (`pro_upah_borongan_lain_lain`.`jenis_transaksi` = 'KASBON') then `pro_upah_borongan_lain_lain`.`jumlah` else 0 end))) AS `total_lain`,sum((case when (`pro_upah_borongan_lain_lain`.`jenis_transaksi` = 'KASBON') then `pro_upah_borongan_lain_lain`.`jumlah` else 0 end)) AS `total_bayar_kasbon` from `pro_upah_borongan_lain_lain` group by `pro_upah_borongan_lain_lain`.`id_upah_borongan`;

-- membuang struktur untuk view si_sarung.a_pro_upah_kemasan_lain_lain
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upah_kemasan_lain_lain`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upah_kemasan_lain_lain` AS select `pro_upah_kemasan_lain_lain`.`id_upah_kemasan` AS `id_upah_kemasan`,sum(ifnull(`pro_upah_kemasan_lain_lain`.`jumlah`,0)) AS `total_lain` from `pro_upah_kemasan_lain_lain` group by `pro_upah_kemasan_lain_lain`.`id_upah_kemasan`;

-- membuang struktur untuk view si_sarung.a_pro_upah_total
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upah_total`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upah_total` AS select `pro_upah_total`.`id_upah_borongan` AS `id_upah_borongan`,sum((ifnull(`pro_upah_total`.`jumlah_barang`,0) * ((ifnull(`pro_upah_total`.`upah_satuan`,0) + ifnull(`pro_upah_total`.`upah_satuan_2`,0)) - ifnull(`pro_upah_total`.`potongan_upah_kualitas`,0)))) AS `total_upah` from `pro_upah_total` group by `pro_upah_total`.`id_upah_borongan`;

-- membuang struktur untuk view si_sarung.a_pro_upah_total_kemasan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_pro_upah_total_kemasan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_pro_upah_total_kemasan` AS select `pro_upah_total_kemasan`.`id_upah_kemasan` AS `id_upah_kemasan`,sum((ifnull(`pro_upah_total_kemasan`.`jumlah_barang`,0) * ifnull(`pro_upah_total_kemasan`.`upah_satuan`,0))) AS `total_upah` from `pro_upah_total_kemasan` group by `pro_upah_total_kemasan`.`id_upah_kemasan`;

-- membuang struktur untuk view si_sarung.a_ref_jurnal
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_ref_jurnal`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_ref_jurnal` AS select `p`.`id` AS `id`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`level` AS `level`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`used` AS `used`,`p`.`parent` AS `parent`,`p`.`locked` AS `locked`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`r`.`kode` AS `kode`,`r`.`tipe_id_akun_jurnal` AS `tipe_id_akun_jurnal`,`r`.`rows` AS `rows` from (`ms_ref_jurnal` `r` left join `ms_perkiraan` `p` on((`p`.`id` = `r`.`id_akun_jurnal`)));

-- membuang struktur untuk view si_sarung.a_serv_orderservice_pajak
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_serv_orderservice_pajak`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_serv_orderservice_pajak` AS select `serv_orderservice_pajak`.`id` AS `id`,`serv_orderservice_pajak`.`id_nota` AS `id_nota`,`serv_orderservice_pajak`.`id_akun` AS `id_akun`,`serv_orderservice_pajak`.`nominal` AS `nominal`,`serv_orderservice_pajak`.`pemotongan` AS `pemotongan`,`serv_orderservice_pajak`.`id_akun_pajak` AS `id_akun_pajak`,`serv_orderservice_pajak`.`created_at` AS `created_at`,`serv_orderservice_pajak`.`updated_at` AS `updated_at`,(case when (`serv_orderservice_pajak`.`pemotongan` = 1) then (-(1) * `serv_orderservice_pajak`.`nominal`) else `serv_orderservice_pajak`.`nominal` end) AS `nominal_pajak` from `serv_orderservice_pajak`;

-- membuang struktur untuk view si_sarung.a_total_pem_orderbeli_detail
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_total_pem_orderbeli_detail`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_total_pem_orderbeli_detail` AS select `d`.`id_orderbeli` AS `id_orderbeli`,sum((`d`.`jml_barang` * `d`.`harga_satuan`)) AS `nominal_total`,sum((`d`.`jml_barang` * `d`.`harga_satuan`)) AS `total`,sum((`d`.`jml_barang` * `d`.`nilai_ppn`)) AS `nominal_ppn` from (`view_orderbeli_barang` `d` join `pem_orderbeli` `b` on((`b`.`id_orderbeli` = `d`.`id_orderbeli`))) group by `d`.`id_orderbeli`;

-- membuang struktur untuk view si_sarung.a_total_pem_pembelian_detail
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_total_pem_pembelian_detail`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_total_pem_pembelian_detail` AS select `d`.`id_pembelian` AS `id_pembelian`,(case when (`b`.`termasuk_pajak` = 1) then sum(((100 * (`d`.`jml_barang` * `d`.`harga_satuan`)) / 110)) else sum((cast(`d`.`jml_barang` as decimal(11,3)) * cast(`d`.`harga_satuan` as decimal(25,3)))) end) AS `nominal_total`,(case when (`b`.`termasuk_pajak` = 1) then sum(((100 * (`d`.`jml_barang` * `d`.`harga_satuan`)) / 110)) else sum((cast(`d`.`jml_barang` as decimal(11,3)) * cast(`d`.`harga_satuan` as decimal(25,3)))) end) AS `total` from (`pem_pembelian_barang` `d` join `pem_pembelian` `b` on((`b`.`id_pembelian` = `d`.`id_pembelian`))) group by `d`.`id_pembelian`;

-- membuang struktur untuk view si_sarung.a_total_pem_sewa
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_total_pem_sewa`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_total_pem_sewa` AS select `s`.`id` AS `id_sewa`,(`s`.`tahun` * `s`.`harga_per_tahun`) AS `nominal_total` from `pem_sewa` `s`;

-- membuang struktur untuk view si_sarung.a_total_pen_penjualan_detail
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_total_pen_penjualan_detail`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_total_pen_penjualan_detail` AS select `d`.`id_penjualan` AS `id_penjualan`,sum(`d`.`jml_barang`) AS `total_barang`,(sum((`d`.`jml_barang` * `d`.`harga_satuan`)) - sum((`d`.`jml_barang` * `d`.`potongan`))) AS `nominal_total`,sum(`d`.`total`) AS `total` from `pen_penjualan_barang` `d` group by `d`.`id_penjualan`;

-- membuang struktur untuk view si_sarung.a_total_pen_penjualan_retur_detail
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_total_pen_penjualan_retur_detail`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_total_pen_penjualan_retur_detail` AS select `rd`.`id_penjualan_retur` AS `id_penjualan_retur`,`rd`.`id_penjualan_barang` AS `id_penjualan_barang`,sum(`rd`.`jml_retur`) AS `total_barang`,(sum((`rd`.`jml_retur` * `d`.`harga_satuan`)) - sum((`rd`.`jml_retur` * `d`.`potongan`))) AS `nominal_total` from ((`pen_penjualan_retur_barang` `rd` join `pen_penjualan_retur` `re` on((`re`.`id` = `rd`.`id_penjualan_retur`))) join `pen_penjualan_barang` `d` on((`d`.`id_jual_barang` = `rd`.`id_penjualan_barang`))) group by `rd`.`id_penjualan_retur`;

-- membuang struktur untuk view si_sarung.a_total_pen_penjualan_retur_detail_groupby_penjualan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_total_pen_penjualan_retur_detail_groupby_penjualan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_total_pen_penjualan_retur_detail_groupby_penjualan` AS select `rd`.`id_penjualan_retur` AS `id_penjualan_retur`,`rd`.`id_penjualan_barang` AS `id_penjualan_barang`,`re`.`mata_uang` AS `mata_uang`,`re`.`kurs_jual` AS `kurs_jual`,`re`.`kurs_bayar` AS `kurs_bayar`,sum(`rd`.`jml_retur`) AS `total_barang`,(sum((`rd`.`jml_retur` * `d`.`harga_satuan`)) - sum((`rd`.`jml_retur` * `d`.`potongan`))) AS `nominal_total` from ((`pen_penjualan_retur_barang` `rd` join `pen_penjualan_retur` `re` on((`re`.`id` = `rd`.`id_penjualan_retur`))) join `pen_penjualan_barang` `d` on((`d`.`id_jual_barang` = `rd`.`id_penjualan_barang`))) group by `rd`.`id_penjualan_barang`;

-- membuang struktur untuk view si_sarung.a_total_pen_penjualan_retur_nonfaktur_detail
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_total_pen_penjualan_retur_nonfaktur_detail`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_total_pen_penjualan_retur_nonfaktur_detail` AS select `rd`.`id_retur_nonfaktur` AS `id_penjualan_retur`,sum(`rd`.`jml_retur`) AS `total_barang`,(sum((`rd`.`jml_retur` * `rd`.`harga_satuan`)) - sum((`rd`.`jml_retur` * `rd`.`potongan`))) AS `nominal_total` from (`pen_penjualan_retur_barang_nonfaktur` `rd` join `pen_penjualan_retur_nonfaktur` `re` on((`re`.`id` = `rd`.`id_retur_nonfaktur`))) group by `rd`.`id_retur_nonfaktur`;

-- membuang struktur untuk view si_sarung.a_total_serv_orderservice_detail
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_total_serv_orderservice_detail`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_total_serv_orderservice_detail` AS select `serv_orderservice_detail`.`id_nota` AS `id_nota`,sum((`serv_orderservice_detail`.`jumlah` * `serv_orderservice_detail`.`harga_satuan`)) AS `sub_total` from `serv_orderservice_detail` group by `serv_orderservice_detail`.`id_nota`;

-- membuang struktur untuk view si_sarung.a_total_serv_orderservice_pajak
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_total_serv_orderservice_pajak`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_total_serv_orderservice_pajak` AS select `a_serv_orderservice_pajak`.`id_nota` AS `id_nota`,sum(`a_serv_orderservice_pajak`.`nominal_pajak`) AS `nominal_pajak` from `a_serv_orderservice_pajak` group by `a_serv_orderservice_pajak`.`id_nota`;

-- membuang struktur untuk view si_sarung.a_upahproduksi_lainnya_lainlain_total
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_upahproduksi_lainnya_lainlain_total`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_upahproduksi_lainnya_lainlain_total` AS select `uplll`.`id_upahproduksi_lainnya` AS `id_upahproduksi_lainnya`,(sum((case when (`uplll`.`tipe` = 'D') then `uplll`.`jumlah` else 0 end)) - sum((case when (`uplll`.`tipe` = 'K') then `uplll`.`jumlah` else 0 end))) AS `total_lain`,sum((case when (`uplll`.`jenis_transaksi` = 'KASBON') then `uplll`.`jumlah` else 0 end)) AS `total_bayar_kasbon` from `pro_upahproduksi_lainnya_lainlain` `uplll` group by `uplll`.`id_upahproduksi_lainnya`;

-- membuang struktur untuk view si_sarung.a_upahproduksi_lainnya_total
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_upahproduksi_lainnya_total`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_upahproduksi_lainnya_total` AS select `upl`.`id_upahproduksi_lainnya` AS `id_upahproduksi_lainnya`,sum(`upl`.`upah`) AS `total_upah` from `pro_upahproduksi_lainnya_barang` `upl` group by `upl`.`id_upahproduksi_lainnya`;

-- membuang struktur untuk view si_sarung.a_view_keu_sales_contract_tagihan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_view_keu_sales_contract_tagihan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_view_keu_sales_contract_tagihan` AS select `keu_sales_contract_tagihan_detail`.`id_sales_contract_tagihan` AS `id_sales_contract_tagihan`,sum((case when (`keu_sales_contract_tagihan_detail`.`tipe_id_akun` = 'K') then (-(1) * `keu_sales_contract_tagihan_detail`.`nominal_transaksi`) else `keu_sales_contract_tagihan_detail`.`nominal_transaksi` end)) AS `nominal` from `keu_sales_contract_tagihan_detail` group by `keu_sales_contract_tagihan_detail`.`id_sales_contract_tagihan`;

-- membuang struktur untuk view si_sarung.a_view_keu_sumber_dana
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_view_keu_sumber_dana`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_view_keu_sumber_dana` AS select `a_view_keu_sumber_dana_detail`.`id_keu_sumber_dana` AS `id_keu_sumber_dana`,sum(`a_view_keu_sumber_dana_detail`.`nomor_transaksi_konversi`) AS `nominal` from `a_view_keu_sumber_dana_detail` group by `a_view_keu_sumber_dana_detail`.`id_keu_sumber_dana`;

-- membuang struktur untuk view si_sarung.a_view_keu_sumber_dana_detail
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `a_view_keu_sumber_dana_detail`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `a_view_keu_sumber_dana_detail` AS select `keu_sumber_dana_detail`.`id` AS `id`,`keu_sumber_dana_detail`.`id_keu_sumber_dana` AS `id_keu_sumber_dana`,`keu_sumber_dana_detail`.`ke_akun` AS `ke_akun`,`keu_sumber_dana_detail`.`nominal_transaksi` AS `nominal_transaksi`,`keu_sumber_dana_detail`.`keterangan` AS `keterangan`,`keu_sumber_dana_detail`.`tipe_id_akun` AS `tipe_id_akun`,`keu_sumber_dana_detail`.`created_at` AS `created_at`,`keu_sumber_dana_detail`.`updated_at` AS `updated_at`,(case when (`keu_sumber_dana`.`tipe_id_akun` <> `keu_sumber_dana_detail`.`tipe_id_akun`) then `keu_sumber_dana_detail`.`nominal_transaksi` else (-(1) * `keu_sumber_dana_detail`.`nominal_transaksi`) end) AS `nomor_transaksi_konversi` from (`keu_sumber_dana_detail` join `keu_sumber_dana` on((`keu_sumber_dana`.`id` = `keu_sumber_dana_detail`.`id_keu_sumber_dana`)));

-- membuang struktur untuk view si_sarung.histori_akun
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `histori_akun`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `histori_akun` AS select `sd`.`lokasi` AS `lokasi_ref`,`sd`.`id` AS `id_ref`,`sd`.`tanggal_transaksi` AS `tanggal_ref`,`p2`.`id` AS `id_perkiraan`,`sd`.`dari_akun` AS `dari_akun`,`sd`.`tipe_id_akun` AS `dari_akun_tipe_id_akun`,`p2`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`p2`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`p2`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`sdd`.`ke_akun` AS `ke_akun`,`sdd`.`tipe_id_akun` AS `ke_akun_tipe_id_akun`,`p`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`p`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`p`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`sdd`.`nominal_transaksi` AS `nominal_transaksi`,`sdd`.`keterangan` AS `keterangan` from (((`keu_sumber_dana_detail` `sdd` join `keu_sumber_dana` `sd` on((`sd`.`id` = `sdd`.`id_keu_sumber_dana`))) join `ms_perkiraan` `p` on((`p`.`id` = `sdd`.`ke_akun`))) join `ms_perkiraan` `p2` on((`p2`.`id` = `sd`.`dari_akun`)));

-- membuang struktur untuk view si_sarung.histori_akun_orderservice_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `histori_akun_orderservice_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `histori_akun_orderservice_bayar` AS select `pbt`.`lokasi` AS `lokasi_ref`,`pb`.`id_ref` AS `id_ref`,`pb`.`tanggal_ref` AS `tanggal_ref`,`pb`.`id_perkiraan` AS `id_perkiraan`,`pb`.`id_perkiraan` AS `dari_akun`,`pb`.`tipe_transaksi` AS `dari_akun_tipe_id_akun`,`pb`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`pb`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`pb`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`pb`.`id_perkiraan` AS `ke_akun`,`pb`.`tipe_transaksi` AS `ke_akun_tipe_id_akun`,`pb2`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`pb2`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`pb2`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`pb2`.`nominal` AS `nominal_transaksi`,`pb`.`keterangan` AS `keterangan` from ((`jurnal_orderservice_bayar` `pb` join `jurnal_orderservice_bayar` `pb2` on(((`pb2`.`id_ref` = `pb`.`id_ref`) and (`pb2`.`tipe_transaksi` = 'D') and (`pb`.`tipe_transaksi` = 'K')))) join `pem_pembelian_transaksi_bayar` `pbt` on((`pbt`.`id` = `pb`.`id_ref`))) union all select `pbt`.`lokasi` AS `lokasi_ref`,`pb`.`id_ref` AS `id_ref`,`pb`.`tanggal_ref` AS `tanggal_ref`,`pb`.`id_perkiraan` AS `id_perkiraan`,`pb`.`id_perkiraan` AS `dari_akun`,`pb`.`tipe_transaksi` AS `dari_akun_tipe_id_akun`,`pb`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`pb`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`pb`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`pb`.`id_perkiraan` AS `ke_akun`,`pb`.`tipe_transaksi` AS `ke_akun_tipe_id_akun`,`pb2`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`pb2`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`pb2`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`pb2`.`nominal` AS `nominal_transaksi`,`pb`.`keterangan` AS `keterangan` from ((`jurnal_orderservice_bayar` `pb` join `jurnal_orderservice_bayar` `pb2` on(((`pb2`.`id_ref` = `pb`.`id_ref`) and (`pb2`.`tipe_transaksi` = 'K') and (`pb`.`tipe_transaksi` = 'D')))) join `pem_pembelian_transaksi_bayar` `pbt` on((`pbt`.`id` = `pb`.`id_ref`)));

-- membuang struktur untuk view si_sarung.histori_akun_pembelian_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `histori_akun_pembelian_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `histori_akun_pembelian_bayar` AS select `pbt`.`lokasi` AS `lokasi_ref`,`pb`.`id_ref` AS `id_ref`,`pb`.`tanggal_ref` AS `tanggal_ref`,`pb`.`id_perkiraan` AS `id_perkiraan`,`pb`.`id_perkiraan` AS `dari_akun`,`pb`.`tipe_transaksi` AS `dari_akun_tipe_id_akun`,`pb`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`pb`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`pb`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`pb`.`id_perkiraan` AS `ke_akun`,`pb`.`tipe_transaksi` AS `ke_akun_tipe_id_akun`,`pb2`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`pb2`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`pb2`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`pb2`.`nominal` AS `nominal_transaksi`,`pb`.`keterangan` AS `keterangan` from ((`jurnal_pembelian_bayar` `pb` join `jurnal_pembelian_bayar` `pb2` on(((`pb2`.`id_ref` = `pb`.`id_ref`) and (`pb2`.`tipe_transaksi` = 'D') and (`pb`.`tipe_transaksi` = 'K')))) join `pem_pembelian_transaksi_bayar` `pbt` on((`pbt`.`id` = `pb`.`id_ref`))) union all select `pbt`.`lokasi` AS `lokasi_ref`,`pb`.`id_ref` AS `id_ref`,`pb`.`tanggal_ref` AS `tanggal_ref`,`pb`.`id_perkiraan` AS `id_perkiraan`,`pb`.`id_perkiraan` AS `dari_akun`,`pb`.`tipe_transaksi` AS `dari_akun_tipe_id_akun`,`pb`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`pb`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`pb`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`pb`.`id_perkiraan` AS `ke_akun`,`pb`.`tipe_transaksi` AS `ke_akun_tipe_id_akun`,`pb2`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`pb2`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`pb2`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`pb2`.`nominal` AS `nominal_transaksi`,`pb`.`keterangan` AS `keterangan` from ((`jurnal_pembelian_bayar` `pb` join `jurnal_pembelian_bayar` `pb2` on(((`pb2`.`id_ref` = `pb`.`id_ref`) and (`pb2`.`tipe_transaksi` = 'K') and (`pb`.`tipe_transaksi` = 'D')))) join `pem_pembelian_transaksi_bayar` `pbt` on((`pbt`.`id` = `pb`.`id_ref`)));

-- membuang struktur untuk view si_sarung.histori_akun_penjualan_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `histori_akun_penjualan_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `histori_akun_penjualan_bayar` AS select `pbt`.`lokasi` AS `lokasi_ref`,`pb`.`id_ref` AS `id_ref`,`pb`.`tanggal_ref` AS `tanggal_ref`,`pb`.`id_perkiraan` AS `id_perkiraan`,`pb`.`id_perkiraan` AS `dari_akun`,`pb`.`tipe_transaksi` AS `dari_akun_tipe_id_akun`,`pb`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`pb`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`pb`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`pb`.`id_perkiraan` AS `ke_akun`,`pb`.`tipe_transaksi` AS `ke_akun_tipe_id_akun`,`pb2`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`pb2`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`pb2`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`pb2`.`nominal` AS `nominal_transaksi`,`pb`.`keterangan` AS `keterangan` from ((`jurnal_penjualan_bayar` `pb` join `jurnal_penjualan_bayar` `pb2` on(((`pb2`.`id_ref` = `pb`.`id_ref`) and (`pb2`.`tipe_transaksi` = 'D') and (`pb`.`tipe_transaksi` = 'K')))) join `pen_penjualan_transaksi_bayar` `pbt` on((`pbt`.`id` = `pb`.`id_ref`))) union all select `pbt`.`lokasi` AS `lokasi_ref`,`pb`.`id_ref` AS `id_ref`,`pb`.`tanggal_ref` AS `tanggal_ref`,`pb`.`id_perkiraan` AS `id_perkiraan`,`pb`.`id_perkiraan` AS `dari_akun`,`pb`.`tipe_transaksi` AS `dari_akun_tipe_id_akun`,`pb`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`pb`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`pb`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`pb`.`id_perkiraan` AS `ke_akun`,`pb`.`tipe_transaksi` AS `ke_akun_tipe_id_akun`,`pb2`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`pb2`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`pb2`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`pb2`.`nominal` AS `nominal_transaksi`,`pb`.`keterangan` AS `keterangan` from ((`jurnal_penjualan_bayar` `pb` join `jurnal_penjualan_bayar` `pb2` on(((`pb2`.`id_ref` = `pb`.`id_ref`) and (`pb2`.`tipe_transaksi` = 'K') and (`pb`.`tipe_transaksi` = 'D')))) join `pen_penjualan_transaksi_bayar` `pbt` on((`pbt`.`id` = `pb`.`id_ref`)));

-- membuang struktur untuk view si_sarung.histori_akun_sales_contract_tagihan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `histori_akun_sales_contract_tagihan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `histori_akun_sales_contract_tagihan` AS select `sct`.`lokasi` AS `lokasi_ref`,`sct`.`id` AS `id_ref`,`sct`.`tanggal_tagihan` AS `tanggal_ref`,`p2`.`id` AS `id_perkiraan`,`sct`.`dari_akun` AS `dari_akun`,`sct`.`tipe_id_akun` AS `dari_akun_tipe_id_akun`,`p2`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`p2`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`p2`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`sctd`.`ke_akun` AS `ke_akun`,`sctd`.`tipe_id_akun` AS `ke_akun_tipe_id_akun`,`p`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`p`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`p`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`sctd`.`nominal_transaksi` AS `nominal_transaksi`,`sctd`.`keterangan` AS `keterangan` from (((`keu_sales_contract_tagihan_detail` `sctd` join `keu_sales_contract_tagihan` `sct` on((`sct`.`id` = `sctd`.`id_sales_contract_tagihan`))) join `ms_perkiraan` `p` on((`p`.`id` = `sctd`.`ke_akun`))) join `ms_perkiraan` `p2` on((`p2`.`id` = `sct`.`dari_akun`))) union all select `sct`.`lokasi` AS `lokasi_ref`,`sct`.`id` AS `id_ref`,`sct`.`tanggal_tagihan` AS `tanggal_ref`,`p`.`id` AS `id_perkiraan`,`sctd`.`ke_akun` AS `dari_akun`,`sctd`.`tipe_id_akun` AS `dari_akun_tipe_id_akun`,`p`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`p`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`p`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`sct`.`dari_akun` AS `ke_akun`,`sct`.`tipe_id_akun` AS `ke_akun_tipe_id_akun`,`p2`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`p2`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`p2`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`sctd`.`nominal_transaksi` AS `nominal_transaksi`,`sctd`.`keterangan` AS `keterangan` from (((`keu_sales_contract_tagihan_detail` `sctd` join `keu_sales_contract_tagihan` `sct` on((`sct`.`id` = `sctd`.`id_sales_contract_tagihan`))) join `ms_perkiraan` `p` on((`p`.`id` = `sctd`.`ke_akun`))) join `ms_perkiraan` `p2` on((`p2`.`id` = `sct`.`dari_akun`)));

-- membuang struktur untuk view si_sarung.histori_akun_sewa_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `histori_akun_sewa_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `histori_akun_sewa_bayar` AS select `sbt`.`lokasi` AS `lokasi_ref`,`sb`.`id_ref` AS `id_ref`,`sb`.`tanggal_ref` AS `tanggal_ref`,`sb`.`id_perkiraan` AS `id_perkiraan`,`sb`.`id_perkiraan` AS `dari_akun`,`sb`.`tipe_transaksi` AS `dari_akun_tipe_id_akun`,`sb`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`sb`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`sb`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`sb`.`id_perkiraan` AS `ke_akun`,`sb`.`tipe_transaksi` AS `ke_akun_tipe_id_akun`,`sb2`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`sb2`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`sb2`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`sb2`.`nominal` AS `nominal_transaksi`,`sb`.`keterangan` AS `keterangan` from ((`jurnal_sewa_bayar` `sb` join `jurnal_sewa_bayar` `sb2` on(((`sb2`.`id_ref` = `sb`.`id_ref`) and (`sb2`.`tipe_transaksi` = 'D') and (`sb`.`tipe_transaksi` = 'K')))) join `pem_sewa_transaksi_bayar` `sbt` on((`sbt`.`id` = `sb`.`id_ref`))) union all select `sbt`.`lokasi` AS `lokasi_ref`,`sb`.`id_ref` AS `id_ref`,`sb`.`tanggal_ref` AS `tanggal_ref`,`sb`.`id_perkiraan` AS `id_perkiraan`,`sb`.`id_perkiraan` AS `dari_akun`,`sb`.`tipe_transaksi` AS `dari_akun_tipe_id_akun`,`sb`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`sb`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`sb`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`sb`.`id_perkiraan` AS `ke_akun`,`sb`.`tipe_transaksi` AS `ke_akun_tipe_id_akun`,`sb2`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`sb2`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`sb2`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`sb2`.`nominal` AS `nominal_transaksi`,`sb`.`keterangan` AS `keterangan` from ((`jurnal_sewa_bayar` `sb` join `jurnal_sewa_bayar` `sb2` on(((`sb2`.`id_ref` = `sb`.`id_ref`) and (`sb2`.`tipe_transaksi` = 'K') and (`sb`.`tipe_transaksi` = 'D')))) join `pem_sewa_transaksi_bayar` `sbt` on((`sbt`.`id` = `sb`.`id_ref`)));

-- membuang struktur untuk view si_sarung.histori_akun_sumber_dana
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `histori_akun_sumber_dana`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `histori_akun_sumber_dana` AS select `sd`.`lokasi` AS `lokasi_ref`,`sd`.`id` AS `id_ref`,`sd`.`tanggal_transaksi` AS `tanggal_ref`,`p2`.`id` AS `id_perkiraan`,`sd`.`dari_akun` AS `dari_akun`,`sd`.`tipe_id_akun` AS `dari_akun_tipe_id_akun`,`p2`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`p2`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`p2`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`sdd`.`ke_akun` AS `ke_akun`,`sdd`.`tipe_id_akun` AS `ke_akun_tipe_id_akun`,`p`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`p`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`p`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`sdd`.`nominal_transaksi` AS `nominal_transaksi`,`sdd`.`keterangan` AS `keterangan` from (((`keu_sumber_dana_detail` `sdd` join `keu_sumber_dana` `sd` on((`sd`.`id` = `sdd`.`id_keu_sumber_dana`))) join `ms_perkiraan` `p` on((`p`.`id` = `sdd`.`ke_akun`))) join `ms_perkiraan` `p2` on((`p2`.`id` = `sd`.`dari_akun`))) union all select `sd`.`lokasi` AS `lokasi_ref`,`sd`.`id` AS `id_ref`,`sd`.`tanggal_transaksi` AS `tanggal_ref`,`p`.`id` AS `id_perkiraan`,`sdd`.`ke_akun` AS `dari_akun`,`sdd`.`tipe_id_akun` AS `dari_akun_tipe_id_akun`,`p`.`kd_rek_1` AS `dari_akun_kd_rek_1`,`p`.`kode_perkiraan` AS `dari_akun_kode_perkiraan`,`p`.`nama_perkiraan` AS `dari_akun_nama_perkiraan`,`sd`.`dari_akun` AS `ke_akun`,`sd`.`tipe_id_akun` AS `ke_akun_tipe_id_akun`,`p2`.`kd_rek_1` AS `ke_akun_kd_rek_1`,`p2`.`kode_perkiraan` AS `ke_akun_kode_perkiraan`,`p2`.`nama_perkiraan` AS `ke_akun_nama_perkiraan`,`sdd`.`nominal_transaksi` AS `nominal_transaksi`,`sdd`.`keterangan` AS `keterangan` from (((`keu_sumber_dana_detail` `sdd` join `keu_sumber_dana` `sd` on((`sd`.`id` = `sdd`.`id_keu_sumber_dana`))) join `ms_perkiraan` `p` on((`p`.`id` = `sdd`.`ke_akun`))) join `ms_perkiraan` `p2` on((`p2`.`id` = `sd`.`dari_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_jurnal_lain
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_jurnal_lain`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_jurnal_lain` AS select (case when ((`d`.`id_akun` = `p`.`id`) and (`d`.`debet` <> 0)) then '1' when ((`d`.`id_akun` = `p`.`id`) and (`d`.`kredit` <> 0)) then '2' end) AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`j`.`id` AS `id_ref`,`j`.`nomor_jurnal` AS `nomor_ref`,`j`.`tanggal_jurnal` AS `tanggal_ref`,'Jurnal' AS `keterangan`,(case when ((`d`.`id_akun` = `p`.`id`) and (`d`.`debet` <> 0)) then `d`.`debet` when ((`d`.`id_akun` = `p`.`id`) and (`d`.`kredit` <> 0)) then `d`.`kredit` end) AS `nominal`,(case when ((`d`.`id_akun` = `p`.`id`) and (`d`.`debet` <> 0)) then 'debet' when ((`d`.`id_akun` = `p`.`id`) and (`d`.`kredit` <> 0)) then 'kredit' end) AS `tipe_transaksi`,'jurnal' AS `lain` from ((`keu_jurnal_lain` `j` join `keu_jurnal_lain_detail` `d` on((`d`.`id_jurnal_lain` = `j`.`id`))) join `ms_perkiraan` `p` on((`p`.`id` = `d`.`id_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_kasbon
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_kasbon`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_kasbon` AS select 1 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`kkp`.`id` AS `id_ref`,`kkp`.`nomor_transaksi` AS `nomor_ref`,`kkp`.`tanggal_transaksi` AS `tanggal_ref`,`kkp`.`tanggal_transaksi` AS `tanggal`,`kkp`.`keterangan` AS `keterangan`,`kkp`.`nominal` AS `nominal`,'D' AS `tipe_transaksi`,'jurnal_kasbon_pegawai' AS `flag`,1 AS `jenis_kasbon` from ((`keu_kasbon_pegawai` `kkp` join `ms_pegawai` `mpe` on((`kkp`.`id_pegawai` = `mpe`.`id_pegawai`))) left join `ms_perkiraan` `mp` on((`mpe`.`id_akun_piutang` = `mp`.`id`))) union all select 2 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`kkp`.`id` AS `id_ref`,`kkp`.`nomor_transaksi` AS `nomor_ref`,`kkp`.`tanggal_transaksi` AS `tanggal_ref`,`kkp`.`tanggal_transaksi` AS `tanggal`,`kkp`.`keterangan` AS `keterangan`,`kkp`.`nominal` AS `nominal`,'K' AS `tipe_transaksi`,'jurnal_kasbon_pegawai' AS `flag`,1 AS `jenis_kasbon` from (`keu_kasbon_pegawai` `kkp` left join `ms_perkiraan` `mp` on((`kkp`.`dari_akun` = `mp`.`id`))) union all select 1 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`kkr`.`id` AS `id_ref`,`kkr`.`nomor_transaksi` AS `nomor_ref`,`kkr`.`tanggal_transaksi` AS `tanggal_ref`,`kkr`.`tanggal_transaksi` AS `tanggal`,`kkr`.`keterangan` AS `keterangan`,`kkr`.`nominal` AS `nominal`,'D' AS `tipe_transaksi`,'jurnal_kasbon_rekanan' AS `flag`,2 AS `jenis_kasbon` from ((`keu_kasbon_rekanan` `kkr` join `ms_rekanan_kelompok` `mrk` on((`kkr`.`id_kelompok` = `mrk`.`id_kelompok`))) left join `ms_perkiraan` `mp` on((`mrk`.`id_akun_piutang` = `mp`.`id`))) union all select 2 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`kkr`.`id` AS `id_ref`,`kkr`.`nomor_transaksi` AS `nomor_ref`,`kkr`.`tanggal_transaksi` AS `tanggal_ref`,`kkr`.`tanggal_transaksi` AS `tanggal`,`kkr`.`keterangan` AS `keterangan`,`kkr`.`nominal` AS `nominal`,'K' AS `tipe_transaksi`,'jurnal_kasbon_rekanan' AS `keterangan_lain`,2 AS `jenis_kasbon` from (`keu_kasbon_rekanan` `kkr` left join `ms_perkiraan` `mp` on((`kkr`.`dari_akun` = `mp`.`id`)));

-- membuang struktur untuk view si_sarung.jurnal_kasbon_pegawai
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_kasbon_pegawai`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_kasbon_pegawai` AS select 1 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`ksdd`.`id` AS `id_ref`,`ksd`.`nomor_transaksi` AS `nomor_ref`,`ksd`.`tanggal_transaksi` AS `tanggal_ref`,`ksd`.`tanggal_transaksi` AS `tanggal`,`ksdd`.`keterangan` AS `keterangan`,`ksdd`.`nominal_transaksi` AS `nominal`,'D' AS `tipe_transaksi` from ((`ms_pegawai` `mpg` left join (`keu_sumber_dana_detail` `ksdd` join `keu_sumber_dana` `ksd` on((`ksd`.`id` = `ksdd`.`id_keu_sumber_dana`))) on((`mpg`.`id_akun_piutang` = `ksdd`.`ke_akun`))) join `ms_perkiraan` `mp` on((`mp`.`id` = `ksdd`.`ke_akun`))) where (`mpg`.`id_akun_piutang` not in (22,24)) union all select 2 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`ksdd`.`id` AS `id_ref`,`ksd`.`nomor_transaksi` AS `nomor_ref`,`ksd`.`tanggal_transaksi` AS `tanggal_ref`,`ksd`.`tanggal_transaksi` AS `tanggal`,`ksdd`.`keterangan` AS `keterangan`,`ksdd`.`nominal_transaksi` AS `nominal`,'K' AS `tipe_transaksi` from ((`ms_pegawai` `mpg` left join (`keu_sumber_dana_detail` `ksdd` join `keu_sumber_dana` `ksd` on((`ksd`.`id` = `ksdd`.`id_keu_sumber_dana`))) on((`mpg`.`id_akun_piutang` = `ksdd`.`ke_akun`))) join `ms_perkiraan` `mp` on((`mp`.`id` = `ksd`.`dari_akun`))) where (`mpg`.`id_akun_piutang` not in (22,24));

-- membuang struktur untuk view si_sarung.jurnal_orderservice
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_orderservice`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_orderservice` AS (select '1' AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else (case when (`sod`.`id_akun` = 775) then concat_ws(' ',`mp`.`nama_perkiraan`,`mpd`.`nama`) when (`sod`.`id_akun` = 58) then concat_ws(' ',`mp`.`nama_perkiraan`,`mpd`.`nama`) else `mp`.`nama_perkiraan` end) end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`so`.`id` AS `id_ref`,concat(`so`.`no_nota`,`so`.`sufix_no_nota`) AS `nomor_ref`,`so`.`tanggal_nota` AS `tanggal_ref`,`so`.`tanggal` AS `tanggal`,`sod`.`deskripsi` AS `keterangan`,(`sod`.`jumlah` * `sod`.`harga_satuan`) AS `nominal`,'D' AS `tipe_transaksi` from (((`serv_orderservice_detail` `sod` join `serv_orderservice` `so` on((`so`.`id` = `sod`.`id_nota`))) join `ms_penyedia` `mpd` on((`mpd`.`id_penyedia` = `so`.`id_penyedia`))) left join `ms_perkiraan` `mp` on((`sod`.`id_akun` = `mp`.`id`)))) union all (select (case when (`sop`.`pemotongan` = 1) then '2' else '1' end) AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`so`.`id` AS `id_ref`,concat(`so`.`no_nota`,`so`.`sufix_no_nota`) AS `nomor_ref`,`so`.`tanggal_nota` AS `tanggal_ref`,`so`.`tanggal` AS `tanggal`,`so`.`keterangan` AS `keterangan`,`sop`.`nominal` AS `nominal`,(case when (`sop`.`pemotongan` = 1) then 'K' else 'D' end) AS `tipe_transaksi` from ((`serv_orderservice_pajak` `sop` join `serv_orderservice` `so` on((`so`.`id` = `sop`.`id_nota`))) left join `ms_perkiraan` `mp` on((`sop`.`id_akun` = `mp`.`id`)))) union all (select '2' AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else (case when (`mpe`.`id_akun_hutang` = 775) then concat_ws(' ',`mp`.`nama_perkiraan`,`mpe`.`nama`) when (`mpe`.`id_akun_hutang` = 58) then concat_ws(' ',`mp`.`nama_perkiraan`,`mpe`.`nama`) else `mp`.`nama_perkiraan` end) end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`so`.`id` AS `id_ref`,concat(`so`.`no_nota`,`so`.`sufix_no_nota`) AS `nomor_ref`,`so`.`tanggal_nota` AS `tanggal_ref`,`so`.`tanggal` AS `tanggal`,`so`.`keterangan` AS `keterangan`,`so`.`nominal_netto` AS `nominal`,'K' AS `tipe_transaksi` from ((`view_orderservice_bayar` `so` join `ms_penyedia` `mpe` on((`so`.`id_penyedia` = `mpe`.`id_penyedia`))) left join `ms_perkiraan` `mp` on((`mpe`.`id_akun_hutang` = `mp`.`id`))));

-- membuang struktur untuk view si_sarung.jurnal_orderservice_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_orderservice_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_orderservice_bayar` AS select '1' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,(case when (`s`.`id_akun_hutang` = 775) then concat_ws(' ',`p`.`nama_perkiraan`,`s`.`nama`) when (`s`.`id_akun_hutang` = 58) then concat_ws(' ',`p`.`nama_perkiraan`,`s`.`nama`) else `p`.`nama_perkiraan` end) AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`t`.`id` AS `id_ref`,`t`.`no_transaksi_bayar` AS `nomor_ref`,`t`.`tanggal_bayar` AS `tanggal_ref`,`t`.`tanggal_bayar` AS `tanggal`,concat_ws('',`pb`.`no_nota`,`pb`.`sufix_no_nota`) AS `keterangan`,`b`.`jum_bayar` AS `nominal`,'D' AS `tipe_transaksi` from ((((`serv_orderservice_bayar` `b` join `serv_orderservice_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`))) join `view_orderservice_bayar` `pb` on((`pb`.`id` = `b`.`id_orderservice`))) join `ms_penyedia` `s` on((`s`.`id_penyedia` = `pb`.`id_penyedia`))) join `ms_perkiraan` `p` on((`p`.`id` = `s`.`id_akun_hutang`))) union all select '2' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`t`.`id` AS `id_ref`,`t`.`no_transaksi_bayar` AS `nomor_ref`,`t`.`tanggal_bayar` AS `tanggal_ref`,`t`.`tanggal_bayar` AS `tanggal`,`t`.`no_transaksi_bayar` AS `keterangan`,sum(`b`.`jum_bayar`) AS `nominal`,'K' AS `tipe_transaksi` from ((((`serv_orderservice_bayar` `b` join `serv_orderservice_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`))) join `view_orderservice_bayar` `pb` on((`pb`.`id` = `b`.`id_orderservice`))) join `ms_penyedia` `s` on((`s`.`id_penyedia` = `pb`.`id_penyedia`))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun`))) group by `b`.`id_transaksi_bayar`;

-- membuang struktur untuk view si_sarung.jurnal_pembelian
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_pembelian`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_pembelian` AS select `r`.`rows` AS `rows`,(case when ((`r`.`kode` = `p`.`id_akun_hutang`) and (`a`.`id` is not null)) then `a`.`id` else `r`.`id` end) AS `id_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_hutang`) and (`a`.`id` is not null)) then `a`.`kd_rek_1` else `r`.`kd_rek_1` end) AS `kd_rek_1`,(case when ((`r`.`kode` = `p`.`id_akun_hutang`) and (`a`.`id` is not null)) then `a`.`kode_perkiraan` else `r`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_hutang`) and (`a`.`id` is not null)) then (case when (`s`.`id_akun_hutang` = 775) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) when (`s`.`id_akun_hutang` = 58) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) else `a`.`nama_perkiraan` end) else `r`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_hutang`) and (`a`.`id` is not null)) then `a`.`saldo_normal` else `r`.`saldo_normal` end) AS `saldo_normal`,(case when ((`r`.`kode` = `p`.`id_akun_hutang`) and (`a`.`id` is not null)) then `a`.`parent` else `r`.`parent` end) AS `parent`,`p`.`id_pembelian` AS `id_ref`,concat_ws('',`p`.`no_faktur`,`p`.`sufix_no_faktur`) AS `nomor_ref`,`p`.`tanggal_faktur` AS `tanggal_ref`,`p`.`tanggal` AS `tanggal`,`p`.`keterangan` AS `keterangan`,(case when (`p`.`id_akun_hutang` = `r`.`kode`) then (((`p`.`nominal_total` + `p`.`nominal_pajak`) + `p`.`nominal_ongkir`) - `p`.`nominal_potongan`) when (`p`.`id_akun_pajak` = `r`.`kode`) then `p`.`nominal_pajak` when (`p`.`id_akun_potongan` = `r`.`kode`) then `p`.`nominal_potongan` end) AS `nominal`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_potongan` AS `nominal_potongan`,`p`.`nominal_ongkir` AS `nominal_ongkir`,`r`.`tipe_id_akun_jurnal` AS `tipe_transaksi` from (((`a_pem_pembelian` `p` join `a_ref_jurnal` `r` on(((`p`.`id_akun_hutang` = `r`.`kode`) or (`p`.`id_akun_potongan` = `r`.`kode`) or (`p`.`id_akun_pajak` = `r`.`kode`)))) join `ms_penyedia` `s` on((`s`.`id_penyedia` = `p`.`id_penyedia`))) left join `ms_perkiraan` `a` on((`a`.`id` = `s`.`id_akun_hutang`))) union all select 1 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,`a`.`nama_perkiraan` AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`p`.`id_pembelian` AS `id_ref`,concat_ws('',`p`.`no_faktur`,`p`.`sufix_no_faktur`) AS `nomor_ref`,`p`.`tanggal_faktur` AS `tanggal_ref`,`p`.`tanggal` AS `tanggal`,`b`.`nama_barang` AS `keterangan`,(case when (`p`.`termasuk_pajak` = 1) then round(((100 * `d`.`total`) / 110),2) else `d`.`total` end) AS `nominal`,(case when (`p`.`pajak` = 1) then ((`d`.`total` - `p`.`nominal_potongan`) / 10) else 0 end) AS `nominal_pajak`,`p`.`nominal_potongan` AS `nominal_potongan`,`p`.`nominal_ongkir` AS `nominal_ongkir`,'D' AS `tipe_transaksi` from (((`pem_pembelian_barang` `d` join `pem_pembelian` `p` on((`p`.`id_pembelian` = `d`.`id_pembelian`))) join `view_ms_barang_full` `b` on((`b`.`id` = `d`.`id_barang`))) join `ms_perkiraan` `a` on((`a`.`id` = (case when ((`b`.`id_akun` <> 0) and (`b`.`id_akun` is not null)) then `b`.`id_akun` else `b`.`id_akun_pembelian` end))));

-- membuang struktur untuk view si_sarung.jurnal_pembelian_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_pembelian_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_pembelian_bayar` AS select '1' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,(case when (`s`.`id_akun_hutang` = 775) then concat_ws(' ',`p`.`nama_perkiraan`,`pb`.`nama_penyedia`) when (`s`.`id_akun_hutang` = 58) then concat_ws(' ',`p`.`nama_perkiraan`,`pb`.`nama_penyedia`) else `p`.`nama_perkiraan` end) AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`t`.`id` AS `id_ref`,`t`.`no_transaksi_bayar` AS `nomor_ref`,`t`.`tanggal_bayar` AS `tanggal_ref`,`t`.`tanggal_bayar` AS `tanggal`,concat_ws('',`pb`.`no_faktur`,`pb`.`sufix_no_faktur`) AS `keterangan`,`b`.`jum_bayar` AS `nominal`,'D' AS `tipe_transaksi` from ((((`pem_pembelian_bayar` `b` join `pem_pembelian_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`))) join `view_pembelian_bayar` `pb` on((`pb`.`id_pembelian` = `b`.`id_pembelian`))) join `ms_penyedia` `s` on((`s`.`id_penyedia` = `pb`.`id_penyedia`))) join `ms_perkiraan` `p` on((`p`.`id` = `s`.`id_akun_hutang`))) union all select '2' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`t`.`id` AS `id_ref`,`t`.`no_transaksi_bayar` AS `nomor_ref`,`t`.`tanggal_bayar` AS `tanggal_ref`,`t`.`tanggal_bayar` AS `tanggal`,`t`.`no_transaksi_bayar` AS `keterangan`,sum(`b`.`jum_bayar`) AS `nominal`,'K' AS `tipe_transaksi` from ((((`pem_pembelian_bayar` `b` join `pem_pembelian_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`))) join `view_pembelian_bayar` `pb` on((`pb`.`id_pembelian` = `b`.`id_pembelian`))) join `ms_penyedia` `s` on((`s`.`id_penyedia` = `pb`.`id_penyedia`))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun`))) group by `b`.`id_transaksi_bayar`;

-- membuang struktur untuk view si_sarung.jurnal_penerimaan_pembayaran_kasbon
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_penerimaan_pembayaran_kasbon`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_penerimaan_pembayaran_kasbon` AS (select 1 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`kkpb`.`id` AS `id_ref`,`kkt`.`no_transaksi_bayar` AS `nomor_ref`,`kkpb`.`tgl_bayar` AS `tanggal_ref`,`kkp`.`tanggal_transaksi` AS `tanggal`,`kkp`.`keterangan` AS `keterangan`,`kkpb`.`jum_bayar` AS `nominal`,'D' AS `tipe_transaksi`,'kasbon_pegawai' AS `flag`,1 AS `jenis_kasbon` from (((`keu_kasbon_pegawai_bayar` `kkpb` join `keu_kasbon_pegawai` `kkp` on((`kkpb`.`id_kasbon_pegawai` = `kkp`.`id`))) join `keu_kasbon_pegawai_transaksi_bayar` `kkt` on((`kkt`.`id` = `kkpb`.`id_transaksi_bayar`))) left join `ms_perkiraan` `mp` on((`kkpb`.`id_akun` = `mp`.`id`)))) union all (select 2 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else concat_ws(' ',`mp`.`nama_perkiraan`,`mpe`.`nama_pegawai`) end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`kkpb`.`id` AS `id_ref`,`kkt`.`no_transaksi_bayar` AS `nomor_ref`,`kkpb`.`tgl_bayar` AS `tanggal_ref`,`kkp`.`tanggal_transaksi` AS `tanggal`,`kkp`.`keterangan` AS `keterangan`,`kkpb`.`jum_bayar` AS `nominal`,'K' AS `tipe_transaksi`,'kasbon_pegawai' AS `flag`,1 AS `jenis_kasbon` from ((((`keu_kasbon_pegawai_bayar` `kkpb` join `keu_kasbon_pegawai` `kkp` on((`kkpb`.`id_kasbon_pegawai` = `kkp`.`id`))) join `keu_kasbon_pegawai_transaksi_bayar` `kkt` on((`kkt`.`id` = `kkpb`.`id_transaksi_bayar`))) join `ms_pegawai` `mpe` on((`kkp`.`id_pegawai` = `mpe`.`id_pegawai`))) left join `ms_perkiraan` `mp` on((`mpe`.`id_akun_piutang` = `mp`.`id`)))) union all (select 1 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`kkrb`.`id` AS `id_ref`,`kkt`.`no_transaksi_bayar` AS `nomor_ref`,`kkrb`.`tgl_bayar` AS `tanggal_ref`,`kkr`.`tanggal_transaksi` AS `tanggal`,`kkr`.`keterangan` AS `keterangan`,`kkrb`.`jum_bayar` AS `nominal`,'D' AS `tipe_transaksi`,'kasbon_rekanan' AS `flag`,2 AS `jenis_kasbon` from (((`keu_kasbon_rekanan_bayar` `kkrb` join `keu_kasbon_rekanan` `kkr` on((`kkrb`.`id_kasbon_rekanan` = `kkr`.`id`))) join `keu_kasbon_rekanan_transaksi_bayar` `kkt` on((`kkt`.`id` = `kkrb`.`id_transaksi_bayar`))) left join `ms_perkiraan` `mp` on((`kkrb`.`id_akun` = `mp`.`id`)))) union all (select 2 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else (case when (`kkr`.`id_rekanan` = 0) then concat_ws(' ',`mp`.`nama_perkiraan`,`mrk`.`nama`,'(MAKELAR)') else concat_ws(' ',`mp`.`nama_perkiraan`,`mr`.`nama`,concat_ws('','(',`mrk`.`nama`,')')) end) end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`kkrb`.`id` AS `id_ref`,`kkt`.`no_transaksi_bayar` AS `nomor_ref`,`kkrb`.`tgl_bayar` AS `tanggal_ref`,`kkr`.`tanggal_transaksi` AS `tanggal`,`kkr`.`keterangan` AS `keterangan`,`kkrb`.`jum_bayar` AS `nominal`,'K' AS `tipe_transaksi`,'kasbon_rekanan' AS `flag`,2 AS `jenis_kasbon` from (((((`keu_kasbon_rekanan_bayar` `kkrb` join `keu_kasbon_rekanan` `kkr` on((`kkrb`.`id_kasbon_rekanan` = `kkr`.`id`))) join `keu_kasbon_rekanan_transaksi_bayar` `kkt` on((`kkt`.`id` = `kkrb`.`id_transaksi_bayar`))) left join `ms_rekanan` `mr` on((`kkr`.`id_rekanan` = `mr`.`id_rekanan`))) left join `ms_rekanan_kelompok` `mrk` on((`kkr`.`id_kelompok` = `mrk`.`id_kelompok`))) left join `ms_perkiraan` `mp` on((`mrk`.`id_akun_piutang` = `mp`.`id`))));

-- membuang struktur untuk view si_sarung.jurnal_penjualan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_penjualan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_penjualan` AS select `r`.`rows` AS `rows`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`id` else `r`.`id` end) AS `id_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`kd_rek_1` else `r`.`kd_rek_1` end) AS `kd_rek_1`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`kode_perkiraan` else `r`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then (case when (`a`.`id` = 21) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) when (`a`.`id` = 292) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) else `a`.`nama_perkiraan` end) else `r`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`saldo_normal` else `r`.`saldo_normal` end) AS `saldo_normal`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`parent` else `r`.`parent` end) AS `parent`,`p`.`id_penjualan` AS `id_ref`,concat_ws('',`p`.`no_faktur`,`p`.`sufix_no_faktur`) AS `nomor_ref`,`p`.`tanggal_faktur` AS `tanggal_ref`,`p`.`tanggal` AS `tanggal`,`p`.`keterangan` AS `keterangan`,(case when (`p`.`id_akun_piutang` = `r`.`kode`) then ((`p`.`nominal_total` + `p`.`nominal_pajak`) - `p`.`nominal_potongan`) when (`p`.`id_akun_pajak` = `r`.`kode`) then `p`.`nominal_pajak` when (`p`.`id_akun_potongan` = `r`.`kode`) then `p`.`nominal_potongan` when (`p`.`id_akun_penjualan` = `r`.`kode`) then `p`.`nominal_total` end) AS `nominal`,`p`.`mata_uang` AS `mata_uang`,`p`.`kurs_jual` AS `kurs_jual`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_potongan` AS `nominal_potongan`,`r`.`tipe_id_akun_jurnal` AS `tipe_transaksi` from (((`a_pen_penjualan` `p` join `a_ref_jurnal` `r` on(((`p`.`id_akun_piutang` = `r`.`kode`) or (`p`.`id_akun_potongan` = `r`.`kode`) or (`p`.`id_akun_pajak` = `r`.`kode`) or (`p`.`id_akun_penjualan` = `r`.`kode`)))) join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `p`.`id_pelanggan`))) left join `ms_perkiraan` `a` on((`a`.`id` = `s`.`id_akun_piutang`))) where ((`r`.`id` <> 90) or (`p`.`id_akun_penjualan` <> 204)) union all select 2 AS `rows`,`mp`.`id` AS `id_perkiraan`,`mp`.`kd_rek_1` AS `kd_rek_1`,`mp`.`kode_perkiraan` AS `kode_perkiraan`,(case when (`mp`.`id` = 90) then concat_ws(' ',`mp`.`nama_perkiraan`,`mb`.`nama_barang`) else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,`mp`.`saldo_normal` AS `saldo_normal`,`mp`.`parent` AS `parent`,`p`.`id_penjualan` AS `id_ref`,concat_ws('',`p`.`no_faktur`,`p`.`sufix_no_faktur`) AS `nomor_ref`,`p`.`tanggal_faktur` AS `tanggal_ref`,`p`.`tanggal` AS `tanggal`,`p`.`keterangan` AS `keterangan`,`pb`.`total` AS `nominal`,`p`.`mata_uang` AS `mata_uang`,`p`.`kurs_jual` AS `kurs_jual`,(case when (`p`.`pajak` = 1) then ((`pb`.`total` - `pb`.`potongan`) / 10) else 0 end) AS `nominal_pajak`,`p`.`nominal_potongan` AS `nominal_potongan`,'K' AS `tipe_transaksi` from (((`pen_penjualan_barang` `pb` join `pen_penjualan` `p` on((`p`.`id_penjualan` = `pb`.`id_penjualan`))) join `ms_barang` `mb` on((`mb`.`id` = `pb`.`id_barang`))) join `ms_perkiraan` `mp` on((`mp`.`id` = `mb`.`id_akun_penjualan`))) union all select 1 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,(case when (`a`.`id` = 26) then concat_ws(' ',`a`.`nama_perkiraan`,`b`.`nama_barang`) else `a`.`nama_perkiraan` end) AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`p`.`id_penjualan` AS `id_ref`,concat_ws('',`p`.`no_faktur`,`p`.`sufix_no_faktur`) AS `nomor_ref`,`p`.`tanggal_faktur` AS `tanggal_ref`,`p`.`tanggal` AS `tanggal`,`b`.`nama_barang` AS `keterangan`,(case when (`p`.`pajak` = 1) then round(((100 * `d`.`total`) / 110),2) else `d`.`total` end) AS `nominal`,`p`.`mata_uang` AS `mata_uang`,`p`.`kurs_jual` AS `kurs_jual`,(case when (`p`.`pajak` = 1) then ((`d`.`total` - `p`.`nominal_potongan`) / 10) else 0 end) AS `nominal_pajak`,`p`.`nominal_potongan` AS `nominal_potongan`,'D' AS `tipe_transaksi` from (((`pen_penjualan_barang` `d` join `pen_penjualan` `p` on((`p`.`id_penjualan` = `d`.`id_penjualan`))) join `view_ms_barang_full` `b` on((`b`.`id` = `d`.`id_barang`))) join `ms_perkiraan` `a` on((`a`.`id` = `b`.`id_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_penjualan_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_penjualan_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_penjualan_bayar` AS select 1 AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,(case when (`p`.`id` = 21) then concat_ws(' ',`p`.`nama_perkiraan`,`s`.`nama`) when (`p`.`id` = 292) then concat_ws(' ',`p`.`nama_perkiraan`,`s`.`nama`) else `p`.`nama_perkiraan` end) AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`t`.`id` AS `id_ref`,`t`.`no_transaksi_bayar` AS `nomor_ref`,`t`.`tanggal_bayar` AS `tanggal_ref`,`t`.`tanggal_bayar` AS `tanggal`,concat_ws('',`pb`.`no_faktur`,`pb`.`sufix_no_faktur`) AS `keterangan`,`pp`.`kurs_jual` AS `kurs_jual`,`b`.`jum_bayar` AS `nominal`,'K' AS `tipe_transaksi` from (((((`pen_penjualan_bayar` `b` join `pen_penjualan_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`))) join `pen_penjualan` `pp` on((`pp`.`id_penjualan` = `b`.`id_penjualan`))) join `view_penjualan_bayar` `pb` on((`pb`.`id_penjualan` = `b`.`id_penjualan`))) join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `pb`.`id_pelanggan`))) join `ms_perkiraan` `p` on((`p`.`id` = `s`.`id_akun_piutang`))) where (`pb`.`kode_sebagai` = 2) union all select 2 AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`t`.`id` AS `id_ref`,`t`.`no_transaksi_bayar` AS `nomor_ref`,`t`.`tanggal_bayar` AS `tanggal_ref`,`t`.`tanggal_bayar` AS `tanggal`,`t`.`no_transaksi_bayar` AS `keterangan`,`pp`.`kurs_jual` AS `kurs_jual`,sum(`b`.`jum_bayar`) AS `nominal`,'D' AS `tipe_transaksi` from (((((`pen_penjualan_bayar` `b` join `pen_penjualan_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`))) join `pen_penjualan` `pp` on((`pp`.`id_penjualan` = `b`.`id_penjualan`))) join `view_penjualan_bayar` `pb` on((`pb`.`id_penjualan` = `b`.`id_penjualan`))) join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `pb`.`id_pelanggan`))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun`))) where (`pb`.`kode_sebagai` = 2) group by `b`.`id_transaksi_bayar`;

-- membuang struktur untuk view si_sarung.jurnal_penjualan_retur
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_penjualan_retur`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_penjualan_retur` AS select `r`.`rows` AS `rows`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`id` else `r`.`id` end) AS `id_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`kd_rek_1` else `r`.`kd_rek_1` end) AS `kd_rek_1`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`kode_perkiraan` else `r`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then (case when (`a`.`id` = 21) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) when (`a`.`id` = 292) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) else `a`.`nama_perkiraan` end) else `r`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`saldo_normal` else `r`.`saldo_normal` end) AS `saldo_normal`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`parent` else `r`.`parent` end) AS `parent`,`p`.`id_penjualan` AS `id_ref`,concat_ws('',`p`.`no_retur`,`p`.`sufix_no_retur`) AS `nomor_ref`,`p`.`tanggal_retur` AS `tanggal_ref`,`p`.`tanggal` AS `tanggal`,`p`.`keterangan` AS `keterangan`,(case when (`p`.`id_akun_piutang` = `r`.`kode`) then ((`p`.`nominal_total` + `p`.`nominal_pajak`) - `p`.`nominal_potongan`) when (`p`.`id_akun_pajak` = `r`.`kode`) then `p`.`nominal_pajak` when (`p`.`id_akun_potongan` = `r`.`kode`) then `p`.`nominal_potongan` when (`p`.`id_akun_retur_penjualan` = `r`.`kode`) then `p`.`nominal_total` end) AS `nominal`,`p`.`mata_uang` AS `mata_uang`,`p`.`kurs_jual` AS `kurs_jual`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_potongan` AS `nominal_potongan`,`r`.`tipe_id_akun_jurnal` AS `tipe_transaksi` from (((`a_pen_penjualan_retur` `p` join `a_ref_jurnal` `r` on(((`p`.`id_akun_piutang` = `r`.`kode`) or (`p`.`id_akun_potongan` = `r`.`kode`) or (`p`.`id_akun_pajak` = `r`.`kode`) or (`p`.`id_akun_retur_penjualan` = `r`.`kode`)))) join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `p`.`id_pelanggan`))) left join `ms_perkiraan` `a` on((`a`.`id` = `s`.`id_akun_piutang`))) union all select 2 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,`a`.`nama_perkiraan` AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`p`.`id_penjualan` AS `id_ref`,concat_ws('',`p`.`no_retur`,`p`.`sufix_no_retur`) AS `nomor_ref`,`p`.`tanggal_retur` AS `tanggal_ref`,`p`.`tanggal` AS `tanggal`,`b`.`nama_barang` AS `keterangan`,(case when (`p`.`pajak` = 1) then round(((100 * `d`.`total_retur`) / 110),2) else `d`.`total_retur` end) AS `nominal`,`p`.`mata_uang` AS `mata_uang`,`p`.`kurs_jual` AS `kurs_jual`,(case when (`p`.`pajak` = 1) then ((`d`.`total_retur` - `p`.`nominal_potongan`) / 10) else 0 end) AS `nominal_pajak`,`p`.`nominal_potongan` AS `nominal_potongan`,'D' AS `tipe_transaksi` from (((`a_pen_penjualan_retur_barang` `d` join `pen_penjualan_retur` `p` on((`p`.`id` = `d`.`id_penjualan_retur`))) join `view_ms_barang_full` `b` on((`b`.`id` = `d`.`id_barang`))) join `ms_perkiraan` `a` on((`a`.`id` = `b`.`id_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_penjualan_retur_nonfaktur
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_penjualan_retur_nonfaktur`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_penjualan_retur_nonfaktur` AS select `r`.`rows` AS `rows`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`id` else `r`.`id` end) AS `id_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`kd_rek_1` else `r`.`kd_rek_1` end) AS `kd_rek_1`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`kode_perkiraan` else `r`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then (case when (`a`.`id` = 21) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) when (`a`.`id` = 292) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) else `a`.`nama_perkiraan` end) else `r`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`saldo_normal` else `r`.`saldo_normal` end) AS `saldo_normal`,(case when ((`r`.`kode` = `p`.`id_akun_piutang`) and (`a`.`id` is not null)) then `a`.`parent` else `r`.`parent` end) AS `parent`,0 AS `id_ref`,concat_ws('',`p`.`no_retur`,`p`.`sufix_no_retur`) AS `nomor_ref`,`p`.`tanggal_retur` AS `tanggal_ref`,`p`.`tanggal` AS `tanggal`,`p`.`keterangan` AS `keterangan`,(case when (`p`.`id_akun_piutang` = `r`.`kode`) then ((`p`.`nominal_total` + `p`.`nominal_pajak`) - `p`.`nominal_potongan`) when (`p`.`id_akun_pajak` = `r`.`kode`) then `p`.`nominal_pajak` when (`p`.`id_akun_potongan` = `r`.`kode`) then `p`.`nominal_potongan` when (`p`.`id_akun_retur_penjualan` = `r`.`kode`) then `p`.`nominal_total` end) AS `nominal`,`p`.`mata_uang` AS `mata_uang`,`p`.`kurs_jual` AS `kurs_jual`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_potongan` AS `nominal_potongan`,`r`.`tipe_id_akun_jurnal` AS `tipe_transaksi` from (((`a_pen_penjualan_retur_nonfaktur` `p` join `a_ref_jurnal` `r` on(((`p`.`id_akun_piutang` = `r`.`kode`) or (`p`.`id_akun_potongan` = `r`.`kode`) or (`p`.`id_akun_pajak` = `r`.`kode`) or (`p`.`id_akun_retur_penjualan` = `r`.`kode`)))) join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `p`.`id_pelanggan`))) left join `ms_perkiraan` `a` on((`a`.`id` = `s`.`id_akun_piutang`))) union all select 2 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,`a`.`nama_perkiraan` AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,0 AS `id_ref`,concat_ws('',`p`.`no_retur`,`p`.`sufix_no_retur`) AS `nomor_ref`,`p`.`tanggal_retur` AS `tanggal_ref`,`p`.`tanggal` AS `tanggal`,`b`.`nama_barang` AS `keterangan`,(case when (`p`.`pajak` = 1) then round(((100 * `d`.`total_retur`) / 110),2) else `d`.`total_retur` end) AS `nominal`,`p`.`mata_uang` AS `mata_uang`,`p`.`kurs_jual` AS `kurs_jual`,(case when (`p`.`pajak` = 1) then ((`d`.`total_retur` - `p`.`nominal_potongan`) / 10) else 0 end) AS `nominal_pajak`,`p`.`nominal_potongan` AS `nominal_potongan`,'D' AS `tipe_transaksi` from (((`a_pen_penjualan_retur_barang_nonfaktur` `d` join `pen_penjualan_retur_nonfaktur` `p` on((`p`.`id` = `d`.`id_penjualan_retur`))) join `view_ms_barang_full` `b` on((`b`.`id` = `d`.`id_barang`))) join `ms_perkiraan` `a` on((`a`.`id` = `b`.`id_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_penyesuaian_sewa
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_penyesuaian_sewa`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_penyesuaian_sewa` AS select 1 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,`a`.`nama_perkiraan` AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`jps`.`id_jsh` AS `id_ref`,`jps`.`nomor_jurnal` AS `nomor_ref`,`jps`.`tanggal_jurnal` AS `tanggal_ref`,`jps`.`tanggal_jurnal` AS `tanggal`,`jps`.`keterangan` AS `keterangan`,`jps`.`nominal` AS `nominal`,1 AS `mata_uang`,1 AS `kurs_jual`,`jps`.`tipe_akun` AS `tipe_transaksi` from ((`view_jurnal_peny_sewa` `jps` join `ms_penyedia` `s` on((`s`.`id_penyedia` = `jps`.`id_penyedia`))) join `ms_perkiraan` `a` on((`a`.`id` = `jps`.`id_akun`))) union all select 2 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,(case when isnull(`a`.`id`) then '' else `a`.`nama_perkiraan` end) AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`jps`.`id_jsh` AS `id_ref`,`jps`.`nomor_jurnal` AS `nomor_ref`,`jps`.`tanggal_jurnal` AS `tanggal_ref`,`jps`.`tanggal_jurnal` AS `tanggal`,`jps`.`keterangan` AS `keterangan`,`jps`.`nominal` AS `nominal`,1 AS `mata_uang`,1 AS `kurs_jual`,'K' AS `tipe_transaksi` from (`view_jurnal_peny_sewa` `jps` join `ms_perkiraan` `a` on((`a`.`id` = `jps`.`id_akun_sewa`)));

-- membuang struktur untuk view si_sarung.jurnal_peny_piutang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_peny_piutang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_peny_piutang` AS select 2 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,(case when (`s`.`id_akun_piutang` = 21) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) when (`s`.`id_akun_piutang` = 292) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) else `a`.`nama_perkiraan` end) AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`jpp`.`id_jph` AS `id_ref`,`jpp`.`nomor_jurnal` AS `nomor_ref`,`jpp`.`tanggal_jurnal` AS `tanggal_ref`,`jpp`.`tanggal_jurnal` AS `tanggal`,`jpp`.`keterangan` AS `keterangan`,`jpp`.`nominal` AS `nominal`,`pjl`.`mata_uang` AS `mata_uang`,`pjl`.`kurs_jual` AS `kurs_jual`,'K' AS `tipe_transaksi` from (((`view_jurnal_peny_piutang` `jpp` join `a_pen_penjualan` `pjl` on((`pjl`.`id_penjualan` = `jpp`.`id_penjualan`))) join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `jpp`.`id_pelanggan`))) join `ms_perkiraan` `a` on((`a`.`id` = `s`.`id_akun_piutang`))) union all select 1 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,`a`.`nama_perkiraan` AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`jpp`.`id_jph` AS `id_ref`,`jpp`.`nomor_jurnal` AS `nomor_ref`,`jpp`.`tanggal_jurnal` AS `tanggal_ref`,`jpp`.`tanggal_jurnal` AS `tanggal`,`jpp`.`keterangan` AS `keterangan`,`jpp`.`nominal` AS `nominal`,`pjl`.`mata_uang` AS `mata_uang`,`pjl`.`kurs_jual` AS `kurs_jual`,`jpp`.`tipe_akun` AS `tipe_transaksi` from (((`view_jurnal_peny_piutang` `jpp` join `a_pen_penjualan` `pjl` on((`pjl`.`id_penjualan` = `jpp`.`id_penjualan`))) join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `jpp`.`id_pelanggan`))) join `ms_perkiraan` `a` on((`a`.`id` = `jpp`.`id_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_perkiraan_saldo_awal
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_perkiraan_saldo_awal`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_perkiraan_saldo_awal` AS select (case when (`a`.`saldo_normal` = 'D') then 1 else 2 end) AS `ROWS`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,`a`.`nama_perkiraan` AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`a`.`used` AS `used`,`s`.`id` AS `id_ref`,'SALDO AWAL' AS `nomor_ref`,`s`.`tanggal_awal` AS `tanggal_ref`,`s`.`tanggal_awal` AS `tanggal`,'SALDO AWAL' AS `keterangan`,ifnull(`s`.`nominal`,0) AS `nominal`,`a`.`saldo_normal` AS `tipe_transaksi` from (`ms_perkiraan` `a` left join `view_saldoawal` `s` on((`s`.`id` = `a`.`id`)));

-- membuang struktur untuk view si_sarung.jurnal_piutangawal_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_piutangawal_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_piutangawal_bayar` AS select 1 AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,(case when (`p`.`id` = 21) then concat_ws(' ',`p`.`nama_perkiraan`,`s`.`nama`) when (`p`.`id` = 292) then concat_ws(' ',`p`.`nama_perkiraan`,`s`.`nama`) else `p`.`nama_perkiraan` end) AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`t`.`id` AS `id_ref`,`t`.`no_transaksi_bayar` AS `nomor_ref`,`t`.`tanggal_bayar` AS `tanggal_ref`,`t`.`tanggal_bayar` AS `tanggal`,concat_ws('',`pb`.`no_faktur`,`pb`.`sufix_no_faktur`) AS `keterangan`,1 AS `kurs_jual`,`b`.`jum_bayar` AS `nominal`,'K' AS `tipe_transaksi` from (((((`pen_piutangawal_bayar` `b` join `pen_penjualan_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`))) join `pen_piutangawal` `pp` on((`pp`.`id` = `b`.`id_piutangawal`))) join `view_penjualan_bayar` `pb` on((`pb`.`id_penjualan` = `b`.`id_piutangawal`))) join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `pb`.`id_pelanggan`))) join `ms_perkiraan` `p` on((`p`.`id` = `s`.`id_akun_piutang`))) where (`pb`.`kode_sebagai` = 1) union all select 2 AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`t`.`id` AS `id_ref`,`t`.`no_transaksi_bayar` AS `nomor_ref`,`t`.`tanggal_bayar` AS `tanggal_ref`,`t`.`tanggal_bayar` AS `tanggal`,`t`.`no_transaksi_bayar` AS `keterangan`,1 AS `kurs_jual`,sum(`b`.`jum_bayar`) AS `nominal`,'D' AS `tipe_transaksi` from (((((`pen_piutangawal_bayar` `b` join `pen_penjualan_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`))) join `pen_piutangawal` `pp` on((`pp`.`id` = `b`.`id_piutangawal`))) join `view_penjualan_bayar` `pb` on((`pb`.`id_penjualan` = `b`.`id_piutangawal`))) join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `pb`.`id_pelanggan`))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun`))) where (`pb`.`kode_sebagai` = 1) group by `b`.`id_transaksi_bayar`;

-- membuang struktur untuk view si_sarung.jurnal_rtp
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_rtp`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_rtp` AS select 1 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,(case when (`s`.`id_akun_piutang` = 21) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) when (`s`.`id_akun_piutang` = 292) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) else `a`.`nama_perkiraan` end) AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`rtp`.`id` AS `id_ref`,concat_ws('',`rtp`.`no_retur`,`rtp`.`sufix_no_retur`) AS `nomor_ref`,`rtp`.`tanggal_retur` AS `tanggal_ref`,`rtp`.`tanggal_retur` AS `tanggal`,`rtp`.`keterangan` AS `keterangan`,`rtp`.`nominal_retur` AS `nominal`,`rtp`.`mata_uang` AS `mata_uang`,`rtp`.`kurs` AS `kurs_jual`,'D' AS `tipe_transaksi` from ((`retur_tagihan_penjualan` `rtp` join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `rtp`.`id_pelanggan`))) left join `ms_perkiraan` `a` on((`a`.`id` = `s`.`id_akun_piutang`))) union all select 2 AS `rows`,`p`.`id_akun` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,`a`.`nama_perkiraan` AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`p`.`id` AS `id_ref`,concat_ws('',`p`.`no_retur`,`p`.`sufix_no_retur`) AS `nomor_ref`,`p`.`tanggal_retur` AS `tanggal_ref`,`p`.`tanggal_retur` AS `tanggal`,`p`.`keterangan` AS `keterangan`,`p`.`nominal_retur` AS `nominal`,`p`.`mata_uang` AS `mata_uang`,`p`.`kurs` AS `kurs_jual`,`p`.`tipe_id_akun` AS `tipe_transaksi` from ((`retur_tagihan_penjualan` `p` join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `p`.`id_pelanggan`))) left join `ms_perkiraan` `a` on((`a`.`id` = `p`.`id_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_rtpa
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_rtpa`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_rtpa` AS select 1 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,(case when (`s`.`id_akun_piutang` = 21) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) when (`s`.`id_akun_piutang` = 292) then concat_ws(' ',`a`.`nama_perkiraan`,`s`.`nama`) else `a`.`nama_perkiraan` end) AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`rtp`.`id` AS `id_ref`,concat_ws('',`rtp`.`no_retur`,`rtp`.`sufix_no_retur`) AS `nomor_ref`,`rtp`.`tanggal_retur` AS `tanggal_ref`,`rtp`.`tanggal_retur` AS `tanggal`,`rtp`.`keterangan` AS `keterangan`,`rtp`.`nominal_retur` AS `nominal`,`rtp`.`mata_uang` AS `mata_uang`,`rtp`.`kurs` AS `kurs_jual`,'D' AS `tipe_transaksi` from ((`retur_tagihan_piutangawal` `rtp` join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `rtp`.`id_pelanggan`))) left join `ms_perkiraan` `a` on((`a`.`id` = `s`.`id_akun_piutang`))) union all select 2 AS `rows`,`p`.`id_akun` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,`a`.`nama_perkiraan` AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`p`.`id` AS `id_ref`,concat_ws('',`p`.`no_retur`,`p`.`sufix_no_retur`) AS `nomor_ref`,`p`.`tanggal_retur` AS `tanggal_ref`,`p`.`tanggal_retur` AS `tanggal`,`p`.`keterangan` AS `keterangan`,`p`.`nominal_retur` AS `nominal`,`p`.`mata_uang` AS `mata_uang`,`p`.`kurs` AS `kurs_jual`,`p`.`tipe_id_akun` AS `tipe_transaksi` from ((`retur_tagihan_piutangawal` `p` join `ms_pelanggan` `s` on((`s`.`id_pelanggan` = `p`.`id_pelanggan`))) left join `ms_perkiraan` `a` on((`a`.`id` = `p`.`id_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_sales_contract_tagihan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_sales_contract_tagihan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_sales_contract_tagihan` AS select (case when ((`s`.`dari_akun` = `p`.`id`) and (`s`.`tipe_id_akun` = 'D')) then '1' when ((`s`.`dari_akun` = `p`.`id`) and (`s`.`tipe_id_akun` = 'K')) then '2' end) AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`s`.`id` AS `id_ref`,`s`.`nomor_transaksi` AS `nomor_ref`,`s`.`tanggal_tagihan` AS `tanggal_ref`,`s`.`tanggal` AS `tanggal`,`rk`.`nama` AS `keterangan`,(case when (`s`.`dari_akun` = `p`.`id`) then `vs`.`nominal` end) AS `nominal`,(case when (`s`.`dari_akun` = `p`.`id`) then `s`.`tipe_id_akun` end) AS `tipe_transaksi` from (((`keu_sales_contract_tagihan` `s` join `ms_rekanan_kelompok` `rk` on((`rk`.`id_kelompok` = `s`.`id_rekanan`))) join `ms_perkiraan` `p` on((`p`.`id` = `s`.`dari_akun`))) join `a_view_keu_sales_contract_tagihan` `vs` on((`vs`.`id_sales_contract_tagihan` = `s`.`id`))) union all select (case when ((`d`.`ke_akun` = `p`.`id`) and (`d`.`tipe_id_akun` = 'D')) then '1' when ((`d`.`ke_akun` = `p`.`id`) and (`d`.`tipe_id_akun` = 'K')) then '2' end) AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`s`.`id` AS `id_ref`,`s`.`nomor_transaksi` AS `nomor_ref`,`s`.`tanggal_tagihan` AS `tanggal_ref`,`s`.`tanggal` AS `tanggal`,`d`.`keterangan` AS `keterangan`,(case when (`d`.`ke_akun` = `p`.`id`) then `d`.`nominal_transaksi` end) AS `nominal`,(case when (`d`.`ke_akun` = `p`.`id`) then `d`.`tipe_id_akun` end) AS `tipe_transaksi` from ((`keu_sales_contract_tagihan_detail` `d` join `keu_sales_contract_tagihan` `s` on((`s`.`id` = `d`.`id_sales_contract_tagihan`))) join `ms_perkiraan` `p` on((`p`.`id` = `d`.`ke_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_sewa
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_sewa`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_sewa` AS select '1' AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`s`.`id` AS `id_ref`,`s`.`no_faktur` AS `nomor_ref`,`s`.`tanggal_faktur` AS `tanggal_ref`,`s`.`tanggal_faktur` AS `tanggal`,`s`.`keterangan` AS `keterangan`,(`s`.`tahun` * `s`.`harga_per_tahun`) AS `nominal`,'D' AS `tipe_transaksi` from ((`pem_sewa` `s` join `ms_penyedia` `mpd` on((`mpd`.`id_penyedia` = `s`.`id_penyedia`))) left join `ms_perkiraan` `mp` on((`s`.`id_akun_sewa` = `mp`.`id`))) union all select '2' AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else (case when (`mpe`.`id_akun_hutang` = 775) then concat_ws(' ',`mp`.`nama_perkiraan`,`mpe`.`nama`) when (`mpe`.`id_akun_hutang` = 58) then concat_ws(' ',`mp`.`nama_perkiraan`,`mpe`.`nama`) else `mp`.`nama_perkiraan` end) end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`s`.`id_sewa` AS `id_ref`,`s`.`no_faktur` AS `nomor_ref`,`s`.`tanggal_faktur` AS `tanggal_ref`,`s`.`tanggal_faktur` AS `tanggal`,`s`.`keterangan` AS `keterangan`,`s`.`nominal_total` AS `nominal`,'K' AS `tipe_transaksi` from ((`view_sewa_bayar` `s` join `ms_penyedia` `mpe` on((`s`.`id_penyedia` = `mpe`.`id_penyedia`))) left join `ms_perkiraan` `mp` on((`mpe`.`id_akun_hutang` = `mp`.`id`)));

-- membuang struktur untuk view si_sarung.jurnal_sewa_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_sewa_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_sewa_bayar` AS select '1' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,(case when isnull(`p`.`id`) then '' else (case when (`s`.`id_akun_hutang` = 775) then concat_ws(' ',`p`.`nama_perkiraan`,`s`.`nama`) when (`s`.`id_akun_hutang` = 58) then concat_ws(' ',`p`.`nama_perkiraan`,`s`.`nama`) else `p`.`nama_perkiraan` end) end) AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`t`.`id` AS `id_ref`,`t`.`no_transaksi_bayar` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal_bayar` AS `tanggal`,`sb`.`no_faktur` AS `keterangan`,`b`.`jumlah_bayar` AS `nominal`,'D' AS `tipe_transaksi` from ((((`pem_sewa_bayar` `b` join `pem_sewa_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`))) join `view_sewa_bayar` `sb` on((`sb`.`id_sewa` = `b`.`id_sewa`))) join `ms_penyedia` `s` on((`s`.`id_penyedia` = `sb`.`id_penyedia`))) join `ms_perkiraan` `p` on((`p`.`id` = `s`.`id_akun_hutang`))) union all select '2' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`t`.`id` AS `id_ref`,`t`.`no_transaksi_bayar` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal_bayar` AS `tanggal`,`t`.`no_transaksi_bayar` AS `keterangan`,sum(`b`.`jumlah_bayar`) AS `nominal`,'K' AS `tipe_transaksi` from ((((`pem_sewa_bayar` `b` join `pem_sewa_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`))) join `view_sewa_bayar` `sb` on((`sb`.`id_sewa` = `b`.`id_sewa`))) join `ms_penyedia` `s` on((`s`.`id_penyedia` = `sb`.`id_penyedia`))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun_bayar`))) group by `b`.`id_transaksi_bayar`;

-- membuang struktur untuk view si_sarung.jurnal_sumber_dana
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_sumber_dana`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_sumber_dana` AS select (case when ((`s`.`dari_akun` = `p`.`id`) and (`s`.`tipe_id_akun` = 'D')) then '1' when ((`s`.`dari_akun` = `p`.`id`) and (`s`.`tipe_id_akun` = 'K')) then '2' end) AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`kode_perkiraan` AS `kode_perkiraan_dariakun`,`p`.`nama_perkiraan` AS `nama_perkiraan_dariakun`,`mp`.`kode_perkiraan` AS `kode_perkiraan_keakun`,`mp`.`nama_perkiraan` AS `nama_perkiraan_keakun`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`s`.`id` AS `id_ref`,`s`.`nomor_transaksi` AS `nomor_ref`,`s`.`tanggal_transaksi` AS `tanggal_ref`,`s`.`tanggal_transaksi` AS `tanggal`,`vs`.`keterangan` AS `keterangan`,(case when (`s`.`dari_akun` = `p`.`id`) then `vs`.`nominal_transaksi` end) AS `nominal`,(case when (`s`.`dari_akun` = `p`.`id`) then `s`.`tipe_id_akun` end) AS `tipe_transaksi` from (((`keu_sumber_dana` `s` left join `ms_perkiraan` `p` on((`p`.`id` = `s`.`dari_akun`))) left join `a_view_keu_sumber_dana_detail` `vs` on((`vs`.`id_keu_sumber_dana` = `s`.`id`))) left join `ms_perkiraan` `mp` on((`mp`.`id` = `vs`.`ke_akun`))) union all select (case when ((`d`.`ke_akun` = `p`.`id`) and (`d`.`tipe_id_akun` = 'D')) then '1' when ((`d`.`ke_akun` = `p`.`id`) and (`d`.`tipe_id_akun` = 'K')) then '2' end) AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`mp`.`kode_perkiraan` AS `kode_perkiraan_dariakun`,`mp`.`nama_perkiraan` AS `nama_perkiraan_dariakun`,`p`.`kode_perkiraan` AS `kode_perkiraan_keakun`,`p`.`nama_perkiraan` AS `nama_perkiraan_keakun`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`s`.`id` AS `id_ref`,`s`.`nomor_transaksi` AS `nomor_ref`,`s`.`tanggal_transaksi` AS `tanggal_ref`,`s`.`tanggal_transaksi` AS `tanggal`,`d`.`keterangan` AS `keterangan`,(case when (`d`.`ke_akun` = `p`.`id`) then `d`.`nominal_transaksi` end) AS `nominal`,(case when (`d`.`ke_akun` = `p`.`id`) then `d`.`tipe_id_akun` end) AS `tipe_transaksi` from (((`keu_sumber_dana_detail` `d` join `keu_sumber_dana` `s` on((`s`.`id` = `d`.`id_keu_sumber_dana`))) join `ms_perkiraan` `mp` on((`mp`.`id` = `s`.`dari_akun`))) join `ms_perkiraan` `p` on((`p`.`id` = `d`.`ke_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_terima_pembayaran_kasbon_pegawai
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_terima_pembayaran_kasbon_pegawai`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_terima_pembayaran_kasbon_pegawai` AS select 1 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`pbk`.`id_ref` AS `id_ref`,`pbk`.`nomor_ref` AS `nomor_ref`,`pbk`.`tanggal_ref` AS `tanggal_ref`,`pbk`.`tanggal` AS `tanggal`,`pbk`.`keterangan` AS `keterangan`,`pbk`.`bayar_kasbon` AS `nominal`,'D' AS `tipe_transaksi`,`pbk`.`flag` AS `flag` from (`view_pegawai_bayar_kasbon` `pbk` join `ms_perkiraan` `mp` on((`mp`.`id` = `pbk`.`id_ke_akun`))) union all select 2 AS `rows`,(case when isnull(`mp`.`id`) then '' else `mp`.`id` end) AS `id_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`kd_rek_1` end) AS `kd_rek_1`,(case when isnull(`mp`.`id`) then '' else `mp`.`kode_perkiraan` end) AS `kode_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`nama_perkiraan` end) AS `nama_perkiraan`,(case when isnull(`mp`.`id`) then '' else `mp`.`saldo_normal` end) AS `saldo_normal`,(case when isnull(`mp`.`id`) then '' else `mp`.`parent` end) AS `parent`,`pbk`.`id_ref` AS `id_ref`,`pbk`.`nomor_ref` AS `nomor_ref`,`pbk`.`tanggal_ref` AS `tanggal_ref`,`pbk`.`tanggal` AS `tanggal`,`pbk`.`keterangan` AS `keterangan`,`pbk`.`bayar_kasbon` AS `nominal`,'K' AS `tipe_transaksi`,`pbk`.`flag` AS `flag` from (`view_pegawai_bayar_kasbon` `pbk` join `ms_perkiraan` `mp` on((`mp`.`id` = `pbk`.`id_dari_akun`)));

-- membuang struktur untuk view si_sarung.jurnal_umum
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_umum`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_umum` AS select `jurnal_pembelian`.`rows` AS `rows`,`jurnal_pembelian`.`id_perkiraan` AS `id_perkiraan`,`jurnal_pembelian`.`kd_rek_1` AS `kd_rek_1`,`jurnal_pembelian`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_pembelian`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_pembelian`.`saldo_normal` AS `saldo_normal`,`jurnal_pembelian`.`parent` AS `parent`,`jurnal_pembelian`.`id_ref` AS `id_ref`,`jurnal_pembelian`.`nomor_ref` AS `nomor_ref`,`jurnal_pembelian`.`tanggal_ref` AS `tanggal_ref`,`jurnal_pembelian`.`tanggal` AS `tanggal`,`jurnal_pembelian`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_pembelian`.`nominal` AS `nominal`,`jurnal_pembelian`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_pembelian' AS `keterangan_lain` from `jurnal_pembelian` union all select `jurnal_orderservice`.`rows` AS `rows`,`jurnal_orderservice`.`id_perkiraan` AS `id_perkiraan`,`jurnal_orderservice`.`kd_rek_1` AS `kd_rek_1`,`jurnal_orderservice`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_orderservice`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_orderservice`.`saldo_normal` AS `saldo_normal`,`jurnal_orderservice`.`parent` AS `parent`,`jurnal_orderservice`.`id_ref` AS `id_ref`,`jurnal_orderservice`.`nomor_ref` AS `nomor_ref`,`jurnal_orderservice`.`tanggal_ref` AS `tanggal_ref`,`jurnal_orderservice`.`tanggal` AS `tanggal`,`jurnal_orderservice`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_orderservice`.`nominal` AS `nominal`,`jurnal_orderservice`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_orderservice' AS `keterangan_lain` from `jurnal_orderservice` union all select `jurnal_sewa`.`rows` AS `rows`,`jurnal_sewa`.`id_perkiraan` AS `id_perkiraan`,`jurnal_sewa`.`kd_rek_1` AS `kd_rek_1`,`jurnal_sewa`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_sewa`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_sewa`.`saldo_normal` AS `saldo_normal`,`jurnal_sewa`.`parent` AS `parent`,`jurnal_sewa`.`id_ref` AS `id_ref`,`jurnal_sewa`.`nomor_ref` AS `nomor_ref`,`jurnal_sewa`.`tanggal_ref` AS `tanggal_ref`,`jurnal_sewa`.`tanggal` AS `tanggal`,`jurnal_sewa`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_sewa`.`nominal` AS `nominal`,`jurnal_sewa`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_sewa' AS `keterangan_lain` from `jurnal_sewa` union all select `jurnal_penjualan`.`rows` AS `rows`,`jurnal_penjualan`.`id_perkiraan` AS `id_perkiraan`,`jurnal_penjualan`.`kd_rek_1` AS `kd_rek_1`,`jurnal_penjualan`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_penjualan`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_penjualan`.`saldo_normal` AS `saldo_normal`,`jurnal_penjualan`.`parent` AS `parent`,`jurnal_penjualan`.`id_ref` AS `id_ref`,`jurnal_penjualan`.`nomor_ref` AS `nomor_ref`,`jurnal_penjualan`.`tanggal_ref` AS `tanggal_ref`,`jurnal_penjualan`.`tanggal` AS `tanggal`,`jurnal_penjualan`.`keterangan` AS `keterangan`,`jurnal_penjualan`.`kurs_jual` AS `kurs_jual`,`jurnal_penjualan`.`nominal` AS `nominal`,`jurnal_penjualan`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_penjualan' AS `keterangan_lain` from `jurnal_penjualan` union all select `jurnal_penjualan_retur`.`rows` AS `rows`,`jurnal_penjualan_retur`.`id_perkiraan` AS `id_perkiraan`,`jurnal_penjualan_retur`.`kd_rek_1` AS `kd_rek_1`,`jurnal_penjualan_retur`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_penjualan_retur`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_penjualan_retur`.`saldo_normal` AS `saldo_normal`,`jurnal_penjualan_retur`.`parent` AS `parent`,`jurnal_penjualan_retur`.`id_ref` AS `id_ref`,`jurnal_penjualan_retur`.`nomor_ref` AS `nomor_ref`,`jurnal_penjualan_retur`.`tanggal_ref` AS `tanggal_ref`,`jurnal_penjualan_retur`.`tanggal` AS `tanggal`,`jurnal_penjualan_retur`.`keterangan` AS `keterangan`,`jurnal_penjualan_retur`.`kurs_jual` AS `kurs_jual`,`jurnal_penjualan_retur`.`nominal` AS `nominal`,`jurnal_penjualan_retur`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_penjualan_retur' AS `keterangan_lain` from `jurnal_penjualan_retur` union all select `jurnal_penjualan_retur_nonfaktur`.`rows` AS `rows`,`jurnal_penjualan_retur_nonfaktur`.`id_perkiraan` AS `id_perkiraan`,`jurnal_penjualan_retur_nonfaktur`.`kd_rek_1` AS `kd_rek_1`,`jurnal_penjualan_retur_nonfaktur`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_penjualan_retur_nonfaktur`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_penjualan_retur_nonfaktur`.`saldo_normal` AS `saldo_normal`,`jurnal_penjualan_retur_nonfaktur`.`parent` AS `parent`,`jurnal_penjualan_retur_nonfaktur`.`id_ref` AS `id_ref`,`jurnal_penjualan_retur_nonfaktur`.`nomor_ref` AS `nomor_ref`,`jurnal_penjualan_retur_nonfaktur`.`tanggal_ref` AS `tanggal_ref`,`jurnal_penjualan_retur_nonfaktur`.`tanggal` AS `tanggal`,`jurnal_penjualan_retur_nonfaktur`.`keterangan` AS `keterangan`,`jurnal_penjualan_retur_nonfaktur`.`kurs_jual` AS `kurs_jual`,`jurnal_penjualan_retur_nonfaktur`.`nominal` AS `nominal`,`jurnal_penjualan_retur_nonfaktur`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_penjualan_retur_nonfaktur' AS `keterangan_lain` from `jurnal_penjualan_retur_nonfaktur` union all select `jurnal_sumber_dana`.`rows` AS `rows`,`jurnal_sumber_dana`.`id_perkiraan` AS `id_perkiraan`,`jurnal_sumber_dana`.`kd_rek_1` AS `kd_rek_1`,`jurnal_sumber_dana`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_sumber_dana`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_sumber_dana`.`saldo_normal` AS `saldo_normal`,`jurnal_sumber_dana`.`parent` AS `parent`,`jurnal_sumber_dana`.`id_ref` AS `id_ref`,`jurnal_sumber_dana`.`nomor_ref` AS `nomor_ref`,`jurnal_sumber_dana`.`tanggal_ref` AS `tanggal_ref`,`jurnal_sumber_dana`.`tanggal` AS `tanggal`,`jurnal_sumber_dana`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_sumber_dana`.`nominal` AS `nominal`,`jurnal_sumber_dana`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_sumber_dana' AS `keterangan_lain` from `jurnal_sumber_dana` union all select `jurnal_sales_contract_tagihan`.`rows` AS `rows`,`jurnal_sales_contract_tagihan`.`id_perkiraan` AS `id_perkiraan`,`jurnal_sales_contract_tagihan`.`kd_rek_1` AS `kd_rek_1`,`jurnal_sales_contract_tagihan`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_sales_contract_tagihan`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_sales_contract_tagihan`.`saldo_normal` AS `saldo_normal`,`jurnal_sales_contract_tagihan`.`parent` AS `parent`,`jurnal_sales_contract_tagihan`.`id_ref` AS `id_ref`,`jurnal_sales_contract_tagihan`.`nomor_ref` AS `nomor_ref`,`jurnal_sales_contract_tagihan`.`tanggal_ref` AS `tanggal_ref`,`jurnal_sales_contract_tagihan`.`tanggal` AS `tanggal`,`jurnal_sales_contract_tagihan`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_sales_contract_tagihan`.`nominal` AS `nominal`,`jurnal_sales_contract_tagihan`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_sales_contract_tagihan' AS `keterangan_lain` from `jurnal_sales_contract_tagihan` union all select `jurnal_pembelian_bayar`.`rows` AS `rows`,`jurnal_pembelian_bayar`.`id_perkiraan` AS `id_perkiraan`,`jurnal_pembelian_bayar`.`kd_rek_1` AS `kd_rek_1`,`jurnal_pembelian_bayar`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_pembelian_bayar`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_pembelian_bayar`.`saldo_normal` AS `saldo_normal`,`jurnal_pembelian_bayar`.`parent` AS `parent`,`jurnal_pembelian_bayar`.`id_ref` AS `id_ref`,`jurnal_pembelian_bayar`.`nomor_ref` AS `nomor_ref`,`jurnal_pembelian_bayar`.`tanggal_ref` AS `tanggal_ref`,`jurnal_pembelian_bayar`.`tanggal` AS `tanggal`,`jurnal_pembelian_bayar`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_pembelian_bayar`.`nominal` AS `nominal`,`jurnal_pembelian_bayar`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_pembelian_bayar' AS `keterangan_lain` from `jurnal_pembelian_bayar` union all select `jurnal_penjualan_bayar`.`rows` AS `rows`,`jurnal_penjualan_bayar`.`id_perkiraan` AS `id_perkiraan`,`jurnal_penjualan_bayar`.`kd_rek_1` AS `kd_rek_1`,`jurnal_penjualan_bayar`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_penjualan_bayar`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_penjualan_bayar`.`saldo_normal` AS `saldo_normal`,`jurnal_penjualan_bayar`.`parent` AS `parent`,`jurnal_penjualan_bayar`.`id_ref` AS `id_ref`,`jurnal_penjualan_bayar`.`nomor_ref` AS `nomor_ref`,`jurnal_penjualan_bayar`.`tanggal_ref` AS `tanggal_ref`,`jurnal_penjualan_bayar`.`tanggal` AS `tanggal`,`jurnal_penjualan_bayar`.`keterangan` AS `keterangan`,`jurnal_penjualan_bayar`.`kurs_jual` AS `kurs_jual`,`jurnal_penjualan_bayar`.`nominal` AS `nominal`,`jurnal_penjualan_bayar`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_penjualan_bayar' AS `keterangan_lain` from `jurnal_penjualan_bayar` union all select `jurnal_piutangawal_bayar`.`rows` AS `rows`,`jurnal_piutangawal_bayar`.`id_perkiraan` AS `id_perkiraan`,`jurnal_piutangawal_bayar`.`kd_rek_1` AS `kd_rek_1`,`jurnal_piutangawal_bayar`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_piutangawal_bayar`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_piutangawal_bayar`.`saldo_normal` AS `saldo_normal`,`jurnal_piutangawal_bayar`.`parent` AS `parent`,`jurnal_piutangawal_bayar`.`id_ref` AS `id_ref`,`jurnal_piutangawal_bayar`.`nomor_ref` AS `nomor_ref`,`jurnal_piutangawal_bayar`.`tanggal_ref` AS `tanggal_ref`,`jurnal_piutangawal_bayar`.`tanggal` AS `tanggal`,`jurnal_piutangawal_bayar`.`keterangan` AS `keterangan`,`jurnal_piutangawal_bayar`.`kurs_jual` AS `kurs_jual`,`jurnal_piutangawal_bayar`.`nominal` AS `nominal`,`jurnal_piutangawal_bayar`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_piutangawal_bayar' AS `keterangan_lain` from `jurnal_piutangawal_bayar` union all select `jurnal_orderservice_bayar`.`rows` AS `rows`,`jurnal_orderservice_bayar`.`id_perkiraan` AS `id_perkiraan`,`jurnal_orderservice_bayar`.`kd_rek_1` AS `kd_rek_1`,`jurnal_orderservice_bayar`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_orderservice_bayar`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_orderservice_bayar`.`saldo_normal` AS `saldo_normal`,`jurnal_orderservice_bayar`.`parent` AS `parent`,`jurnal_orderservice_bayar`.`id_ref` AS `id_ref`,`jurnal_orderservice_bayar`.`nomor_ref` AS `nomor_ref`,`jurnal_orderservice_bayar`.`tanggal_ref` AS `tanggal_ref`,`jurnal_orderservice_bayar`.`tanggal` AS `tanggal`,`jurnal_orderservice_bayar`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_orderservice_bayar`.`nominal` AS `nominal`,`jurnal_orderservice_bayar`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_orderservice_bayar' AS `keterangan_lain` from `jurnal_orderservice_bayar` union all select `jurnal_sewa_bayar`.`rows` AS `rows`,`jurnal_sewa_bayar`.`id_perkiraan` AS `id_perkiraan`,`jurnal_sewa_bayar`.`kd_rek_1` AS `kd_rek_1`,`jurnal_sewa_bayar`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_sewa_bayar`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_sewa_bayar`.`saldo_normal` AS `saldo_normal`,`jurnal_sewa_bayar`.`parent` AS `parent`,`jurnal_sewa_bayar`.`id_ref` AS `id_ref`,`jurnal_sewa_bayar`.`nomor_ref` AS `nomor_ref`,`jurnal_sewa_bayar`.`tanggal_ref` AS `tanggal_ref`,`jurnal_sewa_bayar`.`tanggal` AS `tanggal`,`jurnal_sewa_bayar`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_sewa_bayar`.`nominal` AS `nominal`,`jurnal_sewa_bayar`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_sewa_bayar' AS `keterangan_lain` from `jurnal_sewa_bayar` union all select `jurnal_upahproduksi`.`rows` AS `rows`,`jurnal_upahproduksi`.`id_perkiraan` AS `id_perkiraan`,`jurnal_upahproduksi`.`kd_rek_1` AS `kd_rek_1`,`jurnal_upahproduksi`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_upahproduksi`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_upahproduksi`.`saldo_normal` AS `saldo_normal`,`jurnal_upahproduksi`.`parent` AS `parent`,`jurnal_upahproduksi`.`id_ref` AS `id_ref`,`jurnal_upahproduksi`.`nomor_ref` AS `nomor_ref`,`jurnal_upahproduksi`.`tanggal_ref` AS `tanggal_ref`,`jurnal_upahproduksi`.`tanggal` AS `tanggal`,`jurnal_upahproduksi`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_upahproduksi`.`nominal` AS `nominal`,`jurnal_upahproduksi`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_upah_produksi_pegawai' AS `keterangan_lain` from `jurnal_upahproduksi` where (`jurnal_upahproduksi`.`flag` = 'PEGAWAI') union all select `jurnal_upahproduksi`.`rows` AS `rows`,`jurnal_upahproduksi`.`id_perkiraan` AS `id_perkiraan`,`jurnal_upahproduksi`.`kd_rek_1` AS `kd_rek_1`,`jurnal_upahproduksi`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_upahproduksi`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_upahproduksi`.`saldo_normal` AS `saldo_normal`,`jurnal_upahproduksi`.`parent` AS `parent`,`jurnal_upahproduksi`.`id_ref` AS `id_ref`,`jurnal_upahproduksi`.`nomor_ref` AS `nomor_ref`,`jurnal_upahproduksi`.`tanggal_ref` AS `tanggal_ref`,`jurnal_upahproduksi`.`tanggal` AS `tanggal`,`jurnal_upahproduksi`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_upahproduksi`.`nominal` AS `nominal`,`jurnal_upahproduksi`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_upah_produksi_pegawai' AS `keterangan_lain` from `jurnal_upahproduksi` where (`jurnal_upahproduksi`.`flag` = 'REKANAN') union all select `jurnal_upahproduksi_lainnya`.`rows` AS `rows`,`jurnal_upahproduksi_lainnya`.`id_perkiraan` AS `id_perkiraan`,`jurnal_upahproduksi_lainnya`.`kd_rek_1` AS `kd_rek_1`,`jurnal_upahproduksi_lainnya`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_upahproduksi_lainnya`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_upahproduksi_lainnya`.`saldo_normal` AS `saldo_normal`,`jurnal_upahproduksi_lainnya`.`parent` AS `parent`,`jurnal_upahproduksi_lainnya`.`id_ref` AS `id_ref`,`jurnal_upahproduksi_lainnya`.`nomor_ref` AS `nomor_ref`,`jurnal_upahproduksi_lainnya`.`tanggal_ref` AS `tanggal_ref`,`jurnal_upahproduksi_lainnya`.`tanggal` AS `tanggal`,`jurnal_upahproduksi_lainnya`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_upahproduksi_lainnya`.`nominal` AS `nominal`,`jurnal_upahproduksi_lainnya`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_upahproduksi_lainnya_pegawai' AS `keterangan_lain` from `jurnal_upahproduksi_lainnya` where (`jurnal_upahproduksi_lainnya`.`flag` = 'PEGAWAI') union all select `jurnal_upahtenun`.`rows` AS `rows`,`jurnal_upahtenun`.`id_perkiraan` AS `id_perkiraan`,`jurnal_upahtenun`.`kd_rek_1` AS `kd_rek_1`,`jurnal_upahtenun`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_upahtenun`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_upahtenun`.`saldo_normal` AS `saldo_normal`,`jurnal_upahtenun`.`parent` AS `parent`,`jurnal_upahtenun`.`id_ref` AS `id_ref`,`jurnal_upahtenun`.`nomor_ref` AS `nomor_ref`,`jurnal_upahtenun`.`tanggal_ref` AS `tanggal_ref`,`jurnal_upahtenun`.`tanggal` AS `tanggal`,`jurnal_upahtenun`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_upahtenun`.`nominal` AS `nominal`,`jurnal_upahtenun`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_upahtenun' AS `keterangan_lain` from `jurnal_upahtenun` union all select `jurnal_kasbon`.`rows` AS `rows`,`jurnal_kasbon`.`id_perkiraan` AS `id_perkiraan`,`jurnal_kasbon`.`kd_rek_1` AS `kd_rek_1`,`jurnal_kasbon`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_kasbon`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_kasbon`.`saldo_normal` AS `saldo_normal`,`jurnal_kasbon`.`parent` AS `parent`,`jurnal_kasbon`.`id_ref` AS `id_ref`,`jurnal_kasbon`.`nomor_ref` AS `nomor_ref`,`jurnal_kasbon`.`tanggal_ref` AS `tanggal_ref`,`jurnal_kasbon`.`tanggal` AS `tanggal`,`jurnal_kasbon`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_kasbon`.`nominal` AS `nominal`,`jurnal_kasbon`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_kasbon_pegawai' AS `keterangan_lain` from `jurnal_kasbon` where (`jurnal_kasbon`.`jenis_kasbon` = 1) union all select `jurnal_kasbon`.`rows` AS `rows`,`jurnal_kasbon`.`id_perkiraan` AS `id_perkiraan`,`jurnal_kasbon`.`kd_rek_1` AS `kd_rek_1`,`jurnal_kasbon`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_kasbon`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_kasbon`.`saldo_normal` AS `saldo_normal`,`jurnal_kasbon`.`parent` AS `parent`,`jurnal_kasbon`.`id_ref` AS `id_ref`,`jurnal_kasbon`.`nomor_ref` AS `nomor_ref`,`jurnal_kasbon`.`tanggal_ref` AS `tanggal_ref`,`jurnal_kasbon`.`tanggal` AS `tanggal`,`jurnal_kasbon`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_kasbon`.`nominal` AS `nominal`,`jurnal_kasbon`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_kasbon_rekanan' AS `keterangan_lain` from `jurnal_kasbon` where (`jurnal_kasbon`.`jenis_kasbon` = 2) union all select `jurnal_kasbon_pegawai`.`rows` AS `rows`,`jurnal_kasbon_pegawai`.`id_perkiraan` AS `id_perkiraan`,`jurnal_kasbon_pegawai`.`kd_rek_1` AS `kd_rek_1`,`jurnal_kasbon_pegawai`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_kasbon_pegawai`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_kasbon_pegawai`.`saldo_normal` AS `saldo_normal`,`jurnal_kasbon_pegawai`.`parent` AS `parent`,`jurnal_kasbon_pegawai`.`id_ref` AS `id_ref`,`jurnal_kasbon_pegawai`.`nomor_ref` AS `nomor_ref`,`jurnal_kasbon_pegawai`.`tanggal_ref` AS `tanggal_ref`,`jurnal_kasbon_pegawai`.`tanggal` AS `tanggal`,`jurnal_kasbon_pegawai`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_kasbon_pegawai`.`nominal` AS `nominal`,`jurnal_kasbon_pegawai`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_kasbon_pegawai' AS `keterangan_lain` from `jurnal_kasbon_pegawai` union all select `jurnal_penerimaan_pembayaran_kasbon`.`rows` AS `rows`,`jurnal_penerimaan_pembayaran_kasbon`.`id_perkiraan` AS `id_perkiraan`,`jurnal_penerimaan_pembayaran_kasbon`.`kd_rek_1` AS `kd_rek_1`,`jurnal_penerimaan_pembayaran_kasbon`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_penerimaan_pembayaran_kasbon`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_penerimaan_pembayaran_kasbon`.`saldo_normal` AS `saldo_normal`,`jurnal_penerimaan_pembayaran_kasbon`.`parent` AS `parent`,`jurnal_penerimaan_pembayaran_kasbon`.`id_ref` AS `id_ref`,`jurnal_penerimaan_pembayaran_kasbon`.`nomor_ref` AS `nomor_ref`,`jurnal_penerimaan_pembayaran_kasbon`.`tanggal_ref` AS `tanggal_ref`,`jurnal_penerimaan_pembayaran_kasbon`.`tanggal` AS `tanggal`,`jurnal_penerimaan_pembayaran_kasbon`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_penerimaan_pembayaran_kasbon`.`nominal` AS `nominal`,`jurnal_penerimaan_pembayaran_kasbon`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_penerimaan_pembayaran_kasbon_pegawai' AS `keterangan_lain` from `jurnal_penerimaan_pembayaran_kasbon` where (`jurnal_penerimaan_pembayaran_kasbon`.`flag` = 'kasbon_pegawai') union all select `jurnal_penerimaan_pembayaran_kasbon`.`rows` AS `rows`,`jurnal_penerimaan_pembayaran_kasbon`.`id_perkiraan` AS `id_perkiraan`,`jurnal_penerimaan_pembayaran_kasbon`.`kd_rek_1` AS `kd_rek_1`,`jurnal_penerimaan_pembayaran_kasbon`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_penerimaan_pembayaran_kasbon`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_penerimaan_pembayaran_kasbon`.`saldo_normal` AS `saldo_normal`,`jurnal_penerimaan_pembayaran_kasbon`.`parent` AS `parent`,`jurnal_penerimaan_pembayaran_kasbon`.`id_ref` AS `id_ref`,`jurnal_penerimaan_pembayaran_kasbon`.`nomor_ref` AS `nomor_ref`,`jurnal_penerimaan_pembayaran_kasbon`.`tanggal_ref` AS `tanggal_ref`,`jurnal_penerimaan_pembayaran_kasbon`.`tanggal` AS `tanggal`,`jurnal_penerimaan_pembayaran_kasbon`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_penerimaan_pembayaran_kasbon`.`nominal` AS `nominal`,`jurnal_penerimaan_pembayaran_kasbon`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_penerimaan_pembayaran_kasbon_rekanan' AS `keterangan_lain` from `jurnal_penerimaan_pembayaran_kasbon` where (`jurnal_penerimaan_pembayaran_kasbon`.`flag` = 'kasbon_rekanan') union all select `jurnal_terima_pembayaran_kasbon_pegawai`.`rows` AS `rows`,`jurnal_terima_pembayaran_kasbon_pegawai`.`id_perkiraan` AS `id_perkiraan`,`jurnal_terima_pembayaran_kasbon_pegawai`.`kd_rek_1` AS `kd_rek_1`,`jurnal_terima_pembayaran_kasbon_pegawai`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_terima_pembayaran_kasbon_pegawai`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_terima_pembayaran_kasbon_pegawai`.`saldo_normal` AS `saldo_normal`,`jurnal_terima_pembayaran_kasbon_pegawai`.`parent` AS `parent`,`jurnal_terima_pembayaran_kasbon_pegawai`.`id_ref` AS `id_ref`,`jurnal_terima_pembayaran_kasbon_pegawai`.`nomor_ref` AS `nomor_ref`,`jurnal_terima_pembayaran_kasbon_pegawai`.`tanggal_ref` AS `tanggal_ref`,`jurnal_terima_pembayaran_kasbon_pegawai`.`tanggal` AS `tanggal`,`jurnal_terima_pembayaran_kasbon_pegawai`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_terima_pembayaran_kasbon_pegawai`.`nominal` AS `nominal`,`jurnal_terima_pembayaran_kasbon_pegawai`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_terima_pembayaran_kasbon_pegawai_upah_harian' AS `keterangan_lain` from `jurnal_terima_pembayaran_kasbon_pegawai` where (`jurnal_terima_pembayaran_kasbon_pegawai`.`flag` = 'upah_harian') union all select `jurnal_terima_pembayaran_kasbon_pegawai`.`rows` AS `rows`,`jurnal_terima_pembayaran_kasbon_pegawai`.`id_perkiraan` AS `id_perkiraan`,`jurnal_terima_pembayaran_kasbon_pegawai`.`kd_rek_1` AS `kd_rek_1`,`jurnal_terima_pembayaran_kasbon_pegawai`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_terima_pembayaran_kasbon_pegawai`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_terima_pembayaran_kasbon_pegawai`.`saldo_normal` AS `saldo_normal`,`jurnal_terima_pembayaran_kasbon_pegawai`.`parent` AS `parent`,`jurnal_terima_pembayaran_kasbon_pegawai`.`id_ref` AS `id_ref`,`jurnal_terima_pembayaran_kasbon_pegawai`.`nomor_ref` AS `nomor_ref`,`jurnal_terima_pembayaran_kasbon_pegawai`.`tanggal_ref` AS `tanggal_ref`,`jurnal_terima_pembayaran_kasbon_pegawai`.`tanggal` AS `tanggal`,`jurnal_terima_pembayaran_kasbon_pegawai`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_terima_pembayaran_kasbon_pegawai`.`nominal` AS `nominal`,`jurnal_terima_pembayaran_kasbon_pegawai`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_terima_pembayaran_kasbon_pegawai_upah_produksi' AS `keterangan_lain` from `jurnal_terima_pembayaran_kasbon_pegawai` where (`jurnal_terima_pembayaran_kasbon_pegawai`.`flag` = 'upah_produksi') union all select `jurnal_terima_pembayaran_kasbon_pegawai`.`rows` AS `rows`,`jurnal_terima_pembayaran_kasbon_pegawai`.`id_perkiraan` AS `id_perkiraan`,`jurnal_terima_pembayaran_kasbon_pegawai`.`kd_rek_1` AS `kd_rek_1`,`jurnal_terima_pembayaran_kasbon_pegawai`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_terima_pembayaran_kasbon_pegawai`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_terima_pembayaran_kasbon_pegawai`.`saldo_normal` AS `saldo_normal`,`jurnal_terima_pembayaran_kasbon_pegawai`.`parent` AS `parent`,`jurnal_terima_pembayaran_kasbon_pegawai`.`id_ref` AS `id_ref`,`jurnal_terima_pembayaran_kasbon_pegawai`.`nomor_ref` AS `nomor_ref`,`jurnal_terima_pembayaran_kasbon_pegawai`.`tanggal_ref` AS `tanggal_ref`,`jurnal_terima_pembayaran_kasbon_pegawai`.`tanggal` AS `tanggal`,`jurnal_terima_pembayaran_kasbon_pegawai`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_terima_pembayaran_kasbon_pegawai`.`nominal` AS `nominal`,`jurnal_terima_pembayaran_kasbon_pegawai`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_terima_pembayaran_kasbon_pegawai_upah_produksi' AS `keterangan_lain` from `jurnal_terima_pembayaran_kasbon_pegawai` where (`jurnal_terima_pembayaran_kasbon_pegawai`.`flag` = 'upah_produksi_lainnya') union all select `jurnal_upah_harian`.`rows` AS `rows`,`jurnal_upah_harian`.`id_perkiraan` AS `id_perkiraan`,`jurnal_upah_harian`.`kd_rek_1` AS `kd_rek_1`,`jurnal_upah_harian`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_upah_harian`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_upah_harian`.`saldo_normal` AS `saldo_normal`,`jurnal_upah_harian`.`parent` AS `parent`,`jurnal_upah_harian`.`id_ref` AS `id_ref`,`jurnal_upah_harian`.`nomor_ref` AS `nomor_ref`,`jurnal_upah_harian`.`tanggal_ref` AS `tanggal_ref`,`jurnal_upah_harian`.`tanggal` AS `tanggal`,`jurnal_upah_harian`.`keterangan` AS `keterangan`,1 AS `kurs_jual`,`jurnal_upah_harian`.`nominal` AS `nominal`,`jurnal_upah_harian`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_upah_harian' AS `keterangan_lain` from `jurnal_upah_harian` union all select `jurnal_rtp`.`rows` AS `rows`,`jurnal_rtp`.`id_perkiraan` AS `id_perkiraan`,`jurnal_rtp`.`kd_rek_1` AS `kd_rek_1`,`jurnal_rtp`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_rtp`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_rtp`.`saldo_normal` AS `saldo_normal`,`jurnal_rtp`.`parent` AS `parent`,`jurnal_rtp`.`id_ref` AS `id_ref`,`jurnal_rtp`.`nomor_ref` AS `nomor_ref`,`jurnal_rtp`.`tanggal_ref` AS `tanggal_ref`,`jurnal_rtp`.`tanggal` AS `tanggal`,`jurnal_rtp`.`keterangan` AS `keterangan`,`jurnal_rtp`.`kurs_jual` AS `kurs_jual`,`jurnal_rtp`.`nominal` AS `nominal`,`jurnal_rtp`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_rtp' AS `keterangan_lain` from `jurnal_rtp` union all select `jurnal_rtpa`.`rows` AS `rows`,`jurnal_rtpa`.`id_perkiraan` AS `id_perkiraan`,`jurnal_rtpa`.`kd_rek_1` AS `kd_rek_1`,`jurnal_rtpa`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_rtpa`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_rtpa`.`saldo_normal` AS `saldo_normal`,`jurnal_rtpa`.`parent` AS `parent`,`jurnal_rtpa`.`id_ref` AS `id_ref`,`jurnal_rtpa`.`nomor_ref` AS `nomor_ref`,`jurnal_rtpa`.`tanggal_ref` AS `tanggal_ref`,`jurnal_rtpa`.`tanggal` AS `tanggal`,`jurnal_rtpa`.`keterangan` AS `keterangan`,`jurnal_rtpa`.`kurs_jual` AS `kurs_jual`,`jurnal_rtpa`.`nominal` AS `nominal`,`jurnal_rtpa`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_rtpa' AS `keterangan_lain` from `jurnal_rtpa` union all select `jurnal_peny_piutang`.`rows` AS `rows`,`jurnal_peny_piutang`.`id_perkiraan` AS `id_perkiraan`,`jurnal_peny_piutang`.`kd_rek_1` AS `kd_rek_1`,`jurnal_peny_piutang`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_peny_piutang`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_peny_piutang`.`saldo_normal` AS `saldo_normal`,`jurnal_peny_piutang`.`parent` AS `parent`,`jurnal_peny_piutang`.`id_ref` AS `id_ref`,`jurnal_peny_piutang`.`nomor_ref` AS `nomor_ref`,`jurnal_peny_piutang`.`tanggal_ref` AS `tanggal_ref`,`jurnal_peny_piutang`.`tanggal` AS `tanggal`,`jurnal_peny_piutang`.`keterangan` AS `keterangan`,`jurnal_peny_piutang`.`kurs_jual` AS `kurs_jual`,`jurnal_peny_piutang`.`nominal` AS `nominal`,`jurnal_peny_piutang`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_peny_piutang' AS `keterangan_lain` from `jurnal_peny_piutang` union all select `jurnal_penyesuaian_sewa`.`rows` AS `rows`,`jurnal_penyesuaian_sewa`.`id_perkiraan` AS `id_perkiraan`,`jurnal_penyesuaian_sewa`.`kd_rek_1` AS `kd_rek_1`,`jurnal_penyesuaian_sewa`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_penyesuaian_sewa`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_penyesuaian_sewa`.`saldo_normal` AS `saldo_normal`,`jurnal_penyesuaian_sewa`.`parent` AS `parent`,`jurnal_penyesuaian_sewa`.`id_ref` AS `id_ref`,`jurnal_penyesuaian_sewa`.`nomor_ref` AS `nomor_ref`,`jurnal_penyesuaian_sewa`.`tanggal_ref` AS `tanggal_ref`,`jurnal_penyesuaian_sewa`.`tanggal` AS `tanggal`,`jurnal_penyesuaian_sewa`.`keterangan` AS `keterangan`,`jurnal_penyesuaian_sewa`.`kurs_jual` AS `kurs_jual`,`jurnal_penyesuaian_sewa`.`nominal` AS `nominal`,`jurnal_penyesuaian_sewa`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_penyesuaian_sewa' AS `keterangan_lain` from `jurnal_penyesuaian_sewa`;

-- membuang struktur untuk view si_sarung.jurnal_umum_1
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_umum_1`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_umum_1` AS (select `jurnal_pembelian`.`rows` AS `rows`,`jurnal_pembelian`.`id_perkiraan` AS `id_perkiraan`,`jurnal_pembelian`.`kd_rek_1` AS `kd_rek_1`,`jurnal_pembelian`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_pembelian`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_pembelian`.`saldo_normal` AS `saldo_normal`,`jurnal_pembelian`.`parent` AS `parent`,`jurnal_pembelian`.`id_ref` AS `id_ref`,`jurnal_pembelian`.`nomor_ref` AS `nomor_ref`,`jurnal_pembelian`.`tanggal_ref` AS `tanggal_ref`,`jurnal_pembelian`.`tanggal` AS `tanggal`,`jurnal_pembelian`.`keterangan` AS `keterangan`,`jurnal_pembelian`.`nominal` AS `nominal`,`jurnal_pembelian`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_pembelian' AS `keterangan_lain` from `jurnal_pembelian`) union all (select `jurnal_penjualan`.`rows` AS `rows`,`jurnal_penjualan`.`id_perkiraan` AS `id_perkiraan`,`jurnal_penjualan`.`kd_rek_1` AS `kd_rek_1`,`jurnal_penjualan`.`kode_perkiraan` AS `kode_perkiraan`,`jurnal_penjualan`.`nama_perkiraan` AS `nama_perkiraan`,`jurnal_penjualan`.`saldo_normal` AS `saldo_normal`,`jurnal_penjualan`.`parent` AS `parent`,`jurnal_penjualan`.`id_ref` AS `id_ref`,`jurnal_penjualan`.`nomor_ref` AS `nomor_ref`,`jurnal_penjualan`.`tanggal_ref` AS `tanggal_ref`,`jurnal_penjualan`.`tanggal` AS `tanggal`,`jurnal_penjualan`.`keterangan` AS `keterangan`,`jurnal_penjualan`.`nominal` AS `nominal`,`jurnal_penjualan`.`tipe_transaksi` AS `tipe_transaksi`,'jurnal_penjualan' AS `keterangan_lain` from `jurnal_penjualan`);

-- membuang struktur untuk view si_sarung.jurnal_upahproduksi
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_upahproduksi`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_upahproduksi` AS select '1' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`b`.`id_upahproduksi` AS `id_ref`,`b`.`nomor` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal` AS `tanggal`,concat(`b`.`nomor`,' - ',`pg`.`nama_pegawai`) AS `keterangan`,(((ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) + ifnull(`b`.`total_upah_harian`,0)) + ifnull(`b`.`total_bayar_kasbon`,0)) AS `nominal`,'D' AS `tipe_transaksi`,'PEGAWAI' AS `flag` from ((`a_pro_upahproduksi` `b` join `ms_pegawai` `pg` on(((`pg`.`id_pegawai` = `b`.`id_pegawai`) and (`b`.`id_rekanan` = 0)))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun_upah`))) union all select '2' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`b`.`id_upahproduksi` AS `id_ref`,`b`.`nomor` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal_bayar` AS `tanggal`,concat(`b`.`nomor`,' - ',`pg`.`nama_pegawai`) AS `keterangan`,(((ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) + ifnull(`b`.`total_upah_harian`,0)) + ifnull(`b`.`total_bayar_kasbon`,0)) AS `nominal`,'K' AS `tipe_transaksi`,'PEGAWAI' AS `flag` from ((`a_pro_upahproduksi` `b` join `ms_pegawai` `pg` on(((`pg`.`id_pegawai` = `b`.`id_pegawai`) and (`b`.`id_rekanan` = 0)))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`akun_bayar`))) union all select '1' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`b`.`id_upahproduksi` AS `id_ref`,`b`.`nomor` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal` AS `tanggal`,concat(`b`.`nomor`,' - ',`rk`.`nama`) AS `keterangan`,((ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) + ifnull(`b`.`total_upah_harian`,0)) AS `nominal`,'D' AS `tipe_transaksi`,'REKANAN' AS `flag` from (((`a_pro_upahproduksi` `b` join `ms_rekanan` `r` on(((`r`.`id_rekanan` = `b`.`id_rekanan`) and (`b`.`id_pegawai` = 0)))) join `ms_rekanan_kelompok` `rk` on((`rk`.`id_kelompok` = `r`.`id_kelompok`))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun_upah`))) union all select (case when (`j`.`tipe_id_akun_jurnal` = 'D') then '1' else '2' end) AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`b`.`id_upahproduksi` AS `id_ref`,`b`.`nomor` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal_bayar` AS `tanggal`,concat(`b`.`nomor`,' - ',`rk`.`nama`) AS `keterangan`,(case when (`b`.`pajak` = 1) then (((ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) + ifnull(`b`.`total_upah_harian`,0)) * (10 / 100)) else '0' end) AS `nominal`,`j`.`tipe_id_akun_jurnal` AS `tipe_transaksi`,'REKANAN' AS `flag` from ((((`a_pro_upahproduksi` `b` join `ms_rekanan` `r` on(((`r`.`id_rekanan` = `b`.`id_rekanan`) and (`b`.`id_pegawai` = 0)))) join `ms_rekanan_kelompok` `rk` on((`rk`.`id_kelompok` = `r`.`id_kelompok`))) join `ms_ref_jurnal` `j` on((`j`.`kode` = `b`.`id_akun_pajak`))) join `ms_perkiraan` `p` on((`p`.`id` = `j`.`id_akun_jurnal`))) union all select '2' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`b`.`id_upahproduksi` AS `id_ref`,`b`.`nomor` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal_bayar` AS `tanggal`,concat(`b`.`nomor`,' - ',`rk`.`nama`) AS `keterangan`,(case when (`b`.`pajak` = 1) then ((((ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) + ifnull(`b`.`total_upah_harian`,0)) * (10 / 100)) + ((ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) + ifnull(`b`.`total_upah_harian`,0))) else ((ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) + ifnull(`b`.`total_upah_harian`,0)) end) AS `nominal`,'K' AS `tipe_transaksi`,'REKANAN' AS `flag` from (((`a_pro_upahproduksi` `b` join `ms_rekanan` `r` on(((`r`.`id_rekanan` = `b`.`id_rekanan`) and (`b`.`id_pegawai` = 0)))) join `ms_rekanan_kelompok` `rk` on((`rk`.`id_kelompok` = `r`.`id_kelompok`))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`akun_bayar`)));

-- membuang struktur untuk view si_sarung.jurnal_upahproduksi_lainnya
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_upahproduksi_lainnya`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_upahproduksi_lainnya` AS select '1' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`b`.`id_upahproduksi` AS `id_ref`,`b`.`nomor` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal_upah` AS `tanggal`,concat(`b`.`nomor`,' - ',`pg`.`nama_pegawai`) AS `keterangan`,((ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) + ifnull(`b`.`total_bayar_kasbon`,0)) AS `nominal`,'D' AS `tipe_transaksi`,'PEGAWAI' AS `flag` from ((`a_pro_upahproduksi_lainnya` `b` join `ms_pegawai` `pg` on(((`pg`.`id_pegawai` = `b`.`id_pegawai`) and (`b`.`id_rekanan` = 0)))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun_upah`))) union all select '2' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`b`.`id_upahproduksi` AS `id_ref`,`b`.`nomor` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal_upah` AS `tanggal`,concat(`b`.`nomor`,' - ',`pg`.`nama_pegawai`) AS `keterangan`,((ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) + ifnull(`b`.`total_bayar_kasbon`,0)) AS `nominal`,'K' AS `tipe_transaksi`,'PEGAWAI' AS `flag` from ((`a_pro_upahproduksi_lainnya` `b` join `ms_pegawai` `pg` on(((`pg`.`id_pegawai` = `b`.`id_pegawai`) and (`b`.`id_rekanan` = 0)))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun_bayar`)));

-- membuang struktur untuk view si_sarung.jurnal_upahtenun
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_upahtenun`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_upahtenun` AS select '1' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`b`.`id_upahproduksi` AS `id_ref`,`b`.`nomor` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal` AS `tanggal`,concat(`b`.`nomor`,' - ',`rk`.`nama`,' - ',`rkk`.`nama`) AS `keterangan`,(ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) AS `nominal`,'D' AS `tipe_transaksi` from (((`a_pro_upahtenun` `b` left join `ms_rekanan` `rk` on((`rk`.`id_rekanan` = `b`.`id_rekanan`))) join `ms_rekanan_kelompok` `rkk` on((`rkk`.`id_kelompok` = `rk`.`id_kelompok`))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun_upah`))) where (`b`.`status_bayar` = 1) union all select '2' AS `rows`,`p`.`id` AS `id_perkiraan`,`p`.`kd_rek_1` AS `kd_rek_1`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`p`.`parent` AS `parent`,`b`.`id_upahproduksi` AS `id_ref`,`b`.`nomor` AS `nomor_ref`,`b`.`tanggal_bayar` AS `tanggal_ref`,`b`.`tanggal_bayar` AS `tanggal`,concat(`b`.`nomor`,' - ',`rk`.`nama`,' - ',`rkk`.`nama`) AS `keterangan`,(ifnull(`b`.`total_upah`,0) + ifnull(`b`.`total_lain`,0)) AS `nominal`,'K' AS `tipe_transaksi` from (((`a_pro_upahtenun` `b` left join `ms_rekanan` `rk` on((`rk`.`id_rekanan` = `b`.`id_rekanan`))) join `ms_rekanan_kelompok` `rkk` on((`rkk`.`id_kelompok` = `rk`.`id_kelompok`))) join `ms_perkiraan` `p` on((`p`.`id` = `b`.`akun_bayar`))) where (`b`.`status_bayar` = 1);

-- membuang struktur untuk view si_sarung.jurnal_upah_harian
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `jurnal_upah_harian`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `jurnal_upah_harian` AS select 1 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,concat_ws(' ',`a`.`nama_perkiraan`,`pgw`.`nama_pegawai`) AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`uh`.`id_upah_harian` AS `id_ref`,`uh`.`no_transaksi` AS `nomor_ref`,`uh`.`tanggal_transaksi` AS `tanggal_ref`,`uh`.`tanggal_transaksi` AS `tanggal`,'Upah Harian' AS `keterangan`,(`uhd`.`upah_terima` + `uhd`.`potongan_kas_bon`) AS `nominal`,`uh`.`tipe_akun_piutang` AS `tipe_transaksi` from (((`pro_upah_harian` `uh` join `pro_upah_harian_detail` `uhd` on((`uhd`.`id_upah_harian` = `uh`.`id_upah_harian`))) join `ms_perkiraan` `a` on((`a`.`id` = `uh`.`id_akun_piutang`))) join `ms_pegawai` `pgw` on((`pgw`.`id_pegawai` = `uhd`.`id_pegawai`))) union all select 2 AS `rows`,`a`.`id` AS `id_perkiraan`,`a`.`kd_rek_1` AS `kd_rek_1`,`a`.`kode_perkiraan` AS `kode_perkiraan`,`a`.`nama_perkiraan` AS `nama_perkiraan`,`a`.`saldo_normal` AS `saldo_normal`,`a`.`parent` AS `parent`,`uh`.`id_upah_harian` AS `id_ref`,`uh`.`no_transaksi` AS `nomor_ref`,`uh`.`tanggal_transaksi` AS `tanggal_ref`,`uh`.`tanggal_transaksi` AS `tanggal`,'Upah Harian' AS `keterangan`,(`uhd`.`upah_terima` + `uhd`.`potongan_kas_bon`) AS `nominal`,`uh`.`tipe_id_akun` AS `tipe_transaksi` from ((`pro_upah_harian` `uh` join `pro_upah_harian_detail` `uhd` on((`uhd`.`id_upah_harian` = `uh`.`id_upah_harian`))) join `ms_perkiraan` `a` on((`a`.`id` = `uh`.`id_akun`)));

-- membuang struktur untuk view si_sarung.view_barangkeluar_barang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_barangkeluar_barang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_barangkeluar_barang` AS select `pbb`.`id` AS `id`,`pbb`.`id_barangkeluar` AS `id_barangkeluar`,`pbb`.`id_barang` AS `id_barang`,`pbb`.`jumlah` AS `jumlah`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`mwk`.`inisial`) then '' else `mwk`.`inisial` end) AS `inisial_komposisi`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_motif_barang`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `motif_keterangan`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`nama_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' else `pbb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' when (`pbb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbb`.`id_label` = 0) then '' else `pbb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbb`.`id_kemasan` = 0) then '' else `pbb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbb`.`id_kemasansatuan` = 0) then '' else `pbb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbb`.`id_kemasansepuluh` = 0) then '' else `pbb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbb`.`id_kemasanseratus` = 0) then '' else `pbb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbb`.`id_cap` = 0) then '' else `pbb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbb`.`jumlah_rencana`) or (`pbb`.`jumlah_rencana` = 0)) then '' else `pbb`.`jumlah_rencana` end) AS `jumlah_rencana`,`pbb`.`keterangan` AS `keterangan` from ((((((((((((((((`pro_barangkeluar_barang` `pbb` join `ms_barang` `mb` on((`pbb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_warnakomposisi` `mwk` on((`pbb`.`warna` = `mwk`.`id_komposisi`))) left join `ms_motif_barang` `mmb` on((`pbb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbb`.`id_motif` = `mm`.`id_motif`))) left join `ms_kualitas` `mk` on((`pbb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms` on((`pbb`.`satuan_jumlah` = `ms`.`id_satuan`))) left join `ms_satuan` `ms2` on((`pbb`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_byr_peny_ptg
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_byr_peny_ptg`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_byr_peny_ptg` AS select `bpp`.`id_penjualan` AS `id_penjualan`,`bpp`.`id_pelanggan` AS `id_pelanggan`,`bpp`.`no_faktur` AS `no_faktur`,`bpp`.`sufix_no_faktur` AS `sufix_no_faktur`,`bpp`.`nomor_jurnal` AS `nomor_jurnal`,`bpp`.`tanggal_jurnal` AS `tanggal_jurnal`,(sum(ifnull(`bpp`.`nominal_debet`,0)) - sum(ifnull(`bpp`.`nominal_kredit`,0))) AS `jum_bayar` from `view_byr_peny_ptg_dt` `bpp` group by `bpp`.`id_penjualan`;

-- membuang struktur untuk view si_sarung.view_byr_peny_ptg_dt
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_byr_peny_ptg_dt`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_byr_peny_ptg_dt` AS select `jpp`.`id_penjualan` AS `id_penjualan`,`jpp`.`id_pelanggan` AS `id_pelanggan`,`jpp`.`no_faktur` AS `no_faktur`,`jpp`.`sufix_no_faktur` AS `sufix_no_faktur`,`jpp`.`nomor_jurnal` AS `nomor_jurnal`,`jpp`.`tanggal_jurnal` AS `tanggal_jurnal`,`jpp`.`tipe_akun` AS `tipe_akun_debet`,NULL AS `tipe_akun_kredit`,ifnull(`jpp`.`nominal`,0) AS `nominal_debet`,0 AS `nominal_kredit` from `view_jurnal_peny_piutang` `jpp` where (`jpp`.`tipe_akun` = 'D') union all select `jpp`.`id_penjualan` AS `id_penjualan`,`jpp`.`id_pelanggan` AS `id_pelanggan`,`jpp`.`no_faktur` AS `no_faktur`,`jpp`.`sufix_no_faktur` AS `sufix_no_faktur`,`jpp`.`nomor_jurnal` AS `nomor_jurnal`,`jpp`.`tanggal_jurnal` AS `tanggal_jurnal`,NULL AS `tipe_akun_debet`,`jpp`.`tipe_akun` AS `tipe_akun_kredit`,0 AS `nominal_debet`,ifnull(`jpp`.`nominal`,0) AS `nominal_kredit` from `view_jurnal_peny_piutang` `jpp` where (`jpp`.`tipe_akun` = 'K');

-- membuang struktur untuk view si_sarung.view_edit_barangkeluar_kemasan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_barangkeluar_kemasan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_barangkeluar_kemasan` AS select `pb`.`id_barangkeluar_kemasan` AS `id_barangkeluar_kemasan`,`pbr`.`id_barangkeluar_kb` AS `id_barangkeluar_kb`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbr`.`jumlah` AS `jumlah`,0 AS `masuk`,`pbr`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pb`.`tanggal` AS `tanggal`,(case when (`pbr`.`id_proses_sebelum` = 0) then '' else `pbr`.`id_proses_sebelum` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`mwk`.`inisial`) then '' else `mwk`.`inisial` end) AS `inisial_komposisi`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbr`.`id_kualitas` = 0) then '' else `pbr`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbr`.`id_kualitas_dudul` = 0) then '' else `pbr`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbr`.`id_kualitas_dudul` = 0) then '' when (`pbr`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbr`.`id_label` = 0) then '' else `pbr`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbr`.`id_kemasan` = 0) then '' else `pbr`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbr`.`id_kemasansatuan` = 0) then '' else `pbr`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbr`.`id_kemasansepuluh` = 0) then '' else `pbr`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbr`.`id_kemasanseratus` = 0) then '' else `pbr`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbr`.`id_cap` = 0) then '' else `pbr`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbr`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbr`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbr`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbr`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbr`.`jumlah_rencana`) or (`pbr`.`jumlah_rencana` = 0)) then '' else `pbr`.`jumlah_rencana` end) AS `jumlah_rencana`,`pbr`.`keterangan` AS `keterangan`,`pbr`.`status` AS `status` from ((((((((((((((((((((`pro_barangkeluar_kemasan` `pb` join `pro_barangkeluar_kemasan_barang` `pbr` on((`pb`.`id_barangkeluar_kemasan` = `pbr`.`id_barangkeluar_kemasan`))) join `ms_barang` `mb` on((`pbr`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbr`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `pbr`.`id_proses_sebelum`))) left join `ms_warnakomposisi` `mwk` on((`pbr`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`pbr`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbr`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbr`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pbr`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pbr`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbr`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbr`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbr`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbr`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbr`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbr`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbr`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbr`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbr`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbr`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_edit_barangmasuk_kemasan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_barangmasuk_kemasan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_barangmasuk_kemasan` AS select `pbk`.`id_barangmasuk_kemasan` AS `id_barangmasuk_kemasan`,`pbkb`.`id_barangmasuk_kb` AS `id_barangmasuk_kb`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbkb`.`jumlah` AS `jumlah`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pbk`.`tanggal` AS `tanggal`,(case when (`pbkel`.`id_proses` = 0) then '' else `pbkel`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`mwk`.`inisial`) then '' else `mwk`.`inisial` end) AS `inisial_komposisi`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbkb`.`id_kualitas` = 0) then '' else `pbkb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbkb`.`id_kualitas_dudul` = 0) then '' else `pbkb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbkb`.`id_kualitas_dudul` = 0) then '' when (`pbkb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbkb`.`id_label` = 0) then '' else `pbkb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbkb`.`id_kemasan` = 0) then '' else `pbkb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbkb`.`id_kemasansatuan` = 0) then '' else `pbkb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbkb`.`id_kemasansepuluh` = 0) then '' else `pbkb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbkb`.`id_kemasanseratus` = 0) then '' else `pbkb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbkb`.`id_cap` = 0) then '' else `pbkb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbkb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbkb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbkb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbkb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbkb`.`jumlah_rencana`) or (`pbkb`.`jumlah_rencana` = 0)) then '' else `pbkb`.`jumlah_rencana` end) AS `jumlah_rencana`,`pbkb`.`keterangan` AS `keterangan` from (((((((((((((((((((((`pro_barangmasuk_kemasan` `pbk` join `pro_barangmasuk_kemasan_barang` `pbkb` on((`pbk`.`id_barangmasuk_kemasan` = `pbkb`.`id_barangmasuk_kemasan`))) join `pro_barangkeluar_kemasan` `pbkel` on((`pbk`.`id_barangkeluar_kemasan` = `pbkel`.`id_barangkeluar_kemasan`))) join `ms_barang` `mb` on((`pbkb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbkb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `pbkel`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pbkb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`pbkb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbkb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbkb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pbkb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pbkb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbkb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbkb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbkb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbkb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbkb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbkb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbkb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbkb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbkb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbkb`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_edit_getedit_keluar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_getedit_keluar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_getedit_keluar` AS select `pbb`.`id` AS `id`,`pb`.`id_barangkeluar` AS `id_barangkeluar`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbb`.`jumlah` AS `jumlah`,`pbb`.`jumlah_konversi` AS `jumlah_konversi`,0 AS `masuk`,`pbb`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pb`.`tanggal` AS `tanggal`,`pb`.`status` AS `status`,`pbb`.`keterangan` AS `keterangan`,`pbb`.`id_proses_sebelum` AS `id_proses_sebelum`,`mkb`.`nama` AS `namabarang_subkategori`,`mkb2`.`nama` AS `namabarang_kategori`,(case when (`mp`.`parent` = 0) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when (`mp`.`parent` = 0) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when (`mwk`.`id_komposisi` = 0) then '' else (case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) end) AS `id_komposisi`,(case when (`mwk`.`id_komposisi` = 0) then '' else (case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) end) AS `nama_komposisi`,(case when (`mwk`.`id_komposisi` = 0) then '' else (case when isnull(`mwk`.`inisial`) then '' else `mwk`.`inisial` end) end) AS `inisial_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan_jumlah`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `satuan_jumlah`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_satuan_konv`,(case when isnull(`ms2`.`nama_satuan`) then '' else `ms2`.`nama_satuan` end) AS `satuan_jumlah_konv`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbb`.`id_kualitas` = 0) then '' else `pbb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' else `pbb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' when (`pbb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbb`.`id_label` = 0) then '' else `pbb`.`id_label` end) AS `id_label`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_label`,(case when (`pbb`.`id_kemasan` = 0) then '' else `pbb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbb`.`id_kemasansatuan` = 0) then '' else `pbb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbb`.`id_kemasansepuluh` = 0) then '' else `pbb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbb`.`id_kemasanseratus` = 0) then '' else `pbb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbb`.`id_cap` = 0) then '' else `pbb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb8`.`nama_barang`) then '' else `mb8`.`nama_barang` end) AS `nama_cap`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms3`.`id_satuan`) then '' else `ms3`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms3`.`id_satuan`) then '' else `ms3`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbb`.`jumlah_rencana`) or (`pbb`.`jumlah_rencana` = 0)) then '' else `pbb`.`jumlah_rencana` end) AS `jumlah_rencana`,(case when (`mp`.`parent` = '0') then '' else `mp`.`id_proses` end) AS `id_proses_sebelumnya`,`pbb`.`tanggal_proses` AS `tanggal_proses`,`pbb`.`status` AS `status_barang` from ((((((((((((((((((((((((`pro_barangkeluar_barang` `pbb` join `pro_barangkeluar` `pb` on((`pb`.`id_barangkeluar` = `pbb`.`id_barangkeluar`))) join `ms_barang` `mb` on((`pbb`.`id_barang` = `mb`.`id`))) join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`))) join `ms_gudang` `mg` on((`pbb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`pbb`.`id_proses_sebelum` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pbb`.`warna` = `mwk`.`id_komposisi`))) left join `ms_konversi` `mko` on((`pbb`.`id_barang` = `mko`.`kode`))) left join `ms_satuan` `ms` on((`pbb`.`satuan_jumlah` = `ms`.`id_satuan`))) left join `ms_satuan` `ms2` on((`mko`.`satuan_akhir` = `ms2`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb3` on((`pbb`.`id_label` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbb`.`id_kemasan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbb`.`id_kemasansatuan` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbb`.`id_kemasansepuluh` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbb`.`id_kemasanseratus` = `mb7`.`id`))) left join `ms_barang` `mb8` on((`pbb`.`id_cap` = `mb8`.`id`))) left join `ms_kualitas` `mk2` on((`pbb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms3` on((`pbb`.`id_perubahansatuan` = `ms3`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_edit_keluar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_keluar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_keluar` AS select `pbb`.`id` AS `id_barangkeluar_barang`,`pb`.`id_barangkeluar` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbb`.`jumlah` AS `jumlah`,0 AS `masuk`,`pbb`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pb`.`tanggal` AS `tanggal`,(case when (`mp`.`parent` = 0) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when (`mp`.`parent` = 0) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when (`mwk`.`id_komposisi` = 0) then '' else (case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) end) AS `id_komposisi`,(case when (`mwk`.`id_komposisi` = 0) then '' else (case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) end) AS `nama_komposisi`,(case when (`mwk`.`id_komposisi` = 0) then '' else (case when isnull(`mwk`.`inisial`) then '' else `mwk`.`inisial` end) end) AS `inisial_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbb`.`id_kualitas` = 0) then '' else `pbb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' else `pbb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' when (`pbb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbb`.`id_label` = 0) then '' else `pbb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbb`.`id_kemasan` = 0) then '' else `pbb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbb`.`id_kemasansatuan` = 0) then '' else `pbb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbb`.`id_kemasansepuluh` = 0) then '' else `pbb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbb`.`id_kemasanseratus` = 0) then '' else `pbb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbb`.`id_cap` = 0) then '' else `pbb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbb`.`jumlah_rencana`) or (`pbb`.`jumlah_rencana` = 0)) then '' else `pbb`.`jumlah_rencana` end) AS `jumlah_rencana`,`pbb`.`keterangan` AS `keterangan`,`pbb`.`tanggal_proses` AS `tanggal_proses`,`pbb`.`status` AS `status` from ((((((((((((((((((((`pro_barangkeluar` `pb` join `pro_barangkeluar_barang` `pbb` on((`pb`.`id_barangkeluar` = `pbb`.`id_barangkeluar`))) join `ms_barang` `mb` on((`pbb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbb`.`id_gudang` = `mg`.`id_gudang`))) join `ms_proses` `mp` on((`pbb`.`id_proses_sebelum` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pbb`.`warna` = `mwk`.`id_komposisi`))) join `ms_satuan` `ms` on((`pbb`.`satuan_jumlah` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbb`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_edit_kembali
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_kembali`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_kembali` AS select `pkb`.`id_kembali_barang` AS `id_kembali_barang`,`pk`.`id_kembali` AS `id_kembali`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pkb`.`jumlah` AS `jumlah`,`pkb`.`jumlah` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pk`.`tanggal` AS `tanggal`,(case when isnull(`mp`.`id_proses`) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mw`.`nama`) then '' else `mw`.`nama` end) AS `nama_komposisi`,(case when isnull(`mw`.`inisial`) then '' else `mw`.`inisial` end) AS `inisial_komposisi`,1 AS `nilai_awal`,1 AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`nama_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when isnull(`mk2`.`id_kualitas`) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_dudul`,(case when isnull(`mk2`.`nama_kualitas`) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_dudul`,(case when isnull(`mb2`.`id`) then '' else `mb2`.`id` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when isnull(`mb3`.`id`) then '' else `mb3`.`id` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when isnull(`mb4`.`id`) then '' else `mb4`.`id` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when isnull(`mb5`.`id`) then '' else `mb5`.`id` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when isnull(`mb6`.`id`) then '' else `mb6`.`id` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when isnull(`mb7`.`id`) then '' else `mb7`.`id` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when isnull(`mk3`.`id_kualitas`) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_proses`,(case when isnull(`mk3`.`nama_kualitas`) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when isnull(`mk4`.`id_kualitas`) then '' else `mk4`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when isnull(`mk4`.`nama_kualitas`) then '' else `mk4`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`nama_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (`pkb`.`jumlah_rencana` = 0) then '' else `pkb`.`jumlah_rencana` end) AS `jumlah_rencana`,'' AS `keterangan`,'' AS `tanggal_proses`,`pkb`.`status` AS `status` from (((((((((((((((((((((((`pro_kembali` `pk` join `pro_kembali_barang` `pkb` on((`pk`.`id_kembali` = `pkb`.`id_kembali`))) left join `ms_barang` `mb` on((`pkb`.`id_barang` = `mb`.`id`))) left join `ms_gudang` `mg` on((`pkb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_satuan` `ms` on((`pkb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_proses` `mp` on((`pkb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mw` on((`pkb`.`id_komposisi` = `mw`.`id_komposisi`))) left join `ms_motif` `mm` on((`pkb`.`id_motif` = `mm`.`id_motif`))) left join `ms_motif_barang` `mmb` on((`pkb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_barang` `mb2` on((`pkb`.`id_label` = `mb2`.`id`))) left join `ms_kualitas` `mk` on((`pkb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_kualitas` `mk2` on((`pkb`.`id_kualitas_dudul` = `mk2`.`id_kualitas`))) left join `ms_barang` `mb3` on((`pkb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pkb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pkb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pkb`.`id_kemasanseratus` = `mb6`.`id`))) left join `pem_workorder` `pw` on((`pkb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pkb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_barang` `mb7` on((`pkb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk3` on((`pkb`.`id_kualitas_proses` = `mk3`.`id_kualitas`))) left join `ms_kualitas` `mk4` on((`pkb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pkb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) left join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) left join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`)));

-- membuang struktur untuk view si_sarung.view_edit_masuk
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_masuk`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_masuk` AS select `pb`.`id_barangmasuk` AS `id_barangmasuk`,`pbb`.`id` AS `id`,`pbb`.`id_barang` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`mp`.`id_proses` AS `id_proses`,`mp`.`nama_proses` AS `nama_proses`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`ms`.`id_satuan` AS `id_satuan`,`ms`.`nama_satuan` AS `nama_satuan`,`pbb`.`jumlah` AS `jumlah`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`mwk`.`inisial`) then '' else `mwk`.`inisial` end) AS `inisial_komposisi`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when (`mp`.`parent` = 0) then '' else (case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) end) AS `id_workorder_barang`,(case when (`mp`.`parent` = 0) then '' else (case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) end) AS `no_workorder_barang`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' else `pbb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' when (`pbb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbb`.`id_label` = 0) then '' else `pbb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbb`.`id_kemasan` = 0) then '' else `pbb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbb`.`id_kemasansatuan` = 0) then '' else `pbb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbb`.`id_kemasansepuluh` = 0) then '' else `pbb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbb`.`id_kemasanseratus` = 0) then '' else `pbb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbb`.`id_cap` = 0) then '' else `pbb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbb`.`jumlah_rencana`) or (`pbb`.`jumlah_rencana` = 0)) then '' else `pbb`.`jumlah_rencana` end) AS `jumlah_rencana`,`pbb`.`keterangan` AS `keterangan`,`pbb`.`status` AS `status` from (((((((((((((((((((((`pro_barangmasuk` `pb` join `pro_barangmasuk_barang` `pbb` on((`pb`.`id_barangmasuk` = `pbb`.`id_barangmasuk`))) join `pro_barangkeluar` `pbk` on((`pb`.`id_barangkeluar` = `pbk`.`id_barangkeluar`))) join `ms_gudang` `mg` on((`pbb`.`id_gudang` = `mg`.`id_gudang`))) join `ms_proses` `mp` on((`pbk`.`id_proses` = `mp`.`id_proses`))) join `ms_barang` `mb` on((`pbb`.`id_barang` = `mb`.`id`))) join `ms_satuan` `ms` on((`pbb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_warnakomposisi` `mwk` on((`pbb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_motif_barang` `mmb` on((`pbb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pbk`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pbk`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbb`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_edit_masukatm
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_masukatm`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_masukatm` AS select `pb`.`id_barangmasuk` AS `id_barangmasuk`,`pbb`.`id` AS `id`,`pbb`.`id_barang` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`ms`.`id_satuan` AS `id_satuan`,`ms`.`nama_satuan` AS `nama_satuan`,`pbb`.`jumlah` AS `jumlah`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' else `pbb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' when (`pbb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbb`.`id_label` = 0) then '' else `pbb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbb`.`id_kemasan` = 0) then '' else `pbb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbb`.`id_kemasansatuan` = 0) then '' else `pbb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbb`.`id_kemasansepuluh` = 0) then '' else `pbb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbb`.`id_kemasanseratus` = 0) then '' else `pbb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbb`.`id_cap` = 0) then '' else `pbb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbb`.`jumlah_rencana`) or (`pbb`.`jumlah_rencana` = 0)) then '' else `pbb`.`jumlah_rencana` end) AS `jumlah_rencana`,(case when (`pbb`.`id_shift` = 0) then '' else `pbb`.`id_shift` end) AS `id_shift`,(case when isnull(`msh`.`nama_shift`) then '' else `msh`.`nama_shift` end) AS `nama_shift` from ((((((((((((((((((`pro_barangmasuk` `pb` join `pro_barangmasuk_barang` `pbb` on((`pb`.`id_barangmasuk` = `pbb`.`id_barangmasuk`))) join `ms_gudang` `mg` on((`pbb`.`id_gudang` = `mg`.`id_gudang`))) join `ms_barang` `mb` on((`pbb`.`id_barang` = `mb`.`id`))) join `ms_satuan` `ms` on((`pbb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_warnakomposisi` `mwk` on((`pbb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_motif_barang` `mmb` on((`pbb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbb`.`id_motif` = `mm`.`id_motif`))) left join `ms_kualitas` `mk` on((`pbb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) left join `ms_shift` `msh` on((`pbb`.`id_shift` = `msh`.`id_shift`)));

-- membuang struktur untuk view si_sarung.view_edit_opname
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_opname`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_opname` AS select `iob`.`id_opname_barang` AS `id_opname_barang`,`iob`.`id_opname` AS `id_opname`,`iob`.`jumlah_stok` AS `jumlah_stok`,`iob`.`jumlah_opname` AS `jumlah_opname`,`iob`.`jumlah_selisih` AS `jumlah_selisih`,`iob`.`keterangan` AS `keterangan`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`io`.`tanggal` AS `tanggal`,(case when (`iob`.`id_proses` = 0) then '' else `iob`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`iob`.`id_kualitas` = 0) then '' else `iob`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`iob`.`id_kualitas_dudul` = 0) then '' else `iob`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`iob`.`id_kualitas_dudul` = 0) then '' when (`iob`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`iob`.`id_label` = 0) then '' else `iob`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`iob`.`id_kemasan` = 0) then '' else `iob`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`iob`.`id_kemasansatuan` = 0) then '' else `iob`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`iob`.`id_kemasansepuluh` = 0) then '' else `iob`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`iob`.`id_kemasanseratus` = 0) then '' else `iob`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`iob`.`id_cap` = 0) then '' else `iob`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`iob`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`iob`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`iob`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`iob`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`iob`.`jumlah_rencana`) or (`iob`.`jumlah_rencana` = 0)) then '' else `iob`.`jumlah_rencana` end) AS `jumlah_rencana` from ((((((((((((((((((((`inv_opname` `io` join `inv_opname_barang` `iob` on((`io`.`id_opname` = `iob`.`id_opname`))) join `ms_barang` `mb` on((`iob`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`io`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `iob`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`iob`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`iob`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`iob`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`iob`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`iob`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`iob`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`iob`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`iob`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`iob`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`iob`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`iob`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`iob`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`iob`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`iob`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`iob`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`iob`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_edit_opnameproduksi
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_opnameproduksi`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_opnameproduksi` AS select `ip`.`id_opname` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,abs((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`)) AS `jumlah`,(case when ((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`) < 0) then abs((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`)) else 0 end) AS `masuk`,(case when ((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`) > 0) then abs((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`)) else 0 end) AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,date_format(`ip`.`tanggal_full`,'%Y-%m-%d') AS `tanggal`,(case when isnull(`mp`.`id_proses`) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`id_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mp`.`id_proses`) then '' else `mw`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mp`.`id_proses`) then '' else `mw`.`nama` end) AS `nama_komposisi`,`ms`.`id_satuan` AS `id_satuan`,`ms`.`nama_satuan` AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when isnull(`pw`.`id_workorder`) then '' else `pw`.`id_workorder` end) AS `id_workorder`,(case when isnull(`pw`.`id_workorder`) then '' else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when isnull(`mk2`.`id_kualitas`) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_dudul`,(case when isnull(`mk2`.`id_kualitas`) then '' else `mk2`.`id_kualitas` end) AS `kualitas_dudul`,(case when isnull(`mb2`.`id`) then '' else `mb2`.`id` end) AS `id_label`,(case when isnull(`mb2`.`id`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when isnull(`mb3`.`id`) then '' else `mb3`.`id` end) AS `id_kemasan`,(case when isnull(`mb3`.`id`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when isnull(`mb4`.`id`) then '' else `mb4`.`id` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`id`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when isnull(`mb5`.`id`) then '' else `mb5`.`id` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`id`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when isnull(`mb6`.`id`) then '' else `mb6`.`id` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`id`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when isnull(`mb7`.`id`) then '' else `mb7`.`id` end) AS `id_cap`,(case when isnull(`mb7`.`id`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when isnull(`mk3`.`id_kualitas`) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_proses`,(case when isnull(`mk3`.`id_kualitas`) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when isnull(`mk4`.`id_kualitas`) then '' else `mk4`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when isnull(`mk4`.`id_kualitas`) then '' else `mk4`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (`iob`.`jumlah_rencana` <> 0) then `iob`.`jumlah_rencana` else '' end) AS `jumlah_rencana`,'' AS `ket_1`,'' AS `ket_2`,'Opname' AS `ket_3`,(case when isnull(`mp2`.`id_proses`) then '' else `mp2`.`nama_proses` end) AS `ket_4`,'' AS `ket_5`,1 AS `nilai_awal`,1 AS `nilai_akhir`,`iob`.`id_opnameproduksi_barang` AS `id_detail`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`id_komposisi` end) AS `id_warna`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`nama` end) AS `nama_warna`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`inisial` end) AS `inisial_warna`,`iob`.`keterangan` AS `ket_proses`,(case when isnull(`mp2`.`id_proses`) then '' else `mp2`.`id_proses` end) AS `id_proses_sekarang`,(case when isnull(`mp2`.`id_proses`) then '' else `mp2`.`nama_proses` end) AS `nama_proses_sekarang`,`ip`.`tanggal_full` AS `tanggal_full`,(case when isnull(`mkb2`.`id_kb`) then '' else `mkb2`.`id_kb` end) AS `id_kategori`,(case when isnull(`mkb2`.`id_kb`) then '' else `mkb2`.`nama` end) AS `nama_kategori`,(case when isnull(`mkb`.`id_kb`) then '' else `mkb`.`id_kb` end) AS `id_subkategori`,(case when isnull(`mkb`.`id_kb`) then '' else `mkb`.`nama` end) AS `nama_subkategori`,(case when isnull(`mlp`.`id_lokasi`) then '' else `mlp`.`id_lokasi` end) AS `id_lokasi`,(case when isnull(`mlp`.`id_lokasi`) then '' else `mlp`.`nama_lokasi` end) AS `nama_lokasi`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`id_pegawai` end) AS `id_pegawai`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`nama_pegawai` end) AS `nama_pegawai`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`id_rekanan` end) AS `id_rekanan`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`nama` end) AS `nama_rekanan`,(case when isnull(`mmes`.`id_mesin`) then '' else `mmes`.`id_mesin` end) AS `id_mesin`,(case when isnull(`mmes`.`id_mesin`) then '' else `mmes`.`nama` end) AS `nama_mesin` from ((((((((((((((((((((((((((((`inv_opnameproduksi` `ip` join `inv_opnameproduksi_barang` `iob` on((`ip`.`id_opname` = `iob`.`id_opname`))) left join `ms_barang` `mb` on((`iob`.`id_barang` = `mb`.`id`))) left join `ms_gudang` `mg` on((`mg`.`id_gudang` = `iob`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `iob`.`id_proses`))) left join `ms_warnakomposisi` `mw` on((`mw`.`id_komposisi` = `iob`.`id_komposisi`))) left join `ms_satuan` `ms` on((`ms`.`id_satuan` = `iob`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`mmb`.`id_motif_barang` = `iob`.`id_motif_barang`))) left join `ms_motif` `mm` on((`mm`.`id_motif` = `iob`.`id_motif`))) left join `pem_workorder` `pw` on((`pw`.`id_workorder` = `iob`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pwb`.`id_workorder_barang` = `iob`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`mk`.`id_kualitas` = `iob`.`id_kualitas`))) left join `ms_kualitas` `mk2` on((`mk2`.`id_kualitas` = `iob`.`id_kualitas_dudul`))) left join `ms_barang` `mb2` on((`mb2`.`id` = `iob`.`id_label`))) left join `ms_barang` `mb3` on((`mb3`.`id` = `iob`.`id_kemasan`))) left join `ms_barang` `mb4` on((`mb4`.`id` = `iob`.`id_kemasansatuan`))) left join `ms_barang` `mb5` on((`mb5`.`id` = `iob`.`id_kemasansepuluh`))) left join `ms_barang` `mb6` on((`mb6`.`id` = `iob`.`id_kemasanseratus`))) left join `ms_barang` `mb7` on((`mb7`.`id` = `iob`.`id_cap`))) left join `ms_kualitas` `mk3` on((`mk3`.`id_kualitas` = `iob`.`id_kualitas_proses`))) left join `ms_kualitas` `mk4` on((`mk4`.`id_kualitas` = `iob`.`id_kualitas_periksa`))) left join `ms_satuan` `ms2` on((`ms2`.`id_satuan` = `iob`.`id_perubahansatuan`))) left join `ms_proses` `mp2` on((`mp2`.`id_proses` = `iob`.`id_proses_sekarang`))) left join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) left join `ms_kategori_barang` `mkb2` on((`mkb2`.`id_kb` = `mkb`.`induk_kb`))) left join `ms_lokasi_produksi` `mlp` on((`mlp`.`id_lokasi` = `ip`.`id_lokasi`))) left join `ms_pegawai` `mpg` on((`iob`.`id_pegawai` = `mpg`.`id_pegawai`))) left join `ms_rekanan` `mpr` on((`iob`.`id_rekanan` = `mpr`.`id_rekanan`))) left join `ms_mesin` `mmes` on((`iob`.`id_mesin` = `mmes`.`id_mesin`)));

-- membuang struktur untuk view si_sarung.view_edit_penerimaan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_penerimaan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_penerimaan` AS select `view_penerimaan_all`.`id` AS `id`,`view_penerimaan_all`.`id_penerimaan` AS `id_penerimaan`,`view_penerimaan_all`.`id_barang` AS `id_barang`,`view_penerimaan_all`.`kode_barang` AS `kode_barang`,`view_penerimaan_all`.`nama_barang` AS `nama_barang`,(`view_penerimaan_all`.`jum_barang` * (`view_penerimaan_all`.`nilai_akhir` / `view_penerimaan_all`.`nilai_awal`)) AS `jumlah`,(`view_penerimaan_all`.`masuk` * (`view_penerimaan_all`.`nilai_akhir` / `view_penerimaan_all`.`nilai_awal`)) AS `masuk`,0 AS `keluar`,`view_penerimaan_all`.`id_gudang` AS `id_gudang`,`view_penerimaan_all`.`nama_gudang` AS `nama_gudang`,`view_penerimaan_all`.`tanggal` AS `tanggal`,'' AS `id_proses`,'' AS `nama_proses`,'' AS `id_komposisi`,'' AS `nama_komposisi`,`view_penerimaan_all`.`id_satuan` AS `id_satuan`,`view_penerimaan_all`.`nama_satuan` AS `nama_satuan`,`view_penerimaan_all`.`id_corak` AS `id_corak`,`view_penerimaan_all`.`nama_corak` AS `nama_corak`,`view_penerimaan_all`.`id_motif` AS `id_motif`,`view_penerimaan_all`.`nama_motif` AS `nama_motif`,`view_penerimaan_all`.`id_workorder` AS `id_workorder`,`view_penerimaan_all`.`no_workorder` AS `no_workorder`,`view_penerimaan_all`.`id_workorder_barang` AS `id_workorder_barang`,`view_penerimaan_all`.`no_workorder_barang` AS `no_workorder_barang`,`view_penerimaan_all`.`id_kualitas` AS `id_kualitas`,`view_penerimaan_all`.`nama_kualitas` AS `nama_kualitas`,`view_penerimaan_all`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_penerimaan_all`.`kualitas_dudul` AS `kualitas_dudul`,`view_penerimaan_all`.`id_label` AS `id_label`,`view_penerimaan_all`.`nama_label` AS `nama_label`,`view_penerimaan_all`.`id_kemasan` AS `id_kemasan`,`view_penerimaan_all`.`nama_kemasan` AS `nama_kemasan`,`view_penerimaan_all`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_penerimaan_all`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_penerimaan_all`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_penerimaan_all`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_penerimaan_all`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_penerimaan_all`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_penerimaan_all`.`id_cap` AS `id_cap`,`view_penerimaan_all`.`nama_cap` AS `nama_cap`,`view_penerimaan_all`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_penerimaan_all`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_penerimaan_all`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_penerimaan_all`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_penerimaan_all`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_penerimaan_all`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_penerimaan_all`.`jumlah_rencana` AS `jumlah_rencana` from `view_penerimaan_all`;

-- membuang struktur untuk view si_sarung.view_edit_rubahspk
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_rubahspk`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_rubahspk` AS select `ir`.`id_rubahspk` AS `id_rubahspk`,`irb`.`id_rubahspk_barang` AS `id_rubahspk_barang`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`irb`.`jumlah` AS `jum_barang`,0 AS `masuk`,`irb`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`ir`.`tanggal` AS `tanggal`,(case when (`irb`.`id_proses` = 0) then '' else `irb`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when (isnull(`pw_akhir`.`id_workorder`) and isnull(`pwb_akhir`.`id_workorder_barang`)) then '' when isnull(`pw_akhir`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb_akhir`.`id_workorder_barang`)) else `pw_akhir`.`id_workorder` end) AS `id_workorder_akhir`,(case when (isnull(`pw_akhir`.`id_workorder`) and isnull(`pwb_akhir`.`id_workorder_barang`)) then '' when isnull(`pw_akhir`.`id_workorder`) then (select `pw_akhir`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb_akhir`.`id_workorder_barang`)) else `pw_akhir`.`nomor` end) AS `no_workorder_akhir`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when isnull(`pwb_akhir`.`id_workorder_barang`) then '' else `pwb_akhir`.`id_workorder_barang` end) AS `id_workorder_barang_akhir`,(case when isnull(`pwb_akhir`.`no_workorder`) then '' else `pwb_akhir`.`no_workorder` end) AS `no_workorder_barang_akhir`,(case when (`irb`.`id_kualitas` = 0) then '' else `irb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`irb`.`id_kualitas_dudul` = 0) then '' else `irb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`irb`.`id_kualitas_dudul` = 0) then '' when (`irb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`irb`.`id_label` = 0) then '' else `irb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`irb`.`id_kemasan` = 0) then '' else `irb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`irb`.`id_kemasansatuan` = 0) then '' else `irb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`irb`.`id_kemasansepuluh` = 0) then '' else `irb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`irb`.`id_kemasanseratus` = 0) then '' else `irb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`irb`.`id_cap` = 0) then '' else `irb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`irb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`irb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`irb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`irb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`irb`.`jumlah_rencana`) or (`irb`.`jumlah_rencana` = 0)) then '' else `irb`.`jumlah_rencana` end) AS `jumlah_rencana` from ((((((((((((((((((((((`inv_rubahspk` `ir` join `inv_rubahspk_barang` `irb` on((`ir`.`id_rubahspk` = `irb`.`id_rubahspk`))) join `ms_barang` `mb` on((`irb`.`kode_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`irb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `irb`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`irb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`irb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`irb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`irb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`irb`.`id_workorder_awal` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`irb`.`id_workorder_barang_awal` = `pwb`.`id_workorder_barang`))) left join `pem_workorder` `pw_akhir` on((`irb`.`id_workorder_akhir` = `pw_akhir`.`id_workorder`))) left join `pem_workorder_barang` `pwb_akhir` on((`irb`.`id_workorder_barang_akhir` = `pwb_akhir`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`irb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`irb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`irb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`irb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`irb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`irb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`irb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`irb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`irb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`irb`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_edit_transferbarang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_transferbarang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_transferbarang` AS select `itb`.`id_transfergudang_detail` AS `id_transfergudang_detail`,`itb`.`kode_transfergudang` AS `kode_transfergudang`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`itb`.`jumlah` AS `jumlah`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when (`itb`.`id_proses` = 0) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when (`itb`.`id_proses` = 0) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when (`mp`.`parent` = 0) then '' else (case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) end) AS `id_komposisi`,(case when (`mp`.`parent` = 0) then '' else (case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) end) AS `nama_komposisi`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`itb`.`id_kualitas` = 0) then '' else `itb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`itb`.`id_kualitas_dudul` = 0) then '' else `itb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when isnull(`itb`.`id_kualitas_dudul`) then '' when (`itb`.`id_kualitas_dudul` = 0) then '' when (`itb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`itb`.`id_label` = 0) then '' else `itb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`itb`.`id_kemasan` = 0) then '' else `itb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`itb`.`id_kemasansatuan` = 0) then '' else `itb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`itb`.`id_kemasansepuluh` = 0) then '' else `itb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`itb`.`id_kemasanseratus` = 0) then '' else `itb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`itb`.`id_cap` = 0) then '' else `itb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`itb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`itb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`itb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`itb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`itb`.`jumlah_rencana`) or (`itb`.`jumlah_rencana` = 0)) then '' else `itb`.`jumlah_rencana` end) AS `jumlah_rencana`,`mg3`.`id_gudang` AS `id_gudangtujuan`,`it`.`status` AS `status`,`itb`.`keterangan` AS `keterangan` from (((((((((((((((((((((`inv_transfergudang_barang` `itb` join `ms_barang` `mb` on((`itb`.`kode_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`itb`.`id_gudang` = `mg`.`id_gudang`))) join `ms_satuan` `ms` on((`itb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_proses` `mp` on((`itb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`itb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_motif` `mm` on((`itb`.`id_motif` = `mm`.`id_motif`))) left join `ms_motif_barang` `mmb` on((`itb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_barang` `mb2` on((`itb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`itb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`itb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`itb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`itb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`itb`.`id_kemasanseratus` = `mb7`.`id`))) left join `ms_kualitas` `mk` on((`itb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `pem_workorder` `pw` on((`itb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`itb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk2` on((`itb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`itb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`itb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) join `inv_transfergudang` `it` on((`it`.`id_transfergudang` = `itb`.`kode_transfergudang`))) join `ms_gudang` `mg3` on((`it`.`gudang_tujuan` = `mg3`.`id_gudang`)));

-- membuang struktur untuk view si_sarung.view_edit_workorder
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_workorder`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_workorder` AS select `pw`.`id_workorder` AS `id_workorder`,`pw`.`nomor` AS `nomor`,`pw`.`tanggal` AS `tanggal`,`pw`.`id_barang` AS `id_barang`,`mb`.`nama_barang` AS `nama_barang`,`pw`.`dasar_jumlah` AS `dasar_jumlah`,`pw`.`dasar2_jumlah` AS `dasar2_jumlah`,`pw`.`dasar3_jumlah` AS `dasar3_jumlah`,`pw`.`dasar4_jumlah` AS `dasar4_jumlah`,`pw`.`dasar5_jumlah` AS `dasar5_jumlah`,`pw`.`dasar6_jumlah` AS `dasar6_jumlah`,`pw`.`dasar7_jumlah` AS `dasar7_jumlah`,`pw`.`dasar8_jumlah` AS `dasar8_jumlah`,`pw`.`dasar9_jumlah` AS `dasar9_jumlah`,`pw`.`dasar10_jumlah` AS `dasar10_jumlah`,`pw`.`streep_jumlah` AS `streep_jumlah`,`pw`.`kombinasi1_jumlah` AS `kombinasi1_jumlah`,`pw`.`kombinasi2_jumlah` AS `kombinasi2_jumlah`,`pw`.`kombinasi3_jumlah` AS `kombinasi3_jumlah`,`pw`.`kluwungan1_jumlah` AS `kluwungan1_jumlah`,`pw`.`kluwungan2_jumlah` AS `kluwungan2_jumlah`,`pw`.`kluwungan3_jumlah` AS `kluwungan3_jumlah`,`pw`.`kluwungan4_jumlah` AS `kluwungan4_jumlah`,`pw`.`timbulan1_jumlah` AS `timbulan1_jumlah`,`pw`.`timbulan2_jumlah` AS `timbulan2_jumlah`,`pw`.`timbulan3_jumlah` AS `timbulan3_jumlah`,`pw`.`timbulan4_jumlah` AS `timbulan4_jumlah`,`pw`.`songketan1_jumlah` AS `songketan1_jumlah`,`pw`.`songketan2_jumlah` AS `songketan2_jumlah`,`pw`.`songketan3_jumlah` AS `songketan3_jumlah`,`pw`.`songketan4_jumlah` AS `songketan4_jumlah`,`pw`.`songketan5_jumlah` AS `songketan5_jumlah`,`pw`.`songketan6_jumlah` AS `songketan6_jumlah`,`pw`.`songketan7_jumlah` AS `songketan7_jumlah`,`pw`.`songketan8_jumlah` AS `songketan8_jumlah`,`pw`.`songketan9_jumlah` AS `songketan9_jumlah`,`pw`.`songketan10_jumlah` AS `songketan10_jumlah`,`pw`.`songketan11_jumlah` AS `songketan11_jumlah`,`pw`.`songketan12_jumlah` AS `songketan12_jumlah`,`pw`.`songketan13_jumlah` AS `songketan13_jumlah`,`pw`.`songketan14_jumlah` AS `songketan14_jumlah`,`pw`.`songketan15_jumlah` AS `songketan15_jumlah`,`pw`.`pancingan1_jumlah` AS `pancingan1_jumlah`,`pw`.`pancingan2_jumlah` AS `pancingan2_jumlah`,`pw`.`gunungan1_atas_jumlah` AS `gunungan1_atas_jumlah`,`pw`.`gunungan2_atas_jumlah` AS `gunungan2_atas_jumlah`,`pw`.`gunungan3_atas_jumlah` AS `gunungan3_atas_jumlah`,`pw`.`gunungan1_bawah_jumlah` AS `gunungan1_bawah_jumlah`,`pw`.`gunungan2_bawah_jumlah` AS `gunungan2_bawah_jumlah`,`pw`.`gunungan3_bawah_jumlah` AS `gunungan3_bawah_jumlah`,`pw`.`garis1_jumlah` AS `garis1_jumlah`,`pw`.`garis2_jumlah` AS `garis2_jumlah`,(case when (`pw`.`dasar_satuan` = 0) then '' else `pw`.`dasar_satuan` end) AS `dasar_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_dasar_satuan`,(case when (`pw`.`dasar2_satuan` = 0) then '' else `pw`.`dasar2_satuan` end) AS `dasar2_satuan`,(case when isnull(`ms2`.`nama_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_dasar2_satuan`,(case when (`pw`.`dasar3_satuan` = 0) then '' else `pw`.`dasar3_satuan` end) AS `dasar3_satuan`,(case when isnull(`ms3`.`nama_satuan`) then '' else `ms3`.`nama_satuan` end) AS `nama_dasar3_satuan`,(case when (`pw`.`streep_satuan` = 0) then '' else `pw`.`streep_satuan` end) AS `streep_satuan`,(case when isnull(`ms4`.`nama_satuan`) then '' else `ms4`.`nama_satuan` end) AS `nama_streep_satuan`,(case when (`pw`.`kombinasi1_satuan` = 0) then '' else `pw`.`kombinasi1_satuan` end) AS `kombinasi1_satuan`,(case when isnull(`ms5`.`nama_satuan`) then '' else `ms5`.`nama_satuan` end) AS `nama_kombinasi1_satuan`,(case when (`pw`.`kombinasi2_satuan` = 0) then '' else `pw`.`kombinasi2_satuan` end) AS `kombinasi2_satuan`,(case when isnull(`ms6`.`nama_satuan`) then '' else `ms6`.`nama_satuan` end) AS `nama_kombinasi2_satuan`,(case when (`pw`.`kombinasi3_satuan` = 0) then '' else `pw`.`kombinasi3_satuan` end) AS `kombinasi3_satuan`,(case when isnull(`ms7`.`nama_satuan`) then '' else `ms7`.`nama_satuan` end) AS `nama_kombinasi3_satuan`,(case when (`pw`.`kluwungan1_satuan` = 0) then '' else `pw`.`kluwungan1_satuan` end) AS `kluwungan1_satuan`,(case when isnull(`ms8`.`nama_satuan`) then '' else `ms8`.`nama_satuan` end) AS `nama_kluwungan1_satuan`,(case when (`pw`.`kluwungan2_satuan` = 0) then '' else `pw`.`kluwungan2_satuan` end) AS `kluwungan2_satuan`,(case when isnull(`ms9`.`nama_satuan`) then '' else `ms9`.`nama_satuan` end) AS `nama_kluwungan2_satuan`,(case when (`pw`.`kluwungan3_satuan` = 0) then '' else `pw`.`kluwungan3_satuan` end) AS `kluwungan3_satuan`,(case when isnull(`ms10`.`nama_satuan`) then '' else `ms10`.`nama_satuan` end) AS `nama_kluwungan3_satuan`,(case when (`pw`.`kluwungan4_satuan` = 0) then '' else `pw`.`kluwungan4_satuan` end) AS `kluwungan4_satuan`,(case when isnull(`ms11`.`nama_satuan`) then '' else `ms11`.`nama_satuan` end) AS `nama_kluwungan4_satuan`,(case when (`pw`.`timbulan1_satuan` = 0) then '' else `pw`.`timbulan1_satuan` end) AS `timbulan1_satuan`,(case when isnull(`ms12`.`nama_satuan`) then '' else `ms12`.`nama_satuan` end) AS `nama_timbulan1_satuan`,(case when (`pw`.`timbulan2_satuan` = 0) then '' else `pw`.`timbulan2_satuan` end) AS `timbulan2_satuan`,(case when isnull(`ms13`.`nama_satuan`) then '' else `ms13`.`nama_satuan` end) AS `nama_timbulan2_satuan`,(case when (`pw`.`timbulan3_satuan` = 0) then '' else `pw`.`timbulan3_satuan` end) AS `timbulan3_satuan`,(case when isnull(`ms14`.`nama_satuan`) then '' else `ms14`.`nama_satuan` end) AS `nama_timbulan3_satuan`,(case when (`pw`.`timbulan4_satuan` = 0) then '' else `pw`.`timbulan4_satuan` end) AS `timbulan4_satuan`,(case when isnull(`ms47`.`nama_satuan`) then '' else `ms47`.`nama_satuan` end) AS `nama_timbulan4_satuan`,(case when (`pw`.`songketan1_satuan` = 0) then '' else `pw`.`songketan1_satuan` end) AS `songketan1_satuan`,(case when isnull(`ms15`.`nama_satuan`) then '' else `ms15`.`nama_satuan` end) AS `nama_songketan1_satuan`,(case when (`pw`.`songketan2_satuan` = 0) then '' else `pw`.`songketan2_satuan` end) AS `songketan2_satuan`,(case when isnull(`ms16`.`nama_satuan`) then '' else `ms16`.`nama_satuan` end) AS `nama_songketan2_satuan`,(case when (`pw`.`songketan3_satuan` = 0) then '' else `pw`.`songketan3_satuan` end) AS `songketan3_satuan`,(case when isnull(`ms17`.`nama_satuan`) then '' else `ms17`.`nama_satuan` end) AS `nama_songketan3_satuan`,(case when (`pw`.`songketan4_satuan` = 0) then '' else `pw`.`songketan4_satuan` end) AS `songketan4_satuan`,(case when isnull(`ms18`.`nama_satuan`) then '' else `ms18`.`nama_satuan` end) AS `nama_songketan4_satuan`,(case when (`pw`.`pancingan1_satuan` = 0) then '' else `pw`.`pancingan1_satuan` end) AS `pancingan1_satuan`,(case when isnull(`ms19`.`nama_satuan`) then '' else `ms19`.`nama_satuan` end) AS `nama_pancingan1_satuan`,(case when (`pw`.`pancingan2_satuan` = 0) then '' else `pw`.`pancingan2_satuan` end) AS `pancingan2_satuan`,(case when isnull(`ms20`.`nama_satuan`) then '' else `ms20`.`nama_satuan` end) AS `nama_pancingan2_satuan`,(case when (`pw`.`gunungan1_atas_satuan` = 0) then '' else `pw`.`gunungan1_atas_satuan` end) AS `gunungan1_atas_satuan`,(case when isnull(`ms21`.`nama_satuan`) then '' else `ms21`.`nama_satuan` end) AS `nama_gunungan1_atas_satuan`,(case when (`pw`.`gunungan2_atas_satuan` = 0) then '' else `pw`.`gunungan2_atas_satuan` end) AS `gunungan2_atas_satuan`,(case when isnull(`ms22`.`nama_satuan`) then '' else `ms22`.`nama_satuan` end) AS `nama_gunungan2_atas_satuan`,(case when (`pw`.`gunungan3_atas_satuan` = 0) then '' else `pw`.`gunungan3_atas_satuan` end) AS `gunungan3_atas_satuan`,(case when isnull(`ms23`.`nama_satuan`) then '' else `ms23`.`nama_satuan` end) AS `nama_gunungan3_atas_satuan`,(case when (`pw`.`gunungan1_bawah_satuan` = 0) then '' else `pw`.`gunungan1_bawah_satuan` end) AS `gunungan1_bawah_satuan`,(case when isnull(`ms24`.`nama_satuan`) then '' else `ms24`.`nama_satuan` end) AS `nama_gunungan1_bawah_satuan`,(case when (`pw`.`gunungan2_bawah_satuan` = 0) then '' else `pw`.`gunungan2_bawah_satuan` end) AS `gunungan2_bawah_satuan`,(case when isnull(`ms25`.`nama_satuan`) then '' else `ms25`.`nama_satuan` end) AS `nama_gunungan2_bawah_satuan`,(case when (`pw`.`gunungan3_bawah_satuan` = 0) then '' else `pw`.`gunungan3_bawah_satuan` end) AS `gunungan3_bawah_satuan`,(case when isnull(`ms26`.`nama_satuan`) then '' else `ms26`.`nama_satuan` end) AS `nama_gunungan3_bawah_satuan`,(case when (`pw`.`garis1_satuan` = 0) then '' else `pw`.`garis1_satuan` end) AS `garis1_satuan`,(case when isnull(`ms27`.`nama_satuan`) then '' else `ms27`.`nama_satuan` end) AS `nama_garis1_satuan`,(case when (`pw`.`garis2_satuan` = 0) then '' else `pw`.`garis2_satuan` end) AS `garis2_satuan`,(case when isnull(`ms28`.`nama_satuan`) then '' else `ms28`.`nama_satuan` end) AS `nama_garis2_satuan`,(case when (`pw`.`dasar4_satuan` = 0) then '' else `pw`.`dasar4_satuan` end) AS `dasar4_satuan`,(case when isnull(`ms29`.`nama_satuan`) then '' else `ms29`.`nama_satuan` end) AS `nama_dasar4_satuan`,(case when (`pw`.`dasar5_satuan` = 0) then '' else `pw`.`dasar5_satuan` end) AS `dasar5_satuan`,(case when isnull(`ms30`.`nama_satuan`) then '' else `ms30`.`nama_satuan` end) AS `nama_dasar5_satuan`,(case when (`pw`.`dasar6_satuan` = 0) then '' else `pw`.`dasar6_satuan` end) AS `dasar6_satuan`,(case when isnull(`ms31`.`nama_satuan`) then '' else `ms31`.`nama_satuan` end) AS `nama_dasar6_satuan`,(case when (`pw`.`dasar7_satuan` = 0) then '' else `pw`.`dasar7_satuan` end) AS `dasar7_satuan`,(case when isnull(`ms32`.`nama_satuan`) then '' else `ms32`.`nama_satuan` end) AS `nama_dasar7_satuan`,(case when (`pw`.`dasar8_satuan` = 0) then '' else `pw`.`dasar8_satuan` end) AS `dasar8_satuan`,(case when isnull(`ms33`.`nama_satuan`) then '' else `ms33`.`nama_satuan` end) AS `nama_dasar8_satuan`,(case when (`pw`.`dasar9_satuan` = 0) then '' else `pw`.`dasar9_satuan` end) AS `dasar9_satuan`,(case when isnull(`ms34`.`nama_satuan`) then '' else `ms34`.`nama_satuan` end) AS `nama_dasar9_satuan`,(case when (`pw`.`dasar10_satuan` = 0) then '' else `pw`.`dasar10_satuan` end) AS `dasar10_satuan`,(case when isnull(`ms35`.`nama_satuan`) then '' else `ms35`.`nama_satuan` end) AS `nama_dasar10_satuan`,(case when (`pw`.`songketan5_satuan` = 0) then '' else `pw`.`songketan5_satuan` end) AS `songketan5_satuan`,(case when isnull(`ms36`.`nama_satuan`) then '' else `ms36`.`nama_satuan` end) AS `nama_songketan5_satuan`,(case when (`pw`.`songketan6_satuan` = 0) then '' else `pw`.`songketan6_satuan` end) AS `songketan6_satuan`,(case when isnull(`ms37`.`nama_satuan`) then '' else `ms37`.`nama_satuan` end) AS `nama_songketan6_satuan`,(case when (`pw`.`songketan7_satuan` = 0) then '' else `pw`.`songketan7_satuan` end) AS `songketan7_satuan`,(case when isnull(`ms38`.`nama_satuan`) then '' else `ms38`.`nama_satuan` end) AS `nama_songketan7_satuan`,(case when (`pw`.`songketan8_satuan` = 0) then '' else `pw`.`songketan8_satuan` end) AS `songketan8_satuan`,(case when isnull(`ms39`.`nama_satuan`) then '' else `ms39`.`nama_satuan` end) AS `nama_songketan8_satuan`,(case when (`pw`.`songketan9_satuan` = 0) then '' else `pw`.`songketan9_satuan` end) AS `songketan9_satuan`,(case when isnull(`ms40`.`nama_satuan`) then '' else `ms40`.`nama_satuan` end) AS `nama_songketan9_satuan`,(case when (`pw`.`songketan10_satuan` = 0) then '' else `pw`.`songketan10_satuan` end) AS `songketan10_satuan`,(case when isnull(`ms41`.`nama_satuan`) then '' else `ms41`.`nama_satuan` end) AS `nama_songketan10_satuan`,(case when (`pw`.`songketan11_satuan` = 0) then '' else `pw`.`songketan11_satuan` end) AS `songketan11_satuan`,(case when isnull(`ms42`.`nama_satuan`) then '' else `ms42`.`nama_satuan` end) AS `nama_songketan11_satuan`,(case when (`pw`.`songketan12_satuan` = 0) then '' else `pw`.`songketan12_satuan` end) AS `songketan12_satuan`,(case when isnull(`ms43`.`nama_satuan`) then '' else `ms43`.`nama_satuan` end) AS `nama_songketan12_satuan`,(case when (`pw`.`songketan13_satuan` = 0) then '' else `pw`.`songketan13_satuan` end) AS `songketan13_satuan`,(case when isnull(`ms44`.`nama_satuan`) then '' else `ms44`.`nama_satuan` end) AS `nama_songketan13_satuan`,(case when (`pw`.`songketan14_satuan` = 0) then '' else `pw`.`songketan14_satuan` end) AS `songketan14_satuan`,(case when isnull(`ms45`.`nama_satuan`) then '' else `ms45`.`nama_satuan` end) AS `nama_songketan14_satuan`,(case when (`pw`.`songketan15_satuan` = 0) then '' else `pw`.`songketan15_satuan` end) AS `songketan15_satuan`,(case when isnull(`ms46`.`nama_satuan`) then '' else `ms46`.`nama_satuan` end) AS `nama_songketan15_satuan` from ((((((((((((((((((((((((((((((((((((((((((((((((`pem_workorder` `pw` join `ms_barang` `mb` on((`pw`.`id_barang` = `mb`.`id`))) left join `ms_satuan` `ms` on((`pw`.`dasar_satuan` = `ms`.`id_satuan`))) left join `ms_satuan` `ms2` on((`pw`.`dasar2_satuan` = `ms2`.`id_satuan`))) left join `ms_satuan` `ms3` on((`pw`.`dasar3_satuan` = `ms3`.`id_satuan`))) left join `ms_satuan` `ms4` on((`pw`.`streep_satuan` = `ms4`.`id_satuan`))) left join `ms_satuan` `ms5` on((`pw`.`kombinasi1_satuan` = `ms5`.`id_satuan`))) left join `ms_satuan` `ms6` on((`pw`.`kombinasi2_satuan` = `ms6`.`id_satuan`))) left join `ms_satuan` `ms7` on((`pw`.`kombinasi3_satuan` = `ms7`.`id_satuan`))) left join `ms_satuan` `ms8` on((`pw`.`kluwungan1_satuan` = `ms8`.`id_satuan`))) left join `ms_satuan` `ms9` on((`pw`.`kluwungan2_satuan` = `ms9`.`id_satuan`))) left join `ms_satuan` `ms10` on((`pw`.`kluwungan3_satuan` = `ms10`.`id_satuan`))) left join `ms_satuan` `ms11` on((`pw`.`kluwungan4_satuan` = `ms11`.`id_satuan`))) left join `ms_satuan` `ms12` on((`pw`.`timbulan1_satuan` = `ms12`.`id_satuan`))) left join `ms_satuan` `ms13` on((`pw`.`timbulan2_satuan` = `ms13`.`id_satuan`))) left join `ms_satuan` `ms14` on((`pw`.`timbulan3_satuan` = `ms14`.`id_satuan`))) left join `ms_satuan` `ms47` on((`pw`.`timbulan4_satuan` = `ms47`.`id_satuan`))) left join `ms_satuan` `ms15` on((`pw`.`songketan1_satuan` = `ms15`.`id_satuan`))) left join `ms_satuan` `ms16` on((`pw`.`songketan2_satuan` = `ms16`.`id_satuan`))) left join `ms_satuan` `ms17` on((`pw`.`songketan3_satuan` = `ms17`.`id_satuan`))) left join `ms_satuan` `ms18` on((`pw`.`songketan4_satuan` = `ms18`.`id_satuan`))) left join `ms_satuan` `ms19` on((`pw`.`pancingan1_satuan` = `ms19`.`id_satuan`))) left join `ms_satuan` `ms20` on((`pw`.`pancingan2_satuan` = `ms20`.`id_satuan`))) left join `ms_satuan` `ms21` on((`pw`.`gunungan1_atas_satuan` = `ms21`.`id_satuan`))) left join `ms_satuan` `ms22` on((`pw`.`gunungan2_atas_satuan` = `ms22`.`id_satuan`))) left join `ms_satuan` `ms23` on((`pw`.`gunungan3_atas_satuan` = `ms23`.`id_satuan`))) left join `ms_satuan` `ms24` on((`pw`.`gunungan1_bawah_satuan` = `ms24`.`id_satuan`))) left join `ms_satuan` `ms25` on((`pw`.`gunungan2_bawah_satuan` = `ms25`.`id_satuan`))) left join `ms_satuan` `ms26` on((`pw`.`gunungan3_bawah_satuan` = `ms26`.`id_satuan`))) left join `ms_satuan` `ms27` on((`pw`.`garis1_satuan` = `ms27`.`id_satuan`))) left join `ms_satuan` `ms28` on((`pw`.`garis2_satuan` = `ms28`.`id_satuan`))) left join `ms_satuan` `ms29` on((`pw`.`dasar4_satuan` = `ms29`.`id_satuan`))) left join `ms_satuan` `ms30` on((`pw`.`dasar5_satuan` = `ms30`.`id_satuan`))) left join `ms_satuan` `ms31` on((`pw`.`dasar6_satuan` = `ms31`.`id_satuan`))) left join `ms_satuan` `ms32` on((`pw`.`dasar7_satuan` = `ms32`.`id_satuan`))) left join `ms_satuan` `ms33` on((`pw`.`dasar8_satuan` = `ms33`.`id_satuan`))) left join `ms_satuan` `ms34` on((`pw`.`dasar9_satuan` = `ms34`.`id_satuan`))) left join `ms_satuan` `ms35` on((`pw`.`dasar10_satuan` = `ms35`.`id_satuan`))) left join `ms_satuan` `ms36` on((`pw`.`songketan5_satuan` = `ms36`.`id_satuan`))) left join `ms_satuan` `ms37` on((`pw`.`songketan6_satuan` = `ms37`.`id_satuan`))) left join `ms_satuan` `ms38` on((`pw`.`songketan7_satuan` = `ms38`.`id_satuan`))) left join `ms_satuan` `ms39` on((`pw`.`songketan8_satuan` = `ms39`.`id_satuan`))) left join `ms_satuan` `ms40` on((`pw`.`songketan9_satuan` = `ms40`.`id_satuan`))) left join `ms_satuan` `ms41` on((`pw`.`songketan10_satuan` = `ms41`.`id_satuan`))) left join `ms_satuan` `ms42` on((`pw`.`songketan11_satuan` = `ms42`.`id_satuan`))) left join `ms_satuan` `ms43` on((`pw`.`songketan12_satuan` = `ms43`.`id_satuan`))) left join `ms_satuan` `ms44` on((`pw`.`songketan13_satuan` = `ms44`.`id_satuan`))) left join `ms_satuan` `ms45` on((`pw`.`songketan14_satuan` = `ms45`.`id_satuan`))) left join `ms_satuan` `ms46` on((`pw`.`songketan15_satuan` = `ms46`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_edit_workorder_barang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_workorder_barang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_workorder_barang` AS select `pwb`.`id_workorder_barang` AS `id_workorder_barang`,`pwb`.`id_workorder` AS `id_workorder`,`pwb`.`no_workorder` AS `no_workorder`,`pwb`.`motif` AS `motif`,`pwb`.`tanggal_celup` AS `tanggal_celup`,`pwb`.`hb` AS `hb`,`pwb`.`jumlah_beem` AS `jumlah_beem`,`pwb`.`beem` AS `beem`,`pwb`.`pakan` AS `pakan`,`mf`.`nama_motif` AS `nama_motif`,(case when (`pwb`.`dasar` = 0) then '' else `pwb`.`dasar` end) AS `dasar`,(case when isnull(`mw`.`nama`) then '' else `mw`.`nama` end) AS `nama_dasar`,(case when isnull(`mw`.`inisial`) then '' else `mw`.`inisial` end) AS `inisial_dasar`,(case when (`pwb`.`dasar2` = 0) then '' else `pwb`.`dasar2` end) AS `dasar2`,(case when isnull(`mw2`.`nama`) then '' else `mw2`.`nama` end) AS `nama_dasar2`,(case when isnull(`mw2`.`inisial`) then '' else `mw2`.`inisial` end) AS `inisial_dasar2`,(case when (`pwb`.`dasar3` = 0) then '' else `pwb`.`dasar3` end) AS `dasar3`,(case when isnull(`mw3`.`nama`) then '' else `mw3`.`nama` end) AS `nama_dasar3`,(case when isnull(`mw3`.`inisial`) then '' else `mw3`.`inisial` end) AS `inisial_dasar3`,(case when (`pwb`.`streep` = 0) then '' else `pwb`.`streep` end) AS `streep`,(case when isnull(`mw4`.`nama`) then '' else `mw4`.`nama` end) AS `nama_streep`,(case when isnull(`mw4`.`inisial`) then '' else `mw4`.`inisial` end) AS `inisial_streep`,(case when (`pwb`.`kombinasi1` = 0) then '' else `pwb`.`kombinasi1` end) AS `kombinasi1`,(case when isnull(`mw5`.`nama`) then '' else `mw5`.`nama` end) AS `nama_kombinasi1`,(case when isnull(`mw5`.`inisial`) then '' else `mw5`.`inisial` end) AS `inisial_kombinasi1`,(case when (`pwb`.`kombinasi2` = 0) then '' else `pwb`.`kombinasi2` end) AS `kombinasi2`,(case when isnull(`mw6`.`nama`) then '' else `mw6`.`nama` end) AS `nama_kombinasi2`,(case when isnull(`mw6`.`inisial`) then '' else `mw6`.`inisial` end) AS `inisial_kombinasi2`,(case when (`pwb`.`kombinasi3` = 0) then '' else `pwb`.`kombinasi3` end) AS `kombinasi3`,(case when isnull(`mw7`.`nama`) then '' else `mw7`.`nama` end) AS `nama_kombinasi3`,(case when isnull(`mw7`.`inisial`) then '' else `mw7`.`inisial` end) AS `inisial_kombinasi3`,(case when (`pwb`.`kluwungan1` = 0) then '' else `pwb`.`kluwungan1` end) AS `kluwungan1`,(case when isnull(`mw8`.`nama`) then '' else `mw8`.`nama` end) AS `nama_kluwungan1`,(case when isnull(`mw8`.`inisial`) then '' else `mw8`.`inisial` end) AS `inisial_kluwungan1`,(case when (`pwb`.`kluwungan2` = 0) then '' else `pwb`.`kluwungan2` end) AS `kluwungan2`,(case when isnull(`mw9`.`nama`) then '' else `mw9`.`nama` end) AS `nama_kluwungan2`,(case when isnull(`mw9`.`inisial`) then '' else `mw9`.`inisial` end) AS `inisial_kluwungan2`,(case when (`pwb`.`kluwungan3` = 0) then '' else `pwb`.`kluwungan3` end) AS `kluwungan3`,(case when isnull(`mw10`.`nama`) then '' else `mw10`.`nama` end) AS `nama_kluwungan3`,(case when isnull(`mw10`.`inisial`) then '' else `mw10`.`inisial` end) AS `inisial_kluwungan3`,(case when (`pwb`.`kluwungan4` = 0) then '' else `pwb`.`kluwungan4` end) AS `kluwungan4`,(case when isnull(`mw11`.`nama`) then '' else `mw11`.`nama` end) AS `nama_kluwungan4`,(case when isnull(`mw11`.`inisial`) then '' else `mw11`.`inisial` end) AS `inisial_kluwungan4`,(case when (`pwb`.`timbulan1` = 0) then '' else `pwb`.`timbulan1` end) AS `timbulan1`,(case when isnull(`mw12`.`nama`) then '' else `mw12`.`nama` end) AS `nama_timbulan1`,(case when isnull(`mw12`.`inisial`) then '' else `mw12`.`inisial` end) AS `inisial_timbulan1`,(case when (`pwb`.`timbulan2` = 0) then '' else `pwb`.`timbulan2` end) AS `timbulan2`,(case when isnull(`mw13`.`nama`) then '' else `mw13`.`nama` end) AS `nama_timbulan2`,(case when isnull(`mw13`.`inisial`) then '' else `mw13`.`inisial` end) AS `inisial_timbulan2`,(case when (`pwb`.`timbulan3` = 0) then '' else `pwb`.`timbulan3` end) AS `timbulan3`,(case when isnull(`mw14`.`nama`) then '' else `mw14`.`nama` end) AS `nama_timbulan3`,(case when isnull(`mw14`.`inisial`) then '' else `mw14`.`inisial` end) AS `inisial_timbulan3`,(case when (`pwb`.`timbulan4` = 0) then '' else `pwb`.`timbulan4` end) AS `timbulan4`,(case when isnull(`mw47`.`nama`) then '' else `mw47`.`nama` end) AS `nama_timbulan4`,(case when isnull(`mw47`.`inisial`) then '' else `mw47`.`inisial` end) AS `inisial_timbulan4`,(case when (`pwb`.`songketan1` = 0) then '' else `pwb`.`songketan1` end) AS `songketan1`,(case when isnull(`mw15`.`nama`) then '' else `mw15`.`nama` end) AS `nama_songketan1`,(case when isnull(`mw15`.`inisial`) then '' else `mw15`.`inisial` end) AS `inisial_songketan1`,(case when (`pwb`.`songketan2` = 0) then '' else `pwb`.`songketan2` end) AS `songketan2`,(case when isnull(`mw16`.`nama`) then '' else `mw16`.`nama` end) AS `nama_songketan2`,(case when isnull(`mw16`.`inisial`) then '' else `mw16`.`inisial` end) AS `inisial_songketan2`,(case when (`pwb`.`songketan3` = 0) then '' else `pwb`.`songketan3` end) AS `songketan3`,(case when isnull(`mw17`.`nama`) then '' else `mw17`.`nama` end) AS `nama_songketan3`,(case when isnull(`mw17`.`inisial`) then '' else `mw17`.`inisial` end) AS `inisial_songketan3`,(case when (`pwb`.`songketan4` = 0) then '' else `pwb`.`songketan4` end) AS `songketan4`,(case when isnull(`mw18`.`nama`) then '' else `mw18`.`nama` end) AS `nama_songketan4`,(case when isnull(`mw18`.`inisial`) then '' else `mw18`.`inisial` end) AS `inisial_songketan4`,(case when (`pwb`.`pancingan1` = 0) then '' else `pwb`.`pancingan1` end) AS `pancingan1`,(case when isnull(`mw19`.`nama`) then '' else `mw19`.`nama` end) AS `nama_pancingan1`,(case when isnull(`mw19`.`inisial`) then '' else `mw19`.`inisial` end) AS `inisial_pancingan1`,(case when (`pwb`.`pancingan2` = 0) then '' else `pwb`.`pancingan2` end) AS `pancingan2`,(case when isnull(`mw20`.`nama`) then '' else `mw20`.`nama` end) AS `nama_pancingan2`,(case when isnull(`mw20`.`inisial`) then '' else `mw20`.`inisial` end) AS `inisial_pancingan2`,(case when (`pwb`.`gunungan1_atas` = 0) then '' else `pwb`.`gunungan1_atas` end) AS `gunungan1_atas`,(case when isnull(`mw21`.`nama`) then '' else `mw21`.`nama` end) AS `nama_gunungan1_atas`,(case when isnull(`mw21`.`inisial`) then '' else `mw21`.`inisial` end) AS `inisial_gunungan1_atas`,(case when (`pwb`.`gunungan2_atas` = 0) then '' else `pwb`.`gunungan2_atas` end) AS `gunungan2_atas`,(case when isnull(`mw22`.`nama`) then '' else `mw22`.`nama` end) AS `nama_gunungan2_atas`,(case when isnull(`mw22`.`inisial`) then '' else `mw22`.`inisial` end) AS `inisial_gunungan2_atas`,(case when (`pwb`.`gunungan3_atas` = 0) then '' else `pwb`.`gunungan3_atas` end) AS `gunungan3_atas`,(case when isnull(`mw23`.`nama`) then '' else `mw23`.`nama` end) AS `nama_gunungan3_atas`,(case when isnull(`mw23`.`inisial`) then '' else `mw23`.`inisial` end) AS `inisial_gunungan3_atas`,(case when (`pwb`.`gunungan1_bawah` = 0) then '' else `pwb`.`gunungan1_bawah` end) AS `gunungan1_bawah`,(case when isnull(`mw24`.`nama`) then '' else `mw24`.`nama` end) AS `nama_gunungan1_bawah`,(case when isnull(`mw24`.`inisial`) then '' else `mw24`.`inisial` end) AS `inisial_gunungan1_bawah`,(case when (`pwb`.`gunungan2_bawah` = 0) then '' else `pwb`.`gunungan2_bawah` end) AS `gunungan2_bawah`,(case when isnull(`mw25`.`nama`) then '' else `mw25`.`nama` end) AS `nama_gunungan2_bawah`,(case when isnull(`mw25`.`inisial`) then '' else `mw25`.`inisial` end) AS `inisial_gunungan2_bawah`,(case when (`pwb`.`gunungan3_bawah` = 0) then '' else `pwb`.`gunungan3_bawah` end) AS `gunungan3_bawah`,(case when isnull(`mw26`.`nama`) then '' else `mw26`.`nama` end) AS `nama_gunungan3_bawah`,(case when isnull(`mw26`.`inisial`) then '' else `mw26`.`inisial` end) AS `inisial_gunungan3_bawah`,(case when (`pwb`.`garis1` = 0) then '' else `pwb`.`garis1` end) AS `garis1`,(case when isnull(`mw27`.`nama`) then '' else `mw27`.`nama` end) AS `nama_garis1`,(case when isnull(`mw27`.`inisial`) then '' else `mw27`.`inisial` end) AS `inisial_garis1`,(case when (`pwb`.`garis2` = 0) then '' else `pwb`.`garis2` end) AS `garis2`,(case when isnull(`mw28`.`nama`) then '' else `mw28`.`nama` end) AS `nama_garis2`,(case when isnull(`mw28`.`inisial`) then '' else `mw28`.`inisial` end) AS `inisial_garis2`,(case when (`pwb`.`dasar4` = 0) then '' else `pwb`.`dasar4` end) AS `dasar4`,(case when isnull(`mw29`.`nama`) then '' else `mw29`.`nama` end) AS `nama_dasar4`,(case when isnull(`mw29`.`inisial`) then '' else `mw29`.`inisial` end) AS `inisial_dasar4`,(case when (`pwb`.`dasar5` = 0) then '' else `pwb`.`dasar5` end) AS `dasar5`,(case when isnull(`mw30`.`nama`) then '' else `mw30`.`nama` end) AS `nama_dasar5`,(case when isnull(`mw30`.`inisial`) then '' else `mw30`.`inisial` end) AS `inisial_dasar5`,(case when (`pwb`.`dasar6` = 0) then '' else `pwb`.`dasar6` end) AS `dasar6`,(case when isnull(`mw31`.`nama`) then '' else `mw31`.`nama` end) AS `nama_dasar6`,(case when isnull(`mw31`.`inisial`) then '' else `mw31`.`inisial` end) AS `inisial_dasar6`,(case when (`pwb`.`dasar7` = 0) then '' else `pwb`.`dasar7` end) AS `dasar7`,(case when isnull(`mw32`.`nama`) then '' else `mw32`.`nama` end) AS `nama_dasar7`,(case when isnull(`mw32`.`inisial`) then '' else `mw32`.`inisial` end) AS `inisial_dasar7`,(case when (`pwb`.`dasar8` = 0) then '' else `pwb`.`dasar8` end) AS `dasar8`,(case when isnull(`mw33`.`nama`) then '' else `mw33`.`nama` end) AS `nama_dasar8`,(case when isnull(`mw33`.`inisial`) then '' else `mw33`.`inisial` end) AS `inisial_dasar8`,(case when (`pwb`.`dasar9` = 0) then '' else `pwb`.`dasar9` end) AS `dasar9`,(case when isnull(`mw34`.`nama`) then '' else `mw34`.`nama` end) AS `nama_dasar9`,(case when isnull(`mw34`.`inisial`) then '' else `mw34`.`inisial` end) AS `inisial_dasar9`,(case when (`pwb`.`dasar10` = 0) then '' else `pwb`.`dasar10` end) AS `dasar10`,(case when isnull(`mw35`.`nama`) then '' else `mw35`.`nama` end) AS `nama_dasar10`,(case when isnull(`mw35`.`inisial`) then '' else `mw35`.`inisial` end) AS `inisial_dasar10`,(case when (`pwb`.`songketan5` = 0) then '' else `pwb`.`songketan5` end) AS `songketan5`,(case when isnull(`mw36`.`nama`) then '' else `mw36`.`nama` end) AS `nama_songketan5`,(case when isnull(`mw36`.`inisial`) then '' else `mw36`.`inisial` end) AS `inisial_songketan5`,(case when (`pwb`.`songketan6` = 0) then '' else `pwb`.`songketan6` end) AS `songketan6`,(case when isnull(`mw37`.`nama`) then '' else `mw37`.`nama` end) AS `nama_songketan6`,(case when isnull(`mw37`.`inisial`) then '' else `mw37`.`inisial` end) AS `inisial_songketan6`,(case when (`pwb`.`songketan7` = 0) then '' else `pwb`.`songketan7` end) AS `songketan7`,(case when isnull(`mw38`.`nama`) then '' else `mw38`.`nama` end) AS `nama_songketan7`,(case when isnull(`mw38`.`inisial`) then '' else `mw38`.`inisial` end) AS `inisial_songketan7`,(case when (`pwb`.`songketan8` = 0) then '' else `pwb`.`songketan8` end) AS `songketan8`,(case when isnull(`mw39`.`nama`) then '' else `mw39`.`nama` end) AS `nama_songketan8`,(case when isnull(`mw39`.`inisial`) then '' else `mw39`.`inisial` end) AS `inisial_songketan8`,(case when (`pwb`.`songketan9` = 0) then '' else `pwb`.`songketan9` end) AS `songketan9`,(case when isnull(`mw40`.`nama`) then '' else `mw40`.`nama` end) AS `nama_songketan9`,(case when isnull(`mw40`.`inisial`) then '' else `mw40`.`inisial` end) AS `inisial_songketan9`,(case when (`pwb`.`songketan10` = 0) then '' else `pwb`.`songketan10` end) AS `songketan10`,(case when isnull(`mw41`.`nama`) then '' else `mw41`.`nama` end) AS `nama_songketan10`,(case when isnull(`mw41`.`inisial`) then '' else `mw41`.`inisial` end) AS `inisial_songketan10`,(case when (`pwb`.`songketan11` = 0) then '' else `pwb`.`songketan11` end) AS `songketan11`,(case when isnull(`mw42`.`nama`) then '' else `mw42`.`nama` end) AS `nama_songketan11`,(case when isnull(`mw42`.`inisial`) then '' else `mw42`.`inisial` end) AS `inisial_songketan11`,(case when (`pwb`.`songketan12` = 0) then '' else `pwb`.`songketan12` end) AS `songketan12`,(case when isnull(`mw43`.`nama`) then '' else `mw43`.`nama` end) AS `nama_songketan12`,(case when isnull(`mw43`.`inisial`) then '' else `mw43`.`inisial` end) AS `inisial_songketan12`,(case when (`pwb`.`songketan13` = 0) then '' else `pwb`.`songketan13` end) AS `songketan13`,(case when isnull(`mw44`.`nama`) then '' else `mw44`.`nama` end) AS `nama_songketan13`,(case when isnull(`mw44`.`inisial`) then '' else `mw44`.`inisial` end) AS `inisial_songketan13`,(case when (`pwb`.`songketan14` = 0) then '' else `pwb`.`songketan14` end) AS `songketan14`,(case when isnull(`mw45`.`nama`) then '' else `mw45`.`nama` end) AS `nama_songketan14`,(case when isnull(`mw45`.`inisial`) then '' else `mw45`.`inisial` end) AS `inisial_songketan14`,(case when (`pwb`.`songketan15` = 0) then '' else `pwb`.`songketan15` end) AS `songketan15`,(case when isnull(`mw46`.`nama`) then '' else `mw46`.`nama` end) AS `nama_songketan15`,(case when isnull(`mw46`.`inisial`) then '' else `mw46`.`inisial` end) AS `inisial_songketan15` from ((((((((((((((((((((((((((((((((((((((((((((((((`pem_workorder_barang` `pwb` left join `ms_warnakomposisi` `mw` on((`pwb`.`dasar` = `mw`.`id_komposisi`))) left join `ms_warnakomposisi` `mw2` on((`pwb`.`dasar2` = `mw2`.`id_komposisi`))) left join `ms_warnakomposisi` `mw3` on((`pwb`.`dasar3` = `mw3`.`id_komposisi`))) left join `ms_warnakomposisi` `mw4` on((`pwb`.`streep` = `mw4`.`id_komposisi`))) left join `ms_warnakomposisi` `mw5` on((`pwb`.`kombinasi1` = `mw5`.`id_komposisi`))) left join `ms_warnakomposisi` `mw6` on((`pwb`.`kombinasi2` = `mw6`.`id_komposisi`))) left join `ms_warnakomposisi` `mw7` on((`pwb`.`kombinasi3` = `mw7`.`id_komposisi`))) left join `ms_warnakomposisi` `mw8` on((`pwb`.`kluwungan1` = `mw8`.`id_komposisi`))) left join `ms_warnakomposisi` `mw9` on((`pwb`.`kluwungan2` = `mw9`.`id_komposisi`))) left join `ms_warnakomposisi` `mw10` on((`pwb`.`kluwungan3` = `mw10`.`id_komposisi`))) left join `ms_warnakomposisi` `mw11` on((`pwb`.`kluwungan4` = `mw11`.`id_komposisi`))) left join `ms_warnakomposisi` `mw12` on((`pwb`.`timbulan1` = `mw12`.`id_komposisi`))) left join `ms_warnakomposisi` `mw13` on((`pwb`.`timbulan2` = `mw13`.`id_komposisi`))) left join `ms_warnakomposisi` `mw14` on((`pwb`.`timbulan3` = `mw14`.`id_komposisi`))) left join `ms_warnakomposisi` `mw47` on((`pwb`.`timbulan4` = `mw47`.`id_komposisi`))) left join `ms_warnakomposisi` `mw15` on((`pwb`.`songketan1` = `mw15`.`id_komposisi`))) left join `ms_warnakomposisi` `mw16` on((`pwb`.`songketan2` = `mw16`.`id_komposisi`))) left join `ms_warnakomposisi` `mw17` on((`pwb`.`songketan3` = `mw17`.`id_komposisi`))) left join `ms_warnakomposisi` `mw18` on((`pwb`.`songketan4` = `mw18`.`id_komposisi`))) left join `ms_warnakomposisi` `mw19` on((`pwb`.`pancingan1` = `mw19`.`id_komposisi`))) left join `ms_warnakomposisi` `mw20` on((`pwb`.`pancingan2` = `mw20`.`id_komposisi`))) left join `ms_warnakomposisi` `mw21` on((`pwb`.`gunungan1_atas` = `mw21`.`id_komposisi`))) left join `ms_warnakomposisi` `mw22` on((`pwb`.`gunungan2_atas` = `mw22`.`id_komposisi`))) left join `ms_warnakomposisi` `mw23` on((`pwb`.`gunungan3_atas` = `mw23`.`id_komposisi`))) left join `ms_warnakomposisi` `mw24` on((`pwb`.`gunungan1_bawah` = `mw24`.`id_komposisi`))) left join `ms_warnakomposisi` `mw25` on((`pwb`.`gunungan2_bawah` = `mw25`.`id_komposisi`))) left join `ms_warnakomposisi` `mw26` on((`pwb`.`gunungan3_bawah` = `mw26`.`id_komposisi`))) left join `ms_warnakomposisi` `mw27` on((`pwb`.`garis1` = `mw27`.`id_komposisi`))) left join `ms_warnakomposisi` `mw28` on((`pwb`.`garis2` = `mw28`.`id_komposisi`))) left join `ms_warnakomposisi` `mw29` on((`pwb`.`dasar4` = `mw29`.`id_komposisi`))) left join `ms_warnakomposisi` `mw30` on((`pwb`.`dasar5` = `mw30`.`id_komposisi`))) left join `ms_warnakomposisi` `mw31` on((`pwb`.`dasar6` = `mw31`.`id_komposisi`))) left join `ms_warnakomposisi` `mw32` on((`pwb`.`dasar7` = `mw32`.`id_komposisi`))) left join `ms_warnakomposisi` `mw33` on((`pwb`.`dasar8` = `mw33`.`id_komposisi`))) left join `ms_warnakomposisi` `mw34` on((`pwb`.`dasar9` = `mw34`.`id_komposisi`))) left join `ms_warnakomposisi` `mw35` on((`pwb`.`dasar10` = `mw35`.`id_komposisi`))) left join `ms_warnakomposisi` `mw36` on((`pwb`.`songketan5` = `mw36`.`id_komposisi`))) left join `ms_warnakomposisi` `mw37` on((`pwb`.`songketan6` = `mw37`.`id_komposisi`))) left join `ms_warnakomposisi` `mw38` on((`pwb`.`songketan7` = `mw38`.`id_komposisi`))) left join `ms_warnakomposisi` `mw39` on((`pwb`.`songketan8` = `mw39`.`id_komposisi`))) left join `ms_warnakomposisi` `mw40` on((`pwb`.`songketan9` = `mw40`.`id_komposisi`))) left join `ms_warnakomposisi` `mw41` on((`pwb`.`songketan10` = `mw41`.`id_komposisi`))) left join `ms_warnakomposisi` `mw42` on((`pwb`.`songketan11` = `mw42`.`id_komposisi`))) left join `ms_warnakomposisi` `mw43` on((`pwb`.`songketan12` = `mw43`.`id_komposisi`))) left join `ms_warnakomposisi` `mw44` on((`pwb`.`songketan13` = `mw44`.`id_komposisi`))) left join `ms_warnakomposisi` `mw45` on((`pwb`.`songketan14` = `mw45`.`id_komposisi`))) left join `ms_warnakomposisi` `mw46` on((`pwb`.`songketan15` = `mw46`.`id_komposisi`))) join `ms_motif` `mf` on((`pwb`.`motif` = `mf`.`id_motif`)));

-- membuang struktur untuk view si_sarung.view_edit_workorder_ket
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_edit_workorder_ket`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_edit_workorder_ket` AS select `pwk`.`id_workorder_ket` AS `id_workorder_ket`,`pwk`.`id_workorder` AS `id_workorder`,`pwk`.`keterangan` AS `keterangan`,`pwk`.`id_barang` AS `id_barang`,`pwk`.`jumlah` AS `jumlah`,`pwk`.`jumlah_konversi` AS `jumlah_konversi`,`pwk`.`satuan_jumlah` AS `satuan_jumlah`,`pwk`.`satuan_jumlah_konversi` AS `satuan_jumlah_konversi`,`mf`.`motif_keterangan` AS `nama_keterangan`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`ms`.`nama_satuan` AS `nama_satuan_jumlah`,`ms2`.`nama_satuan` AS `nama_satuan_konversi` from ((((`pem_workorder_ket` `pwk` join `ms_motif_barang` `mf` on((`pwk`.`keterangan` = `mf`.`id_motif_barang`))) join `ms_barang` `mb` on((`pwk`.`id_barang` = `mb`.`id`))) left join `ms_satuan` `ms` on((`pwk`.`satuan_jumlah` = `ms`.`id_satuan`))) left join `ms_satuan` `ms2` on((`pwk`.`satuan_jumlah_konversi` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_hargabarang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_hargabarang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_hargabarang` AS select `mh`.`id` AS `id_harga`,`mh`.`tanggal` AS `tanggal`,(case when isnull(`mb`.`id`) then '' else `mb`.`id` end) AS `id_barang`,(case when isnull(`mb`.`id`) then '' else `mb`.`nama_barang` end) AS `nama_barang`,(case when isnull(`mp`.`id_proses`) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`id_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`nama` end) AS `nama_komposisi`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`inisial` end) AS `inisial_komposisi`,`mlp`.`id_lokasi` AS `id_lokasi`,`mlp`.`nama_lokasi` AS `nama_lokasi`,`mh`.`jenis` AS `jenis`,`mh`.`harga` AS `harga` from (((((((`ms_hargabarang` `mh` left join `ms_proses` `mp` on((`mh`.`id_proses` = `mp`.`id_proses`))) left join `ms_barang` `mb` on((`mh`.`id_barang` = `mb`.`id`))) left join `ms_motif` `mm` on((`mh`.`id_motif` = `mm`.`id_motif`))) left join `ms_motif_barang` `mmb` on((`mh`.`id_corak` = `mmb`.`id_motif_barang`))) left join `ms_satuan` `ms` on((`mh`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_lokasi_produksi` `mlp` on((`mh`.`id_lokasi` = `mlp`.`id_lokasi`))) left join `ms_warnakomposisi` `mw` on((`mh`.`id_warna` = `mw`.`id_komposisi`)));

-- membuang struktur untuk view si_sarung.view_hutang_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_hutang_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_hutang_bayar` AS select `pp`.`id_hutang` AS `id_hutang`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`id_penyedia` AS `id_penyedia`,`pp`.`id_transaksi` AS `id_transaksi`,`pp`.`id_carabayar` AS `id_carabayar`,`pp`.`pajak` AS `pajak`,`pp`.`nominal_total` AS `nominal_total`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`nominal_pajak` AS `nominal_pajak`,`pp`.`nominal_ongkir` AS `nominal_ongkir`,`pp`.`nominal_netto` AS `nominal_netto`,`pp`.`nominal_bayar` AS `nominal_bayar`,(`pp`.`nominal_bayar` + sum(ifnull(`ppb`.`jum_bayar`,0))) AS `total_bayar`,`pp`.`status` AS `status`,`pp`.`keterangan` AS `keterangan`,`pp`.`created_at` AS `created_at`,`pp`.`update_at` AS `update_at`,`mp`.`nama` AS `nama_penyedia`,`mp`.`pic` AS `pic`,`mt`.`nama_transaksi` AS `nama_transaksi`,`mt`.`tipe` AS `tipe_transaksi`,`mc`.`cara` AS `cara_bayar`,`mc`.`jenis_bayar` AS `jenis_bayar`,`mc`.`tipe` AS `tipe_bayar`,`ma`.`nama_perkiraan` AS `nama_perkiraan`,`ma`.`kode_perkiraan` AS `kode_perkiraan` from (((((`keu_hutang` `pp` left join `keu_hutang_bayar` `ppb` on((`pp`.`id_hutang` = `ppb`.`id_hutang`))) join `ms_penyedia` `mp` on((`pp`.`id_penyedia` = `mp`.`id_penyedia`))) join `ms_transaksi` `mt` on((`pp`.`id_transaksi` = `mt`.`id_transaksi`))) join `ms_carabayar` `mc` on((`pp`.`id_carabayar` = `mc`.`id_carabayar`))) left join `ms_perkiraan` `ma` on((`mc`.`kode_perkiraan` = `ma`.`id`))) group by `pp`.`id_hutang`;

-- membuang struktur untuk view si_sarung.view_inv_saldoawal
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_inv_saldoawal`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_inv_saldoawal` AS select `view_inv_saldoawal_sub`.`id` AS `id`,`view_inv_saldoawal_sub`.`id_barang` AS `id_barang`,`view_inv_saldoawal_sub`.`kode_barang` AS `kode_barang`,`view_inv_saldoawal_sub`.`nama_barang` AS `nama_barang`,`view_inv_saldoawal_sub`.`jumlah_saldoawal` AS `jumlah`,`view_inv_saldoawal_sub`.`jumlah_saldoawal` AS `masuk`,0 AS `keluar`,`view_inv_saldoawal_sub`.`id_gudang` AS `id_gudang`,`view_inv_saldoawal_sub`.`nama_gudang` AS `nama_gudang`,`view_inv_saldoawal_sub`.`tanggal` AS `tanggal`,`view_inv_saldoawal_sub`.`id_proses` AS `id_proses`,`view_inv_saldoawal_sub`.`nama_proses` AS `nama_proses`,`view_inv_saldoawal_sub`.`id_komposisi` AS `id_komposisi`,`view_inv_saldoawal_sub`.`nama_komposisi` AS `nama_komposisi`,`view_inv_saldoawal_sub`.`id_satuan` AS `id_satuan`,`view_inv_saldoawal_sub`.`nama_satuan` AS `nama_satuan`,`view_inv_saldoawal_sub`.`id_corak` AS `id_corak`,`view_inv_saldoawal_sub`.`nama_corak` AS `nama_corak`,`view_inv_saldoawal_sub`.`id_motif` AS `id_motif`,`view_inv_saldoawal_sub`.`nama_motif` AS `nama_motif`,`view_inv_saldoawal_sub`.`id_workorder` AS `id_workorder`,`view_inv_saldoawal_sub`.`no_workorder` AS `no_workorder`,`view_inv_saldoawal_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_inv_saldoawal_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_inv_saldoawal_sub`.`id_kualitas` AS `id_kualitas`,`view_inv_saldoawal_sub`.`nama_kualitas` AS `nama_kualitas`,`view_inv_saldoawal_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_inv_saldoawal_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_inv_saldoawal_sub`.`id_label` AS `id_label`,`view_inv_saldoawal_sub`.`nama_label` AS `nama_label`,`view_inv_saldoawal_sub`.`id_kemasan` AS `id_kemasan`,`view_inv_saldoawal_sub`.`nama_kemasan` AS `nama_kemasan`,`view_inv_saldoawal_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_inv_saldoawal_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_inv_saldoawal_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_inv_saldoawal_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_inv_saldoawal_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_inv_saldoawal_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_inv_saldoawal_sub`.`id_cap` AS `id_cap`,`view_inv_saldoawal_sub`.`nama_cap` AS `nama_cap`,`view_inv_saldoawal_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_inv_saldoawal_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_inv_saldoawal_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_inv_saldoawal_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_inv_saldoawal_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_inv_saldoawal_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_inv_saldoawal_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_inv_saldoawal_sub`.`tanggal_full` AS `tanggal_full` from `view_inv_saldoawal_sub`;

-- membuang struktur untuk view si_sarung.view_inv_saldoawal_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_inv_saldoawal_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_inv_saldoawal_sub` AS select `ins`.`id` AS `id`,`ins`.`id_barang` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`ins`.`jumlah_saldoawal` AS `jumlah_saldoawal`,`ins`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`ins`.`tanggal` AS `tanggal`,`ins`.`keterangan` AS `keterangan`,(case when (`ins`.`id_proses` = 0) then '' else `ins`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mw`.`nama`) then '' else `mw`.`nama` end) AS `nama_komposisi`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`nama_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when isnull(`pw`.`id_workorder`) then '' else `pw`.`id_workorder` end) AS `id_workorder`,(case when isnull(`pw`.`id_workorder`) then '' else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`ins`.`id_kualitas` = 0) then '' else `ins`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`ins`.`id_kualitas_dudul` = 0) then '' else `ins`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`ins`.`id_kualitas_dudul` = 0) then '' when (`ins`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`ins`.`id_label` = 0) then '' else `ins`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`ins`.`id_kemasan` = 0) then '' else `ins`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`ins`.`id_kemasansatuan` = 0) then '' else `ins`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`ins`.`id_kemasansepuluh` = 0) then '' else `ins`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`ins`.`id_kemasanseratus` = 0) then '' else `ins`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`ins`.`id_cap` = 0) then '' else `ins`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`ins`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`ins`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`ins`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`ins`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`nama_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (`ins`.`jumlah_rencana` = 0) then '' else (`ins`.`jumlah_rencana` / `ins`.`jumlah_saldoawal`) end) AS `jumlah_rencana`,`ins`.`tanggal_full` AS `tanggal_full` from (((((((((((((((((((`inv_saldoawal` `ins` join `ms_barang` `mb` on((`ins`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`ins`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `ins`.`id_proses`))) left join `ms_warnakomposisi` `mw` on((`ins`.`id_komposisi` = `mw`.`id_komposisi`))) left join `ms_satuan` `ms` on((`ins`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_satuan` `ms2` on((`ins`.`id_perubahansatuan` = `ms2`.`id_satuan`))) left join `ms_motif` `mm` on((`ins`.`id_motif` = `mm`.`id_motif`))) left join `ms_motif_barang` `mmb` on((`ins`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_kualitas` `mk` on((`ins`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`ins`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`ins`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`ins`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`ins`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`ins`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`ins`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`ins`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`ins`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `pem_workorder` `pw` on((`ins`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`ins`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)));

-- membuang struktur untuk view si_sarung.view_jurnal_peny_piutang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_jurnal_peny_piutang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_jurnal_peny_piutang` AS select `jph`.`id` AS `id_jph`,`jph`.`id_penjualan` AS `id_penjualan`,`vp`.`id_pelanggan` AS `id_pelanggan`,`vp`.`no_faktur` AS `no_faktur`,`vp`.`sufix_no_faktur` AS `sufix_no_faktur`,`jph`.`nomor_jurnal` AS `nomor_jurnal`,`jph`.`tanggal_jurnal` AS `tanggal_jurnal`,`jph`.`keterangan` AS `keterangan`,`jpd`.`id_akun` AS `id_akun`,`jpd`.`tipe_akun` AS `tipe_akun`,`jpd`.`nominal` AS `nominal` from ((`jurnal_piutang_header` `jph` join `jurnal_piutang_detail` `jpd` on((`jpd`.`id_jph` = `jph`.`id`))) join `view_penjualan2` `vp` on((`vp`.`id_penjualan` = `jph`.`id_penjualan`)));

-- membuang struktur untuk view si_sarung.view_jurnal_peny_sewa
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_jurnal_peny_sewa`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_jurnal_peny_sewa` AS select `jsh`.`id` AS `id_jsh`,`jsh`.`id_sewa` AS `id_sewa`,`vsb`.`id_penyedia` AS `id_penyedia`,`vsb`.`no_faktur` AS `no_faktur`,`jsh`.`nomor_jurnal` AS `nomor_jurnal`,`jsh`.`tanggal_jurnal` AS `tanggal_jurnal`,`jsh`.`keterangan` AS `keterangan`,`vsb`.`id_akun_sewa` AS `id_akun_sewa`,`jsd`.`id_akun` AS `id_akun`,`jsd`.`tipe_akun` AS `tipe_akun`,`jsd`.`nominal` AS `nominal` from ((`jurnal_penyesuaian_sewa_header` `jsh` join `jurnal_penyesuaian_sewa_detail` `jsd` on((`jsd`.`id_jsh` = `jsh`.`id`))) join `view_sewa_bayar` `vsb` on((`vsb`.`id_sewa` = `jsh`.`id_sewa`)));

-- membuang struktur untuk view si_sarung.view_kasbon_pegawai_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_kasbon_pegawai_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_kasbon_pegawai_bayar` AS select `pp`.`id` AS `id`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`id_pegawai` AS `id_pegawai`,`pp`.`nomor_transaksi` AS `nomor_transaksi`,`pp`.`tanggal_transaksi` AS `tanggal_transaksi`,`pp`.`dari_akun` AS `dari_akun`,`pp`.`tipe_dari_akun` AS `tipe_dari_akun`,`pp`.`nominal` AS `nominal`,`pp`.`keterangan` AS `keterangan`,`pp`.`tipe_id_akun_piutang` AS `tipe_id_akun_piutang`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,sum(ifnull(`ppb`.`jum_bayar`,0)) AS `total_bayar`,`mp`.`nomor_pegawai` AS `nomor_pegawai`,`mp`.`nama_pegawai` AS `nama_pegawai`,`md`.`id_departement` AS `id_departement`,`md`.`nama` AS `departement` from (((`keu_kasbon_pegawai` `pp` left join `keu_kasbon_pegawai_bayar` `ppb` on((`pp`.`id` = `ppb`.`id_kasbon_pegawai`))) join `ms_pegawai` `mp` on((`mp`.`id_pegawai` = `pp`.`id_pegawai`))) join `ms_departement` `md` on((`md`.`id_departement` = `mp`.`id_departement`))) group by `pp`.`id`;

-- membuang struktur untuk view si_sarung.view_kasbon_rekanan_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_kasbon_rekanan_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_kasbon_rekanan_bayar` AS select `pp`.`id` AS `id`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`id_rekanan` AS `id_rekanan`,`pp`.`nomor_transaksi` AS `nomor_transaksi`,`pp`.`tanggal_transaksi` AS `tanggal_transaksi`,`pp`.`dari_akun` AS `dari_akun`,`pp`.`tipe_dari_akun` AS `tipe_dari_akun`,`pp`.`nominal` AS `nominal`,`pp`.`keterangan` AS `keterangan`,`pp`.`tipe_id_akun_piutang` AS `tipe_id_akun_piutang`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,sum(ifnull(`ppb`.`jum_bayar`,0)) AS `total_bayar`,`mp`.`nama` AS `nama_rekanan`,`mp`.`keterangan` AS `keterangan_rekanan` from ((`keu_kasbon_rekanan` `pp` left join `keu_kasbon_rekanan_bayar` `ppb` on((`pp`.`id` = `ppb`.`id_kasbon_rekanan`))) join `view_ms_makelar` `mp` on(((`mp`.`id_rekanan` = `pp`.`id_rekanan`) and (`mp`.`id_kelompok` = `pp`.`id_kelompok`)))) group by `pp`.`id`;

-- membuang struktur untuk view si_sarung.view_keluar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_keluar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_keluar` AS select `view_keluar_sub`.`id` AS `id`,`view_keluar_sub`.`id_barang` AS `id_barang`,`view_keluar_sub`.`kode_barang` AS `kode_barang`,`view_keluar_sub`.`nama_barang` AS `nama_barang`,(`view_keluar_sub`.`jumlah` * (`view_keluar_sub`.`nilai_akhir` / `view_keluar_sub`.`nilai_awal`)) AS `jumlah`,0 AS `masuk`,(`view_keluar_sub`.`keluar` * (`view_keluar_sub`.`nilai_akhir` / `view_keluar_sub`.`nilai_awal`)) AS `keluar`,`view_keluar_sub`.`id_gudang` AS `id_gudang`,`view_keluar_sub`.`nama_gudang` AS `nama_gudang`,`view_keluar_sub`.`tanggal` AS `tanggal`,`view_keluar_sub`.`id_proses` AS `id_proses`,`view_keluar_sub`.`nama_proses` AS `nama_proses`,`view_keluar_sub`.`id_komposisi` AS `id_komposisi`,`view_keluar_sub`.`nama_komposisi` AS `nama_komposisi`,`view_keluar_sub`.`id_satuan` AS `id_satuan`,`view_keluar_sub`.`nama_satuan` AS `nama_satuan`,`view_keluar_sub`.`id_corak` AS `id_corak`,`view_keluar_sub`.`nama_corak` AS `nama_corak`,`view_keluar_sub`.`id_motif` AS `id_motif`,`view_keluar_sub`.`nama_motif` AS `nama_motif`,`view_keluar_sub`.`id_workorder` AS `id_workorder`,`view_keluar_sub`.`no_workorder` AS `no_workorder`,`view_keluar_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_keluar_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_keluar_sub`.`id_kualitas` AS `id_kualitas`,`view_keluar_sub`.`nama_kualitas` AS `nama_kualitas`,`view_keluar_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_keluar_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_keluar_sub`.`id_label` AS `id_label`,`view_keluar_sub`.`nama_label` AS `nama_label`,`view_keluar_sub`.`id_kemasan` AS `id_kemasan`,`view_keluar_sub`.`nama_kemasan` AS `nama_kemasan`,`view_keluar_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_keluar_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_keluar_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_keluar_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_keluar_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_keluar_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_keluar_sub`.`id_cap` AS `id_cap`,`view_keluar_sub`.`nama_cap` AS `nama_cap`,`view_keluar_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_keluar_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_keluar_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_keluar_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_keluar_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_keluar_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_keluar_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_keluar_sub`.`tanggal_full` AS `tanggal_full` from `view_keluar_sub`;

-- membuang struktur untuk view si_sarung.view_keluarkemasan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_keluarkemasan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_keluarkemasan` AS select `view_keluarkemasan_sub`.`id` AS `id`,`view_keluarkemasan_sub`.`id_barang` AS `id_barang`,`view_keluarkemasan_sub`.`kode_barang` AS `kode_barang`,`view_keluarkemasan_sub`.`nama_barang` AS `nama_barang`,`view_keluarkemasan_sub`.`jum_barang` AS `jumlah`,0 AS `masuk`,`view_keluarkemasan_sub`.`keluar` AS `keluar`,`view_keluarkemasan_sub`.`id_gudang` AS `id_gudang`,`view_keluarkemasan_sub`.`nama_gudang` AS `nama_gudang`,`view_keluarkemasan_sub`.`tanggal` AS `tanggal`,`view_keluarkemasan_sub`.`id_proses` AS `id_proses`,`view_keluarkemasan_sub`.`nama_proses` AS `nama_proses`,`view_keluarkemasan_sub`.`id_komposisi` AS `id_komposisi`,`view_keluarkemasan_sub`.`nama_komposisi` AS `nama_komposisi`,`view_keluarkemasan_sub`.`id_satuan` AS `id_satuan`,`view_keluarkemasan_sub`.`nama_satuan` AS `nama_satuan`,`view_keluarkemasan_sub`.`id_corak` AS `id_corak`,`view_keluarkemasan_sub`.`nama_corak` AS `nama_corak`,`view_keluarkemasan_sub`.`id_motif` AS `id_motif`,`view_keluarkemasan_sub`.`nama_motif` AS `nama_motif`,`view_keluarkemasan_sub`.`id_workorder` AS `id_workorder`,`view_keluarkemasan_sub`.`no_workorder` AS `no_workorder`,`view_keluarkemasan_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_keluarkemasan_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_keluarkemasan_sub`.`id_kualitas` AS `id_kualitas`,`view_keluarkemasan_sub`.`nama_kualitas` AS `nama_kualitas`,`view_keluarkemasan_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_keluarkemasan_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_keluarkemasan_sub`.`id_label` AS `id_label`,`view_keluarkemasan_sub`.`nama_label` AS `nama_label`,`view_keluarkemasan_sub`.`id_kemasan` AS `id_kemasan`,`view_keluarkemasan_sub`.`nama_kemasan` AS `nama_kemasan`,`view_keluarkemasan_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_keluarkemasan_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_keluarkemasan_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_keluarkemasan_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_keluarkemasan_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_keluarkemasan_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_keluarkemasan_sub`.`id_cap` AS `id_cap`,`view_keluarkemasan_sub`.`nama_cap` AS `nama_cap`,`view_keluarkemasan_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_keluarkemasan_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_keluarkemasan_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_keluarkemasan_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_keluarkemasan_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_keluarkemasan_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_keluarkemasan_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_keluarkemasan_sub`.`tanggal_full` AS `tanggal_full` from `view_keluarkemasan_sub`;

-- membuang struktur untuk view si_sarung.view_keluarkemasan_all
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_keluarkemasan_all`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_keluarkemasan_all` AS select `pb`.`id_barangkeluar_kemasan` AS `id`,`pbr`.`id_barangkeluar_kb` AS `id_detail`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbr`.`jumlah` AS `jum_barang`,0 AS `masuk`,`pbr`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pb`.`tanggal` AS `tanggal`,(case when (`pbr`.`id_proses_sebelum` = 0) then '' else `pbr`.`id_proses_sebelum` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbr`.`id_kualitas` = 0) then '' else `pbr`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbr`.`id_kualitas_dudul` = 0) then '' else `pbr`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbr`.`id_kualitas_dudul` = 0) then '' when (`pbr`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbr`.`id_label` = 0) then '' else `pbr`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbr`.`id_kemasan` = 0) then '' else `pbr`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbr`.`id_kemasansatuan` = 0) then '' else `pbr`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbr`.`id_kemasansepuluh` = 0) then '' else `pbr`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbr`.`id_kemasanseratus` = 0) then '' else `pbr`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbr`.`id_cap` = 0) then '' else `pbr`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbr`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbr`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbr`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbr`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbr`.`jumlah_rencana`) or (`pbr`.`jumlah_rencana` = 0)) then '' else `pbr`.`jumlah_rencana` end) AS `jumlah_rencana`,`pb`.`tanggal_full` AS `tanggal_full`,(case when isnull(`mp2`.`id_proses`) then '' else `mp2`.`id_proses` end) AS `id_proses_sekarang`,(case when isnull(`mp2`.`nama_proses`) then '' else `mp2`.`nama_proses` end) AS `nama_proses_sekarang` from (((((((((((((((((((((`pro_barangkeluar_kemasan` `pb` join `pro_barangkeluar_kemasan_barang` `pbr` on((`pb`.`id_barangkeluar_kemasan` = `pbr`.`id_barangkeluar_kemasan`))) join `ms_barang` `mb` on((`pbr`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbr`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `pbr`.`id_proses_sebelum`))) left join `ms_warnakomposisi` `mwk` on((`pbr`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`pbr`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbr`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbr`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pbr`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pbr`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbr`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbr`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbr`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbr`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbr`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbr`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbr`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbr`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbr`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbr`.`id_perubahansatuan` = `ms2`.`id_satuan`))) left join `ms_proses` `mp2` on((`mp2`.`id_proses` = `pb`.`id_proses`)));

-- membuang struktur untuk view si_sarung.view_keluarkemasan_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_keluarkemasan_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_keluarkemasan_sub` AS select `pb`.`id_barangkeluar_kemasan` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbr`.`jumlah` AS `jum_barang`,0 AS `masuk`,`pbr`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pb`.`tanggal` AS `tanggal`,(case when (`pbr`.`id_proses_sebelum` = 0) then '' else `pbr`.`id_proses_sebelum` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbr`.`id_kualitas` = 0) then '' else `pbr`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbr`.`id_kualitas_dudul` = 0) then '' else `pbr`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbr`.`id_kualitas_dudul` = 0) then '' when (`pbr`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbr`.`id_label` = 0) then '' else `pbr`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbr`.`id_kemasan` = 0) then '' else `pbr`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbr`.`id_kemasansatuan` = 0) then '' else `pbr`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbr`.`id_kemasansepuluh` = 0) then '' else `pbr`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbr`.`id_kemasanseratus` = 0) then '' else `pbr`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbr`.`id_cap` = 0) then '' else `pbr`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbr`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbr`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbr`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbr`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbr`.`jumlah_rencana`) or (`pbr`.`jumlah_rencana` = 0)) then '' else `pbr`.`jumlah_rencana` end) AS `jumlah_rencana`,`pb`.`tanggal_full` AS `tanggal_full` from ((((((((((((((((((((`pro_barangkeluar_kemasan` `pb` join `pro_barangkeluar_kemasan_barang` `pbr` on((`pb`.`id_barangkeluar_kemasan` = `pbr`.`id_barangkeluar_kemasan`))) join `ms_barang` `mb` on((`pbr`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbr`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `pbr`.`id_proses_sebelum`))) left join `ms_warnakomposisi` `mwk` on((`pbr`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`pbr`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbr`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbr`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pbr`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pbr`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbr`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbr`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbr`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbr`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbr`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbr`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbr`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbr`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbr`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbr`.`id_perubahansatuan` = `ms2`.`id_satuan`))) where (`pb`.`status` <> 0);

-- membuang struktur untuk view si_sarung.view_keluar_all
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_keluar_all`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_keluar_all` AS select `pb`.`id_barangkeluar` AS `id`,`pbb`.`id` AS `id_detail`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbb`.`jumlah` AS `jumlah`,0 AS `masuk`,`pbb`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pb`.`tanggal` AS `tanggal`,(case when (`mp`.`parent` = 0) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when (`mp`.`parent` = 0) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when (`mp`.`parent` = 0) then '' else (case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) end) AS `id_komposisi`,(case when (`mp`.`parent` = 0) then '' else (case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbb`.`id_kualitas` = 0) then '' else `pbb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' else `pbb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' when (`pbb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbb`.`id_label` = 0) then '' else `pbb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbb`.`id_kemasan` = 0) then '' else `pbb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbb`.`id_kemasansatuan` = 0) then '' else `pbb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbb`.`id_kemasansepuluh` = 0) then '' else `pbb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbb`.`id_kemasanseratus` = 0) then '' else `pbb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbb`.`id_cap` = 0) then '' else `pbb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbb`.`jumlah_rencana`) or (`pbb`.`jumlah_rencana` = 0)) then '' else `pbb`.`jumlah_rencana` end) AS `jumlah_rencana`,`pb`.`id_proses` AS `id_proses_sekarang`,`mp2`.`nama_proses` AS `nama_proses_sekarang`,`pb`.`tanggal_full` AS `tanggal_full` from (((((((((((((((((((((`pro_barangkeluar` `pb` join `pro_barangkeluar_barang` `pbb` on((`pb`.`id_barangkeluar` = `pbb`.`id_barangkeluar`))) join `ms_barang` `mb` on((`pbb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbb`.`id_gudang` = `mg`.`id_gudang`))) join `ms_proses` `mp` on((`pbb`.`id_proses_sebelum` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pbb`.`warna` = `mwk`.`id_komposisi`))) join `ms_satuan` `ms` on((`pbb`.`satuan_jumlah` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) left join `ms_proses` `mp2` on((`mp2`.`id_proses` = `pb`.`id_proses`))) where (`pb`.`status` <> '0');

-- membuang struktur untuk view si_sarung.view_keluar_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_keluar_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_keluar_sub` AS select `pb`.`id_barangkeluar` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbb`.`jumlah` AS `jumlah`,0 AS `masuk`,`pbb`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pb`.`tanggal` AS `tanggal`,(case when (`mp`.`parent` = 0) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when (`mp`.`parent` = 0) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when (`mp`.`parent` = 0) then '' else (case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) end) AS `id_komposisi`,(case when (`mp`.`parent` = 0) then '' else (case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbb`.`id_kualitas` = 0) then '' else `pbb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' else `pbb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' when (`pbb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbb`.`id_label` = 0) then '' else `pbb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbb`.`id_kemasan` = 0) then '' else `pbb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbb`.`id_kemasansatuan` = 0) then '' else `pbb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbb`.`id_kemasansepuluh` = 0) then '' else `pbb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbb`.`id_kemasanseratus` = 0) then '' else `pbb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbb`.`id_cap` = 0) then '' else `pbb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbb`.`jumlah_rencana`) or (`pbb`.`jumlah_rencana` = 0)) then '' else `pbb`.`jumlah_rencana` end) AS `jumlah_rencana`,`pb`.`tanggal_full` AS `tanggal_full` from ((((((((((((((((((((`pro_barangkeluar` `pb` join `pro_barangkeluar_barang` `pbb` on((`pb`.`id_barangkeluar` = `pbb`.`id_barangkeluar`))) join `ms_barang` `mb` on((`pbb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbb`.`id_gudang` = `mg`.`id_gudang`))) join `ms_proses` `mp` on((`pbb`.`id_proses_sebelum` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pbb`.`warna` = `mwk`.`id_komposisi`))) join `ms_satuan` `ms` on((`pbb`.`satuan_jumlah` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) where (`pb`.`status` <> '0');

-- membuang struktur untuk view si_sarung.view_kembali
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_kembali`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_kembali` AS select `pk`.`id_kembali` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pkb`.`jumlah` AS `jumlah`,`pkb`.`jumlah` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pk`.`tanggal` AS `tanggal`,(case when isnull(`mp`.`id_proses`) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mp`.`id_proses`) then '' else (case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`id_komposisi` end) end) AS `id_komposisi`,(case when isnull(`mp`.`id_proses`) then '' else (case when isnull(`mw`.`nama`) then '' else `mw`.`nama` end) end) AS `nama_komposisi`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`nama_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when isnull(`mk2`.`id_kualitas`) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_dudul`,(case when isnull(`mk2`.`nama_kualitas`) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_dudul`,(case when isnull(`mb2`.`id`) then '' else `mb2`.`id` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when isnull(`mb3`.`id`) then '' else `mb3`.`id` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when isnull(`mb4`.`id`) then '' else `mb4`.`id` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when isnull(`mb5`.`id`) then '' else `mb5`.`id` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when isnull(`mb6`.`id`) then '' else `mb6`.`id` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when isnull(`mb7`.`id`) then '' else `mb7`.`id` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when isnull(`mk3`.`id_kualitas`) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_proses`,(case when isnull(`mk3`.`nama_kualitas`) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when isnull(`mk4`.`id_kualitas`) then '' else `mk4`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when isnull(`mk4`.`nama_kualitas`) then '' else `mk4`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`nama_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (`pkb`.`jumlah_rencana` = 0) then '' else `pkb`.`jumlah_rencana` end) AS `jumlah_rencana`,`pk`.`tanggal_full` AS `tanggal_full` from (((((((((((((((((((((((`pro_kembali` `pk` join `pro_kembali_barang` `pkb` on((`pk`.`id_kembali` = `pkb`.`id_kembali`))) left join `ms_barang` `mb` on((`pkb`.`id_barang` = `mb`.`id`))) left join `ms_gudang` `mg` on((`pkb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_satuan` `ms` on((`pkb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_proses` `mp` on((`pkb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mw` on((`pkb`.`id_komposisi` = `mw`.`id_komposisi`))) left join `ms_motif` `mm` on((`pkb`.`id_motif` = `mm`.`id_motif`))) left join `ms_motif_barang` `mmb` on((`pkb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_barang` `mb2` on((`pkb`.`id_label` = `mb2`.`id`))) left join `ms_kualitas` `mk` on((`pkb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_kualitas` `mk2` on((`pkb`.`id_kualitas_dudul` = `mk2`.`id_kualitas`))) left join `ms_barang` `mb3` on((`pkb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pkb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pkb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pkb`.`id_kemasanseratus` = `mb6`.`id`))) left join `pem_workorder` `pw` on((`pkb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pkb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_barang` `mb7` on((`pkb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk3` on((`pkb`.`id_kualitas_proses` = `mk3`.`id_kualitas`))) left join `ms_kualitas` `mk4` on((`pkb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pkb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) left join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) left join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`))) where (`pk`.`status` = 1);

-- membuang struktur untuk view si_sarung.view_kembali_all
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_kembali_all`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_kembali_all` AS select `pk`.`id_kembali` AS `id`,`pkb`.`id_barang` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,(case when (`pkb`.`id_satuanhasil` <> 0) then `pkb`.`hasil` else `pkb`.`jumlah` end) AS `jumlah`,(case when (`pkb`.`id_satuanhasil` <> 0) then `pkb`.`hasil` else `pkb`.`jumlah` end) AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pk`.`tanggal` AS `tanggal`,(case when isnull(`mp`.`id_proses`) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`id_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when ((`pkb`.`id_satuanhasil` <> 0) and (`ms3`.`id_satuan` is not null)) then `ms3`.`id_satuan` when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when ((`pkb`.`id_satuanhasil` <> 0) and (`ms3`.`id_satuan` is not null)) then `ms3`.`nama_satuan` when isnull(`ms`.`id_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when isnull(`pw`.`id_workorder`) then '' else `pw`.`id_workorder` end) AS `id_workorder`,(case when isnull(`pw`.`id_workorder`) then '' else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when isnull(`mk2`.`id_kualitas`) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_dudul`,(case when isnull(`mk2`.`id_kualitas`) then '' else `mk2`.`nama_kualitas` end) AS `kualitas_dudul`,(case when isnull(`mb2`.`id`) then '' else `mb2`.`id` end) AS `id_label`,(case when isnull(`mb2`.`id`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when isnull(`mb3`.`id`) then '' else `mb3`.`id` end) AS `id_kemasan`,(case when isnull(`mb3`.`id`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when isnull(`mb4`.`id`) then '' else `mb4`.`id` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`id`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when isnull(`mb5`.`id`) then '' else `mb5`.`id` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`id`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when isnull(`mb6`.`id`) then '' else `mb6`.`id` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`id`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when isnull(`mb7`.`id`) then '' else `mb7`.`id` end) AS `id_cap`,(case when isnull(`mb7`.`id`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when isnull(`mk3`.`id_kualitas`) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_proses`,(case when isnull(`mk3`.`id_kualitas`) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when isnull(`mk4`.`id_kualitas`) then '' else `mk4`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when isnull(`mk4`.`id_kualitas`) then '' else `mk4`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `is_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (`pkb`.`jumlah_rencana` = 0) then '' else `pkb`.`jumlah_rencana` end) AS `jumlah_rencana`,'' AS `ket_1`,'' AS `ket_2`,'Pengembalian Produksi' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,1 AS `nilai_awal`,1 AS `nilai_akhir`,`pkb`.`id_kembali_barang` AS `id_detail`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_warna`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`nama` end) AS `nama_warna`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`inisial` end) AS `inisial_warna`,'' AS `ket_proses`,(case when isnull(`pbk`.`id_proses`) then '' else `mp2`.`id_proses` end) AS `id_proses_sekarang`,(case when isnull(`pbk`.`id_proses`) then '' else `mp2`.`nama_proses` end) AS `nama_proses_sekarang`,`pk`.`tanggal_full` AS `tanggal_full`,(case when isnull(`mkb2`.`id_kb`) then '' else `mkb2`.`id_kb` end) AS `id_kategori`,(case when isnull(`mkb2`.`id_kb`) then '' else `mkb2`.`nama` end) AS `nama_kategori`,(case when isnull(`mkb`.`id_kb`) then '' else `mkb`.`id_kb` end) AS `id_subkategori`,(case when isnull(`mkb`.`id_kb`) then '' else `mkb`.`nama` end) AS `nama_subkategori`,(case when isnull(`mlp2`.`id_lokasi`) then `mlp`.`id_lokasi` else `mlp2`.`id_lokasi` end) AS `id_lokasi`,(case when isnull(`mlp2`.`id_lokasi`) then `mlp`.`nama_lokasi` else `mlp2`.`nama_lokasi` end) AS `nama_lokasi`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`id_pegawai` end) AS `id_pegawai`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`nama_pegawai` end) AS `nama_pegawai`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`id_rekanan` end) AS `id_rekanan`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`nama` end) AS `nama_rekanan`,(case when isnull(`mmes`.`id_mesin`) then '' else `mmes`.`id_mesin` end) AS `id_mesin`,(case when isnull(`mmes`.`id_mesin`) then '' else `mmes`.`nama` end) AS `nama_mesin` from (((((((((((((((((((((((((((((((`pro_kembali` `pk` join `pro_kembali_barang` `pkb` on((`pk`.`id_kembali` = `pkb`.`id_kembali`))) left join `ms_barang` `mb` on((`pkb`.`id_barang` = `mb`.`id`))) left join `ms_gudang` `mg` on((`pkb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`pkb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pkb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`pkb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pkb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pkb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pkb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pkb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`mk`.`id_kualitas` = `pkb`.`id_kualitas`))) left join `ms_kualitas` `mk2` on((`mk2`.`id_kualitas` = `pkb`.`id_kualitas_dudul`))) left join `ms_barang` `mb2` on((`mb2`.`id` = `pkb`.`id_label`))) left join `ms_barang` `mb3` on((`mb3`.`id` = `pkb`.`id_kemasan`))) left join `ms_barang` `mb4` on((`mb4`.`id` = `pkb`.`id_kemasansatuan`))) left join `ms_barang` `mb5` on((`mb5`.`id` = `pkb`.`id_kemasansepuluh`))) left join `ms_barang` `mb6` on((`mb6`.`id` = `pkb`.`id_kemasanseratus`))) left join `ms_barang` `mb7` on((`mb7`.`id` = `pkb`.`id_cap`))) left join `ms_kualitas` `mk3` on((`mk3`.`id_kualitas` = `pkb`.`id_kualitas_proses`))) left join `ms_kualitas` `mk4` on((`mk4`.`id_kualitas` = `pkb`.`id_kualitas_periksa`))) left join `ms_satuan` `ms2` on((`ms2`.`id_satuan` = `pkb`.`id_perubahansatuan`))) left join `pro_barangkeluar` `pbk` on((`pk`.`id_barangkeluar` = `pbk`.`id_barangkeluar`))) left join `ms_proses` `mp2` on((`mp2`.`id_proses` = `pbk`.`id_proses`))) left join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) left join `ms_kategori_barang` `mkb2` on((`mkb2`.`id_kb` = `mkb`.`induk_kb`))) left join `ms_lokasi_produksi` `mlp` on((`mlp`.`id_lokasi` = `pk`.`id_lokasi`))) left join `ms_lokasi_produksi` `mlp2` on((`mlp2`.`id_lokasi` = `pbk`.`id_lokasi`))) left join `ms_pegawai` `mpg` on((`pbk`.`id_pegawai` = `mpg`.`id_pegawai`))) left join `ms_rekanan` `mpr` on((`pbk`.`id_rekanan` = `mpr`.`id_rekanan`))) left join `ms_mesin` `mmes` on((`pbk`.`id_mesin` = `mmes`.`id_mesin`))) left join `ms_satuan` `ms3` on((`pkb`.`id_satuanhasil` = `ms3`.`id_satuan`))) where (`pkb`.`status` = 1);

-- membuang struktur untuk view si_sarung.view_keu_sumber_dana
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_keu_sumber_dana`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_keu_sumber_dana` AS select `s`.`id` AS `id`,`s`.`tahun` AS `tahun`,`s`.`lokasi` AS `lokasi`,`s`.`user_id_create` AS `user_id_create`,`s`.`user_id_update` AS `user_id_update`,`s`.`nomor_transaksi` AS `nomor_transaksi`,`s`.`tanggal_transaksi` AS `tanggal_transaksi`,`s`.`jenis_transaksi` AS `jenis_transaksi`,`s`.`dari_akun` AS `dari_akun`,`s`.`tipe_id_akun` AS `tipe_id_akun`,`s`.`created_at` AS `created_at`,`s`.`updated_at` AS `updated_at`,`s`.`penerima_transaksi` AS `penerima_transaksi`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p`.`saldo_normal` AS `saldo_normal`,`d`.`nominal` AS `nominal` from ((`keu_sumber_dana` `s` join `ms_perkiraan` `p` on((`p`.`id` = `s`.`dari_akun`))) join `a_view_keu_sumber_dana` `d` on((`d`.`id_keu_sumber_dana` = `s`.`id`)));

-- membuang struktur untuk view si_sarung.view_laporan_orderbeli
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_laporan_orderbeli`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_laporan_orderbeli` AS select `pp`.`id_orderbeli` AS `id_orderbeli`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_order` AS `sufix_no_order`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_penyedia` AS `id_penyedia`,`pp`.`potongan` AS `potongan`,`pp`.`termasuk_pajak` AS `termasuk_pajak`,`pp`.`pajak` AS `pajak`,`pp`.`nominal_ongkir` AS `nominal_ongkir`,`pp`.`status` AS `status`,`pp`.`keterangan` AS `keterangan`,`pp`.`syarat_bayar` AS `syarat_bayar`,`pp`.`tempat_serah` AS `tempat_serah`,`pp`.`tanggal_serah` AS `tanggal_serah`,`pp`.`penerima` AS `penerima`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,`mp`.`nama` AS `nama`,`mp`.`pic` AS `pic`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mkb`.`id_kelompok` AS `id_kelompok`,`mkb2`.`id_kb` AS `id_kategori`,`mkb2`.`nama` AS `kategori`,`mkb`.`id_kb` AS `id_sub_kategori`,`mkb`.`nama` AS `sub_kategori`,`mb`.`nama_barang` AS `nama_barang`,`ms`.`nama_satuan` AS `nama_satuan`,`ms`.`satuan` AS `satuan`,`ppb`.`jml_barang` AS `jml_barang`,`ppb`.`jml_barang_konv` AS `jml_barang_konv`,`ppb`.`harga_satuan` AS `harga_satuan`,`ppb`.`nilai_ppn` AS `nilai_ppn`,(`ppb`.`jml_barang` * (`ppb`.`harga_satuan` + `ppb`.`nilai_ppn`)) AS `sub_total` from ((((((`pem_orderbeli` `pp` join `view_orderbeli_barang` `ppb` on((`pp`.`id_orderbeli` = `ppb`.`id_orderbeli`))) join `ms_barang` `mb` on((`ppb`.`id_barang` = `mb`.`id`))) join `ms_satuan` `ms` on((`mb`.`id_satuan` = `ms`.`id_satuan`))) join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`))) join `ms_penyedia` `mp` on((`pp`.`id_penyedia` = `mp`.`id_penyedia`)));

-- membuang struktur untuk view si_sarung.view_laporan_orderservice
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_laporan_orderservice`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_laporan_orderservice` AS select `srv`.`id` AS `id`,`srv`.`lokasi` AS `lokasi`,`srv`.`user_id_create` AS `user_id_create`,`srv`.`user_id_update` AS `user_id_update`,`srv`.`cv` AS `cv`,`srv`.`no_nota` AS `no_nota`,`srv`.`sufix_no_nota` AS `sufix_no_nota`,`srv`.`tanggal` AS `tanggal`,`srv`.`tanggal_nota` AS `tanggal_nota`,`srv`.`id_penyedia` AS `id_penyedia`,`srv`.`no_faktur_pajak` AS `no_faktur_pajak`,`srv`.`keterangan` AS `keterangan`,`srv`.`id_akun_hutang` AS `id_akun_hutang`,`srv`.`created_at` AS `created_at`,`srv`.`updated_at` AS `updated_at`,`d`.`id_akun` AS `id_akun`,`a`.`kode_perkiraan` AS `kode_perkiraan`,`a`.`nama_perkiraan` AS `nama_perkiraan`,`d`.`deskripsi` AS `deskripsi`,`d`.`jumlah` AS `jumlah`,`d`.`harga_satuan` AS `harga_satuan`,ifnull((`d`.`jumlah` * `d`.`harga_satuan`),0) AS `total`,`mp`.`nama` AS `nama`,`mp`.`pic` AS `pic` from (((`serv_orderservice` `srv` join `serv_orderservice_detail` `d` on((`d`.`id_nota` = `srv`.`id`))) join `ms_perkiraan` `a` on((`a`.`id` = `d`.`id_akun`))) join `ms_penyedia` `mp` on((`srv`.`id_penyedia` = `mp`.`id_penyedia`)));

-- membuang struktur untuk view si_sarung.view_laporan_pembelian
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_laporan_pembelian`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_laporan_pembelian` AS select `pp`.`id_pembelian` AS `id_pembelian`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_penyedia` AS `id_penyedia`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`nominal_ongkir` AS `nominal_ongkir`,`pp`.`termasuk_pajak` AS `termasuk_pajak`,`pp`.`pajak` AS `pajak`,`pp`.`no_faktur_pajak` AS `no_faktur_pajak`,`pp`.`status` AS `status`,`pp`.`keterangan` AS `keterangan`,`pp`.`syarat_bayar` AS `syarat_bayar`,`pp`.`tempat_serah` AS `tempat_serah`,`pp`.`tanggal_serah` AS `tanggal_serah`,`pp`.`penerima` AS `penerima`,`pp`.`id_akun_hutang` AS `id_akun_hutang`,`pp`.`id_akun_potongan` AS `id_akun_potongan`,`pp`.`id_akun_pajak` AS `id_akun_pajak`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,`pp`.`id_pembelian` AS `id_beli`,`mp`.`nama` AS `nama`,`mp`.`pic` AS `pic`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mkb`.`id_kelompok` AS `id_kelompok`,`mkb2`.`id_kb` AS `id_kategori`,`mkb2`.`nama` AS `kategori`,`mkb`.`id_kb` AS `id_sub_kategori`,`mkb`.`nama` AS `sub_kategori`,`mb`.`nama_barang` AS `nama_barang`,`ms`.`nama_satuan` AS `nama_satuan`,`ms`.`satuan` AS `satuan`,`ppb`.`jml_barang` AS `jml_barang`,`ppb`.`jml_barang_konv` AS `jml_barang_konv`,`ppb`.`harga_satuan` AS `harga_satuan`,`ppb`.`nilai_ppn` AS `nilai_ppn`,(`ppb`.`jml_barang` * (`ppb`.`harga_satuan` + `ppb`.`nilai_ppn`)) AS `total` from ((((((`pem_pembelian` `pp` join `view_pembelian_barang` `ppb` on((`pp`.`id_pembelian` = `ppb`.`id_pembelian`))) join `ms_barang` `mb` on((`ppb`.`id_barang` = `mb`.`id`))) join `ms_satuan` `ms` on((`ppb`.`id_satuan` = `ms`.`id_satuan`))) join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`))) join `ms_penyedia` `mp` on((`pp`.`id_penyedia` = `mp`.`id_penyedia`)));

-- membuang struktur untuk view si_sarung.view_laporan_penjualan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_laporan_penjualan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_laporan_penjualan` AS select `pp`.`tanggal` AS `tanggal`,`pp`.`no_faktur` AS `no_faktur`,`ppb`.`id_jual_barang` AS `id_jual_barang`,`ppb`.`id_penjualan` AS `id_penjualan`,`ppb`.`id_barang` AS `id_barang`,`ppb`.`id_gudang` AS `id_gudang`,`ppb`.`jml_barang` AS `jml_barang`,`ppb`.`jml_barang_konv` AS `jml_barang_konv`,`ppb`.`harga_satuan` AS `harga_satuan`,`ppb`.`potongan` AS `potongan`,`ppb`.`total` AS `total`,`ppb`.`status` AS `status`,`ppb`.`id_satuan` AS `id_satuan`,`ppb`.`jumlah` AS `jumlah`,`ppb`.`jumlah_konversi` AS `jumlah_konversi`,`ppb`.`id_workorder` AS `id_workorder`,`ppb`.`id_workorder_barang` AS `id_workorder_barang`,`ppb`.`id_komposisi` AS `id_komposisi`,`ppb`.`id_proses` AS `id_proses`,`ppb`.`id_kualitas` AS `id_kualitas`,`ppb`.`id_motif_barang` AS `id_motif_barang`,`ppb`.`id_motif` AS `id_motif`,`ppb`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`ppb`.`id_label` AS `id_label`,`ppb`.`id_kemasan` AS `id_kemasan`,`ppb`.`id_kemasansatuan` AS `id_kemasansatuan`,`ppb`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`ppb`.`id_kemasanseratus` AS `id_kemasanseratus`,`ppb`.`id_plat` AS `id_plat`,`ppb`.`id_cap` AS `id_cap`,`ppb`.`id_kualitas_proses` AS `id_kualitas_proses`,`ppb`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`ppb`.`id_perubahansatuan` AS `id_perubahansatuan`,`ppb`.`jumlah_rencana` AS `jumlah_rencana`,`ppb`.`created_at` AS `created_at`,`ppb`.`update_at` AS `update_at`,`mp`.`nama` AS `nama_pelanggan`,`mp`.`id_pelanggan` AS `id_pelanggan`,`mb`.`nama_barang` AS `nama_barang` from (((`pen_penjualan` `pp` join `pen_penjualan_barang` `ppb` on((`pp`.`id_penjualan` = `ppb`.`id_penjualan`))) join `ms_pelanggan` `mp` on((`pp`.`id_pelanggan` = `mp`.`id_pelanggan`))) join `ms_barang` `mb` on((`ppb`.`id_barang` = `mb`.`id`)));

-- membuang struktur untuk view si_sarung.view_laporan_penjualan_langganan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_laporan_penjualan_langganan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_laporan_penjualan_langganan` AS select `pp`.`tanggal` AS `tanggal`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`keterangan` AS `keterangan`,`ppb`.`id_jual_barang` AS `id_jual_barang`,`ppb`.`id_penjualan` AS `id_penjualan`,`ppb`.`id_barang` AS `id_barang`,`ppb`.`id_gudang` AS `id_gudang`,`ppb`.`jml_barang` AS `jml_barang`,`ppb`.`jml_barang_konv` AS `jml_barang_konv`,`ppb`.`harga_satuan` AS `harga_satuan`,`ppb`.`potongan` AS `potongan`,`ppb`.`total` AS `total`,`ppb`.`status` AS `status`,`ppb`.`id_satuan` AS `id_satuan`,`ppb`.`jumlah` AS `jumlah`,`ppb`.`jumlah_konversi` AS `jumlah_konversi`,`ppb`.`id_workorder` AS `id_workorder`,`ppb`.`id_workorder_barang` AS `id_workorder_barang`,`ppb`.`id_komposisi` AS `id_komposisi`,`ppb`.`id_proses` AS `id_proses`,`ppb`.`id_kualitas` AS `id_kualitas`,`ppb`.`id_motif_barang` AS `id_motif_barang`,`ppb`.`id_motif` AS `id_motif`,`ppb`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`ppb`.`id_label` AS `id_label`,`ppb`.`id_kemasan` AS `id_kemasan`,`ppb`.`id_kemasansatuan` AS `id_kemasansatuan`,`ppb`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`ppb`.`id_kemasanseratus` AS `id_kemasanseratus`,`ppb`.`id_plat` AS `id_plat`,`ppb`.`id_cap` AS `id_cap`,`ppb`.`id_kualitas_proses` AS `id_kualitas_proses`,`ppb`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`ppb`.`id_perubahansatuan` AS `id_perubahansatuan`,`ppb`.`jumlah_rencana` AS `jumlah_rencana`,`ppb`.`created_at` AS `created_at`,`ppb`.`update_at` AS `update_at`,`mp`.`nama` AS `nama_pelanggan`,`mp`.`id_pelanggan` AS `id_pelanggan`,sum(`ppb`.`jml_barang`) AS `total_jmlbarang`,sum(`ppb`.`harga_satuan`) AS `total_satuan`,sum(`ppb`.`potongan`) AS `diskon`,sum(((`ppb`.`harga_satuan` * `ppb`.`jml_barang`) - `ppb`.`potongan`)) AS `piutang`,sum((`ppb`.`harga_satuan` * `ppb`.`jml_barang`)) AS `penjualan` from ((`pen_penjualan` `pp` join `pen_penjualan_barang` `ppb` on((`pp`.`id_penjualan` = `ppb`.`id_penjualan`))) join `ms_pelanggan` `mp` on((`pp`.`id_pelanggan` = `mp`.`id_pelanggan`))) group by `pp`.`no_faktur`;

-- membuang struktur untuk view si_sarung.view_laporan_penjualan_pelanggan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_laporan_penjualan_pelanggan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_laporan_penjualan_pelanggan` AS select `pp`.`id_penjualan` AS `id_penjualan`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_pelanggan` AS `id_pelanggan`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`pajak` AS `pajak`,`pp`.`no_faktur_pajak` AS `no_faktur_pajak`,`pp`.`status` AS `status`,`pp`.`status_kirim` AS `status_kirim`,`pp`.`keterangan` AS `keterangan`,`pp`.`tanggal_surat` AS `tanggal_surat`,`pp`.`no_surat` AS `no_surat`,`pp`.`sufix_no_surat` AS `sufix_no_surat`,`pp`.`keterangan_surat` AS `keterangan_surat`,`pp`.`id_akun_piutang` AS `id_akun_piutang`,`pp`.`id_akun_potongan` AS `id_akun_potongan`,`pp`.`id_akun_pajak` AS `id_akun_pajak`,`pp`.`id_akun_penjualan` AS `id_akun_penjualan`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,sum((`pb`.`jml_barang` * `pb`.`harga_satuan`)) AS `penjualan`,sum((`pb`.`jml_barang` * `pb`.`potongan`)) AS `diskon`,(sum((`pb`.`jml_barang` * `pb`.`harga_satuan`)) - sum((`pb`.`jml_barang` * `pb`.`potongan`))) AS `piutang`,`mp`.`nama` AS `nama_pelanggan`,`pp`.`mata_uang` AS `mata_uang`,`pp`.`kurs_jual` AS `kurs_jual` from ((`pen_penjualan` `pp` join `pen_penjualan_barang` `pb` on((`pb`.`id_penjualan` = `pp`.`id_penjualan`))) join `ms_pelanggan` `mp` on((`mp`.`id_pelanggan` = `pp`.`id_pelanggan`))) group by `pp`.`id_penjualan`;

-- membuang struktur untuk view si_sarung.view_laporan_penjualan_pelanggan_detail
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_laporan_penjualan_pelanggan_detail`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_laporan_penjualan_pelanggan_detail` AS select `pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_pelanggan` AS `id_pelanggan`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`pajak` AS `pajak`,`pp`.`no_faktur_pajak` AS `no_faktur_pajak`,`pp`.`status` AS `status_penjualan`,`pp`.`status_kirim` AS `status_kirim`,`pp`.`keterangan` AS `keterangan`,`pp`.`id_akun_piutang` AS `id_akun_piutang`,`pp`.`id_akun_potongan` AS `id_akun_potongan`,`pp`.`id_akun_pajak` AS `id_akun_pajak`,`pp`.`id_akun_penjualan` AS `id_akun_penjualan`,`pb`.`id_jual_barang` AS `id_jual_barang`,`pb`.`id_penjualan` AS `id_penjualan`,`pb`.`id_barang` AS `id_barang`,`pb`.`nama_barang` AS `nama_barang`,`pb`.`id_gudang` AS `id_gudang`,`pb`.`jml_barang` AS `jml_barang`,`pb`.`jml_barang_konv` AS `jml_barang_konv`,`pb`.`harga_satuan` AS `harga_satuan`,`pb`.`potongan` AS `potongan`,`pb`.`total` AS `total`,`pb`.`status` AS `status`,`pb`.`id_satuan` AS `id_satuan`,`ms`.`nama_satuan` AS `satuan`,`pb`.`jumlah` AS `jumlah`,`pb`.`jumlah_konversi` AS `jumlah_konversi`,`pb`.`id_workorder` AS `id_workorder`,`pb`.`id_workorder_barang` AS `id_workorder_barang`,`pb`.`id_komposisi` AS `id_komposisi`,`pb`.`id_proses` AS `id_proses`,`pb`.`id_kualitas` AS `id_kualitas`,`pb`.`id_motif_barang` AS `id_motif_barang`,`pb`.`id_motif` AS `id_motif`,`pb`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`pb`.`id_label` AS `id_label`,`pb`.`id_kemasan` AS `id_kemasan`,`pb`.`id_kemasansatuan` AS `id_kemasansatuan`,`pb`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`pb`.`id_kemasanseratus` AS `id_kemasanseratus`,`pb`.`id_plat` AS `id_plat`,`pb`.`id_cap` AS `id_cap`,`pb`.`id_kualitas_proses` AS `id_kualitas_proses`,`pb`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`pb`.`id_perubahansatuan` AS `id_perubahansatuan`,`pb`.`jumlah_rencana` AS `jumlah_rencana`,`pb`.`created_at` AS `created_at`,`pb`.`update_at` AS `update_at`,`mp`.`nama` AS `nama_pelanggan`,`pp`.`mata_uang` AS `mata_uang`,`pp`.`kurs_jual` AS `kurs_jual` from (((`pen_penjualan_barang` `pb` join `pen_penjualan` `pp` on((`pb`.`id_penjualan` = `pp`.`id_penjualan`))) join `ms_pelanggan` `mp` on((`mp`.`id_pelanggan` = `pp`.`id_pelanggan`))) join `ms_satuan` `ms` on((`ms`.`id_satuan` = `pb`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_mapingupahtenun
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_mapingupahtenun`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_mapingupahtenun` AS select `mm`.`id_mapingupahtenun` AS `id_mapingupahtenun`,(case when (`mk`.`id_kelompok` = 0) then '' else `mk`.`id_kelompok` end) AS `id_kelompok`,(case when (`mk`.`id_kelompok` = 0) then '' else `mk`.`nama` end) AS `nama_kelompok`,(case when (((`mp`.`id_pick` = 0) and (`mpb`.`id_pick_barang` = 0)) or (isnull(`mp`.`id_pick`) and isnull(`mpb`.`id_pick_barang`))) then '' else `mpb`.`id_pick_barang` end) AS `id_pick_barang`,(case when (((`mp`.`id_pick` = 0) and (`mpb`.`id_pick_barang` = 0)) or (isnull(`mp`.`id_pick`) and isnull(`mpb`.`id_pick_barang`))) then '' else `mp`.`nama_pick` end) AS `nama_pick`,(case when (((`mp`.`id_pick` = 0) and (`mpb`.`id_pick_barang` = 0)) or (isnull(`mp`.`id_pick`) and isnull(`mpb`.`id_pick_barang`))) then '' else `mp`.`id_motif` end) AS `id_motif_pick`,(case when (((`mp`.`id_pick` = 0) and (`mpb`.`id_pick_barang` = 0)) or (isnull(`mp`.`id_pick`) and isnull(`mpb`.`id_pick_barang`))) then '' else `mf`.`nama_motif` end) AS `nama_motif_pick`,(case when (((`mp`.`id_pick` = 0) and (`mpb`.`id_pick_barang` = 0)) or (isnull(`mp`.`id_pick`) and isnull(`mpb`.`id_pick_barang`))) then '' else `mpb`.`jenis_pick` end) AS `jenis_pick`,(case when (((`mp`.`id_pick` = 0) and (`mpb`.`id_pick_barang` = 0)) or (isnull(`mp`.`id_pick`) and isnull(`mpb`.`id_pick_barang`))) then '' when (`mpb`.`jenis_pick` = 1) then 'PENAMBAHAN' when (`mpb`.`jenis_pick` = 2) then 'PAS' when (`mpb`.`jenis_pick` = 3) then 'PENGURANGAN' else '' end) AS `nama_jenis_pick`,(case when (((`mp`.`id_pick` = 0) and (`mpb`.`id_pick_barang` = 0)) or (isnull(`mp`.`id_pick`) and isnull(`mpb`.`id_pick_barang`))) then '' else `mpb`.`pick_atas` end) AS `pick_atas`,(case when (((`mp`.`id_pick` = 0) and (`mpb`.`id_pick_barang` = 0)) or (isnull(`mp`.`id_pick`) and isnull(`mpb`.`id_pick_barang`))) then '' else `mpb`.`pick_bawah` end) AS `pick_bawah`,(case when (((`mp`.`id_pick` = 0) and (`mpb`.`id_pick_barang` = 0)) or (isnull(`mp`.`id_pick`) and isnull(`mpb`.`id_pick_barang`))) then '0' else `mpb`.`upah` end) AS `upah_pick`,(case when (((`mp`.`id_pick` = 0) and (`mpb`.`id_pick_barang` = 0)) or (isnull(`mp`.`id_pick`) and isnull(`mpb`.`id_pick_barang`))) then '0' else `mp`.`status` end) AS `status_pick`,(case when (`mp`.`status` = 1) then 'Aktif' when (`mp`.`status` = 2) then 'Tidak Aktif' else '' end) AS `nama_status_pick`,(case when ((`mub`.`id` = 0) or isnull(`mub`.`id`)) then '' else `mub`.`id` end) AS `id_upahtenun`,(case when ((`mub`.`id` = 0) or isnull(`mub`.`id`)) then '' else `mub`.`nama_upah` end) AS `nama_upahtenun`,(case when ((`mub`.`id` = 0) or isnull(`mub`.`id`)) then '' else `mub`.`tanggal_berlaku` end) AS `tanggal_berlaku_upahtenun`,(case when ((`mf2`.`id_motif` = 0) or isnull(`mf2`.`id_motif`)) then '' else `mub`.`id_motif` end) AS `id_motif_upahtenun`,(case when ((`mf2`.`id_motif` = 0) or isnull(`mf2`.`id_motif`)) then '' else `mf2`.`nama_motif` end) AS `nama_motif_upahtenun`,(case when ((`mlp`.`id_lokasi` = 0) or isnull(`mlp`.`id_lokasi`)) then '' else `mub`.`id_lokasi` end) AS `id_lokasi_upahtenun`,(case when ((`mlp`.`id_lokasi` = 0) or isnull(`mlp`.`id_lokasi`)) then '' else `mlp`.`nama_lokasi` end) AS `nama_lokasi_upahtenun`,(case when ((`mub`.`id` = 0) or isnull(`mub`.`id`)) then '0' else `mub`.`nominal_rekanan` end) AS `nominal_rekanan_upahtenun`,(case when ((`mub`.`id` = 0) or isnull(`mub`.`id`)) then '0' else `mub`.`nominal_rekanan_kelompok` end) AS `nominal_rekanan_kelompok_upahtenun`,(case when ((`mub`.`id` = 0) or isnull(`mub`.`id`)) then '0' else `mub`.`potongan_d` end) AS `potongan_d_upahtenun`,(case when ((`mub`.`id` = 0) or isnull(`mub`.`id`)) then '0' else `mub`.`potongan_n` end) AS `potongan_n_upahtenun`,(case when ((`mub`.`id` = 0) or isnull(`mub`.`id`)) then '0' else `mub`.`potongan_bs` end) AS `potongan_bs_upahtenun`,(case when ((`mub`.`id` = 0) or isnull(`mub`.`id`)) then '0' else `mub`.`status` end) AS `status_upahtenun`,(case when (`mub`.`status` = 0) then 'Tidak Aktif' when (`mub`.`status` = 1) then 'Aktif' else '' end) AS `nama_status_upahtenun` from ((((((((`ms_mapingtenun` `mm` left join `ms_rekanan_kelompok` `mk` on((`mm`.`id_kelompok` = `mk`.`id_kelompok`))) left join `ms_pick` `mp` on((`mm`.`id_pick` = `mp`.`id_pick`))) left join `ms_pick_barang` `mpb` on((`mpb`.`id_pick` = `mp`.`id_pick`))) join `ms_motif` `mf` on((`mf`.`id_motif` = `mp`.`id_motif`))) left join `ms_upahtenun_baru` `mub` on((`mm`.`id_upahtenun` = `mub`.`id`))) join `ms_motif` `mf2` on((`mf2`.`id_motif` = `mub`.`id_motif`))) join `ms_lokasi_produksi` `mlp` on((`mlp`.`id_lokasi` = `mub`.`id_lokasi`))) join `ms_satuan` `ms` on((`ms`.`id_satuan` = `mub`.`id_satuan`))) where ((`mp`.`id_motif` = `mub`.`id_motif`) and (`mm`.`status` = 1) and (`mp`.`status` = 1) and (`mub`.`status` = 1));

-- membuang struktur untuk view si_sarung.view_masuk
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_masuk`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_masuk` AS select `view_masuk_sub`.`id` AS `id`,`view_masuk_sub`.`id_barang` AS `id_barang`,`view_masuk_sub`.`kode_barang` AS `kode_barang`,`view_masuk_sub`.`nama_barang` AS `nama_barang`,(`view_masuk_sub`.`jum_barang` * (`view_masuk_sub`.`nilai_akhir` / `view_masuk_sub`.`nilai_awal`)) AS `jumlah`,(`view_masuk_sub`.`masuk` * (`view_masuk_sub`.`nilai_akhir` / `view_masuk_sub`.`nilai_awal`)) AS `masuk`,0 AS `keluar`,`view_masuk_sub`.`id_gudang` AS `id_gudang`,`view_masuk_sub`.`nama_gudang` AS `nama_gudang`,`view_masuk_sub`.`tanggal` AS `tanggal`,`view_masuk_sub`.`id_proses` AS `id_proses`,`view_masuk_sub`.`nama_proses` AS `nama_proses`,`view_masuk_sub`.`id_komposisi` AS `id_komposisi`,`view_masuk_sub`.`nama_komposisi` AS `nama_komposisi`,`view_masuk_sub`.`id_satuan` AS `id_satuan`,`view_masuk_sub`.`nama_satuan` AS `nama_satuan`,`view_masuk_sub`.`id_corak` AS `id_corak`,`view_masuk_sub`.`nama_corak` AS `nama_corak`,`view_masuk_sub`.`id_motif` AS `id_motif`,`view_masuk_sub`.`nama_motif` AS `nama_motif`,`view_masuk_sub`.`id_workorder` AS `id_workorder`,`view_masuk_sub`.`no_workorder` AS `no_workorder`,`view_masuk_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_masuk_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_masuk_sub`.`id_kualitas` AS `id_kualitas`,`view_masuk_sub`.`nama_kualitas` AS `nama_kualitas`,`view_masuk_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_masuk_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_masuk_sub`.`id_label` AS `id_label`,`view_masuk_sub`.`nama_label` AS `nama_label`,`view_masuk_sub`.`id_kemasan` AS `id_kemasan`,`view_masuk_sub`.`nama_kemasan` AS `nama_kemasan`,`view_masuk_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_masuk_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_masuk_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_masuk_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_masuk_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_masuk_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_masuk_sub`.`id_cap` AS `id_cap`,`view_masuk_sub`.`nama_cap` AS `nama_cap`,`view_masuk_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_masuk_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_masuk_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_masuk_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_masuk_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_masuk_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_masuk_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_masuk_sub`.`tanggal_full` AS `tanggal_full` from `view_masuk_sub`;

-- membuang struktur untuk view si_sarung.view_masukkemasan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_masukkemasan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_masukkemasan` AS select `view_masukkemasan_sub`.`id` AS `id`,`view_masukkemasan_sub`.`id_barang` AS `id_barang`,`view_masukkemasan_sub`.`kode_barang` AS `kode_barang`,`view_masukkemasan_sub`.`nama_barang` AS `nama_barang`,`view_masukkemasan_sub`.`jumlah` AS `jumlah`,`view_masukkemasan_sub`.`masuk` AS `masuk`,`view_masukkemasan_sub`.`keluar` AS `keluar`,`view_masukkemasan_sub`.`id_gudang` AS `id_gudang`,`view_masukkemasan_sub`.`nama_gudang` AS `nama_gudang`,`view_masukkemasan_sub`.`tanggal` AS `tanggal`,`view_masukkemasan_sub`.`id_proses` AS `id_proses`,`view_masukkemasan_sub`.`nama_proses` AS `nama_proses`,`view_masukkemasan_sub`.`id_komposisi` AS `id_komposisi`,`view_masukkemasan_sub`.`nama_komposisi` AS `nama_komposisi`,`view_masukkemasan_sub`.`id_satuan` AS `id_satuan`,`view_masukkemasan_sub`.`nama_satuan` AS `nama_satuan`,`view_masukkemasan_sub`.`id_corak` AS `id_corak`,`view_masukkemasan_sub`.`nama_corak` AS `nama_corak`,`view_masukkemasan_sub`.`id_motif` AS `id_motif`,`view_masukkemasan_sub`.`nama_motif` AS `nama_motif`,`view_masukkemasan_sub`.`id_workorder` AS `id_workorder`,`view_masukkemasan_sub`.`no_workorder` AS `no_workorder`,`view_masukkemasan_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_masukkemasan_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_masukkemasan_sub`.`id_kualitas` AS `id_kualitas`,`view_masukkemasan_sub`.`nama_kualitas` AS `nama_kualitas`,`view_masukkemasan_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_masukkemasan_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_masukkemasan_sub`.`id_label` AS `id_label`,`view_masukkemasan_sub`.`nama_label` AS `nama_label`,`view_masukkemasan_sub`.`id_kemasan` AS `id_kemasan`,`view_masukkemasan_sub`.`nama_kemasan` AS `nama_kemasan`,`view_masukkemasan_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_masukkemasan_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_masukkemasan_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_masukkemasan_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_masukkemasan_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_masukkemasan_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_masukkemasan_sub`.`id_cap` AS `id_cap`,`view_masukkemasan_sub`.`nama_cap` AS `nama_cap`,`view_masukkemasan_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_masukkemasan_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_masukkemasan_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_masukkemasan_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_masukkemasan_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_masukkemasan_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_masukkemasan_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_masukkemasan_sub`.`tanggal_full` AS `tanggal_full` from `view_masukkemasan_sub`;

-- membuang struktur untuk view si_sarung.view_masukkemasan_all
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_masukkemasan_all`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_masukkemasan_all` AS select `pbk`.`id_barangmasuk_kemasan` AS `id`,`pbkb`.`id_barangmasuk_kb` AS `id_detail`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbkb`.`jumlah` AS `jum_barang`,`pbkb`.`jumlah` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pbk`.`tanggal` AS `tanggal`,(case when (`pbkel`.`id_proses` = 0) then '' else `pbkel`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbkb`.`id_kualitas` = 0) then '' else `pbkb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbkb`.`id_kualitas_dudul` = 0) then '' else `pbkb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbkb`.`id_kualitas_dudul` = 0) then '' when (`pbkb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbkb`.`id_label` = 0) then '' else `pbkb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbkb`.`id_kemasan` = 0) then '' else `pbkb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbkb`.`id_kemasansatuan` = 0) then '' else `pbkb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbkb`.`id_kemasansepuluh` = 0) then '' else `pbkb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbkb`.`id_kemasanseratus` = 0) then '' else `pbkb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbkb`.`id_cap` = 0) then '' else `pbkb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbkb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbkb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbkb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbkb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbkb`.`jumlah_rencana`) or (`pbkb`.`jumlah_rencana` = 0)) then '' else `pbkb`.`jumlah_rencana` end) AS `jumlah_rencana`,(case when (`pbkel`.`id_proses` = 0) then '' else `pbkel`.`id_proses` end) AS `id_proses_sekarang`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses_sekarang`,`pbk`.`tanggal_full` AS `tanggal_full` from (((((((((((((((((((((`pro_barangmasuk_kemasan` `pbk` join `pro_barangmasuk_kemasan_barang` `pbkb` on((`pbk`.`id_barangmasuk_kemasan` = `pbkb`.`id_barangmasuk_kemasan`))) join `pro_barangkeluar_kemasan` `pbkel` on((`pbk`.`id_barangkeluar_kemasan` = `pbkel`.`id_barangkeluar_kemasan`))) join `ms_barang` `mb` on((`pbkb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbkb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `pbkel`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pbkb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`pbkb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbkb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbkb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pbkb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pbkb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbkb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbkb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbkb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbkb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbkb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbkb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbkb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbkb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbkb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbkb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) where (`pbk`.`status` = '1');

-- membuang struktur untuk view si_sarung.view_masukkemasan_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_masukkemasan_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_masukkemasan_sub` AS select `pbk`.`id_barangmasuk_kemasan` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbkb`.`jumlah` AS `jumlah`,`pbkb`.`jumlah` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pbk`.`tanggal` AS `tanggal`,(case when (`pbkel`.`id_proses` = 0) then '' else `pbkel`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbkb`.`id_kualitas` = 0) then '' else `pbkb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbkb`.`id_kualitas_dudul` = 0) then '' else `pbkb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbkb`.`id_kualitas_dudul` = 0) then '' when (`pbkb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbkb`.`id_label` = 0) then '' else `pbkb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbkb`.`id_kemasan` = 0) then '' else `pbkb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbkb`.`id_kemasansatuan` = 0) then '' else `pbkb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbkb`.`id_kemasansepuluh` = 0) then '' else `pbkb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbkb`.`id_kemasanseratus` = 0) then '' else `pbkb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbkb`.`id_cap` = 0) then '' else `pbkb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbkb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbkb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbkb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbkb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbkb`.`jumlah_rencana`) or (`pbkb`.`jumlah_rencana` = 0)) then '' else `pbkb`.`jumlah_rencana` end) AS `jumlah_rencana`,`pbk`.`tanggal_full` AS `tanggal_full` from (((((((((((((((((((((`pro_barangmasuk_kemasan` `pbk` join `pro_barangmasuk_kemasan_barang` `pbkb` on((`pbk`.`id_barangmasuk_kemasan` = `pbkb`.`id_barangmasuk_kemasan`))) join `pro_barangkeluar_kemasan` `pbkel` on((`pbk`.`id_barangkeluar_kemasan` = `pbkel`.`id_barangkeluar_kemasan`))) join `ms_barang` `mb` on((`pbkb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbkb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `pbkel`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pbkb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`pbkb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbkb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbkb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pbkb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pbkb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbkb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbkb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbkb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbkb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbkb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbkb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbkb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbkb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbkb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbkb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) where (`pbk`.`status` = '1');

-- membuang struktur untuk view si_sarung.view_masuk_all
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_masuk_all`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_masuk_all` AS select `pb`.`id_barangmasuk` AS `id`,`pbb`.`id` AS `id_detail`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbb`.`jumlah` AS `jum_barang`,`pbb`.`jumlah` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pb`.`tanggal` AS `tanggal`,`mp`.`id_proses` AS `id_proses`,`mp`.`nama_proses` AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`nama_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`pbb`.`id_kualitas` = 0) then '' else `pbb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' else `pbb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' when (`pbb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbb`.`id_label` = 0) then '' else `pbb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbb`.`id_kemasan` = 0) then '' else `pbb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbb`.`id_kemasansatuan` = 0) then '' else `pbb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbb`.`id_kemasansepuluh` = 0) then '' else `pbb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbb`.`id_kemasanseratus` = 0) then '' else `pbb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbb`.`id_cap` = 0) then '' else `pbb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbb`.`jumlah_rencana`) or (`pbb`.`jumlah_rencana` = 0)) then '' else `pbb`.`jumlah_rencana` end) AS `jumlah_rencana`,`mp`.`id_proses` AS `id_proses_sekarang`,`mp`.`nama_proses` AS `nama_proses_sekarang`,`pb`.`tanggal_full` AS `tanggal_full` from (((((((((((((((((((((`pro_barangmasuk` `pb` join `pro_barangmasuk_barang` `pbb` on((`pb`.`id_barangmasuk` = `pbb`.`id_barangmasuk`))) join `ms_barang` `mb` on((`pbb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbb`.`id_gudang` = `mg`.`id_gudang`))) join `pro_barangkeluar` `pbk` on((`pb`.`id_barangkeluar` = `pbk`.`id_barangkeluar`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `pbk`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pbb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`pbb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pbk`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pbk`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) where (`pb`.`status` <> '0');

-- membuang struktur untuk view si_sarung.view_masuk_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_masuk_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_masuk_sub` AS select `pb`.`id_barangmasuk` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pbb`.`jumlah` AS `jum_barang`,`pbb`.`jumlah` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pb`.`tanggal` AS `tanggal`,`mp`.`id_proses` AS `id_proses`,`mp`.`nama_proses` AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`nama_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (`mp`.`id_proses` = '37') then '' when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (`mp`.`id_proses` = '37') then '' when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when (`mp`.`id_proses` = '37') then '' when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when (`mp`.`id_proses` = '37') then '' when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`mp`.`id_proses` = '37') then '' when (`pbb`.`id_kualitas` = 0) then '' else `pbb`.`id_kualitas` end) AS `id_kualitas`,(case when (`mp`.`id_proses` = '37') then '' when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' else `pbb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pbb`.`id_kualitas_dudul` = 0) then '' when (`pbb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`pbb`.`id_label` = 0) then '' else `pbb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pbb`.`id_kemasan` = 0) then '' else `pbb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pbb`.`id_kemasansatuan` = 0) then '' else `pbb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pbb`.`id_kemasansepuluh` = 0) then '' else `pbb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pbb`.`id_kemasanseratus` = 0) then '' else `pbb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pbb`.`id_cap` = 0) then '' else `pbb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`pbb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`pbb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pbb`.`jumlah_rencana`) or (`pbb`.`jumlah_rencana` = 0)) then '' else `pbb`.`jumlah_rencana` end) AS `jumlah_rencana`,`pb`.`tanggal_full` AS `tanggal_full` from (((((((((((((((((((((`pro_barangmasuk` `pb` join `pro_barangmasuk_barang` `pbb` on((`pb`.`id_barangmasuk` = `pbb`.`id_barangmasuk`))) join `ms_barang` `mb` on((`pbb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pbb`.`id_gudang` = `mg`.`id_gudang`))) join `pro_barangkeluar` `pbk` on((`pb`.`id_barangkeluar` = `pbk`.`id_barangkeluar`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `pbk`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pbb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`pbb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pbb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pbb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pbk`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pbk`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pbb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pbb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pbb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pbb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pbb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pbb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pbb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pbb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pbb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pbb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) where (`pb`.`status` <> '0');

-- membuang struktur untuk view si_sarung.view_monitoring
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_monitoring`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_monitoring` AS select `view_monitoring_sub`.`nomor` AS `nomor`,`view_monitoring_sub`.`id_workorder` AS `id_workorder`,`view_monitoring_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_monitoring_sub`.`id_barangkeluar` AS `id_barangkeluar`,`view_monitoring_sub`.`tanggal` AS `tanggal`,`view_monitoring_sub`.`jumlah` AS `jumlah`,`view_monitoring_sub`.`id_proses` AS `id_proses`,`view_monitoring_sub`.`id_proses2` AS `id_proses2`,`view_monitoring_sub`.`jumlah_beem` AS `jumlah_beem`,`view_monitoring_sub`.`nama_motif` AS `nama_motif`,`view_monitoring_sub`.`motif_keterangan` AS `motif_keterangan` from `view_monitoring_sub`;

-- membuang struktur untuk view si_sarung.view_monitoring_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_monitoring_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_monitoring_sub` AS select `pw`.`nomor` AS `nomor`,`pw`.`id_workorder` AS `id_workorder`,`pwb`.`id_workorder_barang` AS `id_workorder_barang`,`pbk`.`id_barangkeluar` AS `id_barangkeluar`,`pwb`.`hb` AS `tanggal`,`pwb`.`jumlah_beem` AS `jumlah`,`pbk`.`id_proses` AS `id_proses`,`pbk2`.`id_proses` AS `id_proses2`,'1' AS `jumlah_beem`,'' AS `nama_motif`,`mmb`.`motif_keterangan` AS `motif_keterangan` from ((((((`pem_workorder` `pw` join `pem_workorder_barang` `pwb` on((`pw`.`id_workorder` = `pwb`.`id_workorder`))) join `pem_workorder_ket` `pwk` on((`pw`.`id_workorder` = `pwk`.`id_workorder`))) left join `pro_barangkeluar` `pbk` on((`pw`.`id_workorder` = `pbk`.`id_workorder`))) left join `pro_barangkeluar` `pbk2` on((`pwb`.`id_workorder_barang` = `pbk2`.`id_workorder_barang`))) left join `ms_motif` `mm` on((`pwb`.`motif` = `mm`.`id_motif`))) left join `ms_motif_barang` `mmb` on((`pwk`.`keterangan` = `mmb`.`id_motif_barang`))) group by `pw`.`id_workorder`,`pbk2`.`id_proses` union all select `pwb`.`no_workorder` AS `nomor`,`pw`.`id_workorder` AS `id_workorder`,`pwb`.`id_workorder_barang` AS `id_workorder_barang`,`pbk`.`id_barangkeluar` AS `id_barangkeluar`,`pwb`.`hb` AS `tangal`,`pwb`.`jumlah_beem` AS `jumlah`,`pbk`.`id_proses` AS `id_proses`,`pbk2`.`id_proses` AS `id_proses2`,'1' AS `jumlah_beem`,`mm`.`nama_motif` AS `nama_motif`,'' AS `motif_keterangan` from ((((((`pem_workorder` `pw` join `pem_workorder_barang` `pwb` on((`pw`.`id_workorder` = `pwb`.`id_workorder`))) join `pem_workorder_ket` `pwk` on((`pw`.`id_workorder` = `pwk`.`id_workorder`))) left join `pro_barangkeluar` `pbk` on((`pw`.`id_workorder` = `pbk`.`id_workorder`))) left join `pro_barangkeluar` `pbk2` on((`pwb`.`id_workorder_barang` = `pbk2`.`id_workorder_barang`))) left join `ms_motif` `mm` on((`pwb`.`motif` = `mm`.`id_motif`))) left join `ms_motif_barang` `mmb` on((`pwk`.`keterangan` = `mmb`.`id_motif_barang`))) group by `pwb`.`id_workorder_barang`,`pbk2`.`id_proses`;

-- membuang struktur untuk view si_sarung.view_ms_barang_full
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_ms_barang_full`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_ms_barang_full` AS select `b`.`id` AS `id`,`b`.`id_kb` AS `id_kb`,`b`.`id_warna` AS `id_warna`,`b`.`kode_barang` AS `kode_barang`,`b`.`nama_barang` AS `nama_barang`,`b`.`ukuran_barang` AS `ukuran_barang`,`b`.`id_satuan` AS `id_satuan`,`b`.`ket_barang` AS `ket_barang`,`b`.`min_stok` AS `min_stok`,`b`.`id_akun_pembelian` AS `id_akun_pembelian`,`b`.`id_akun_penjualan` AS `id_akun_penjualan`,`b`.`id_akun` AS `id_akun`,`b`.`create_at` AS `create_at`,`b`.`update_at` AS `update_at`,`kb`.`nama` AS `nama`,`kb`.`inisial` AS `inisial`,`kl`.`id_kelompok` AS `id_kelompok`,`kl`.`nama_kelompok` AS `nama_kelompok`,`mkb2`.`id_kb` AS `id_kategori`,`mkb2`.`nama` AS `kategori`,`mkb`.`id_kb` AS `id_sub_kategori`,`mkb`.`nama` AS `sub_kategori`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`p2`.`nama_perkiraan` AS `nama_perkiraan_pembelian`,`p3`.`nama_perkiraan` AS `nama_perkiraan_penjualan` from (((((((`ms_barang` `b` join `ms_kategori_barang` `kb` on((`kb`.`id_kb` = `b`.`id_kb`))) join `ms_kelompok` `kl` on((`kl`.`id_kelompok` = `kb`.`id_kelompok`))) left join `ms_perkiraan` `p` on((`p`.`id` = `b`.`id_akun`))) left join `ms_perkiraan` `p2` on((`p2`.`id` = `b`.`id_akun_pembelian`))) left join `ms_perkiraan` `p3` on((`p3`.`id` = `b`.`id_akun_penjualan`))) join `ms_kategori_barang` `mkb` on((`b`.`id_kb` = `mkb`.`id_kb`))) join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`)));

-- membuang struktur untuk view si_sarung.view_ms_makelar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_ms_makelar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_ms_makelar` AS select `rk`.`id_kelompok` AS `id_kelompok`,'0' AS `id_rekanan`,`rk`.`nama` AS `nama`,`rk`.`id_akun_hutang` AS `id_akun_hutang`,`rk`.`id_akun_piutang` AS `id_akun_piutang`,'Rekanan/Makelar' AS `keterangan` from `ms_rekanan_kelompok` `rk` union all select `r`.`id_kelompok` AS `id_kelompok`,`r`.`id_rekanan` AS `id_rekanan`,`r`.`nama` AS `nama`,`rk`.`id_akun_hutang` AS `id_akun_hutang`,`rk`.`id_akun_piutang` AS `id_akun_piutang`,'Petenun' AS `keterangan` from (`ms_rekanan_kelompok` `rk` join `ms_rekanan` `r` on((`r`.`id_kelompok` = `rk`.`id_kelompok`)));

-- membuang struktur untuk view si_sarung.view_mutasi
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_mutasi`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_mutasi` AS select `a`.`id` AS `id`,`a`.`id_barang` AS `id_barang`,`a`.`kode_barang` AS `kode_barang`,`a`.`nama_barang` AS `nama_barang`,`a`.`jumlah` AS `jumlah`,`a`.`masuk` AS `masuk`,`a`.`keluar` AS `keluar`,`a`.`id_gudang` AS `id_gudang`,`a`.`nama_gudang` AS `nama_gudang`,`a`.`tanggal` AS `tanggal`,`a`.`id_proses` AS `id_proses`,`a`.`nama_proses` AS `nama_proses`,`a`.`id_komposisi` AS `id_komposisi`,`a`.`nama_komposisi` AS `nama_komposisi`,`a`.`id_satuan` AS `id_satuan`,`a`.`nama_satuan` AS `nama_satuan`,`a`.`id_corak` AS `id_corak`,`a`.`nama_corak` AS `nama_corak`,`a`.`id_motif` AS `id_motif`,`a`.`nama_motif` AS `nama_motif`,`a`.`id_workorder` AS `id_workorder`,`a`.`no_workorder` AS `no_workorder`,`a`.`id_workorder_barang` AS `id_workorder_barang`,`a`.`no_workorder_barang` AS `no_workorder_barang`,`a`.`id_kualitas` AS `id_kualitas`,`a`.`nama_kualitas` AS `nama_kualitas`,`a`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`a`.`kualitas_dudul` AS `kualitas_dudul`,`a`.`id_label` AS `id_label`,`a`.`nama_label` AS `nama_label`,`a`.`id_kemasan` AS `id_kemasan`,`a`.`nama_kemasan` AS `nama_kemasan`,`a`.`id_kemasansatuan` AS `id_kemasansatuan`,`a`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`a`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`a`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`a`.`id_kemasanseratus` AS `id_kemasanseratus`,`a`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`a`.`id_cap` AS `id_cap`,`a`.`nama_cap` AS `nama_cap`,`a`.`id_kualitas_proses` AS `id_kualitas_proses`,`a`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`a`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`a`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`a`.`id_perubahansatuan` AS `id_perubahansatuan`,`a`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`a`.`jumlah_rencana` AS `jumlah_rencana`,`a`.`tanggal_full` AS `tanggal_full`,`a`.`ket_1` AS `ket_1`,`a`.`ket_2` AS `ket_2`,`a`.`ket_3` AS `ket_3`,`a`.`ket_4` AS `ket_4`,`a`.`ket_5` AS `ket_5`,`a`.`nilai_awal` AS `nilai_awal`,`a`.`nilai_akhir` AS `nilai_akhir`,`a`.`id_detail` AS `id_detail`,`a`.`id_warna` AS `id_warna`,`a`.`nama_warna` AS `nama_warna`,`a`.`inisial_warna` AS `inisial_warna`,`a`.`ket_proses` AS `ket_proses`,`mkb2`.`id_kb` AS `id_kategori`,`mkb2`.`nama` AS `nama_kategori`,`mkb`.`id_kb` AS `id_subkategori`,`mkb`.`nama` AS `nama_subkategori`,`mlp`.`id_lokasi` AS `id_lokasi`,`mlp`.`nama_lokasi` AS `nama_lokasi` from (((((`view_sub_mutasi` `A` join `ms_gudang` `mg` on((`mg`.`id_gudang` = `a`.`id_gudang`))) join `ms_barang` `mb` on((`mb`.`id` = `a`.`id_barang`))) join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`))) join `ms_lokasi_produksi` `mlp` on((`mg`.`id_lokasi` = `mlp`.`id_lokasi`))) order by `a`.`id_proses`,`a`.`id_komposisi`,`a`.`id_satuan`,`a`.`id_corak`,`a`.`id_motif`,`a`.`id_workorder_barang`,`a`.`id_kualitas`,`a`.`id_kualitas_dudul`,`a`.`id_label`,`a`.`id_kemasan`,`a`.`id_kemasansatuan`,`a`.`id_kemasansepuluh`,`a`.`id_kemasanseratus`,`a`.`id_cap`,`a`.`id_kualitas_proses`,`a`.`id_kualitas_periksa`,`a`.`id_perubahansatuan`,`a`.`jumlah_rencana`,`a`.`tanggal`,`mkb2`.`id_kb`;

-- membuang struktur untuk view si_sarung.view_mutasitenun
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_mutasitenun`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_mutasitenun` AS select `a`.`id` AS `id`,`a`.`id_barang` AS `id_barang`,`a`.`kode_barang` AS `kode_barang`,`a`.`nama_barang` AS `nama_barang`,`a`.`jumlah` AS `jumlah`,`a`.`masuk` AS `masuk`,`a`.`keluar` AS `keluar`,`a`.`id_gudang` AS `id_gudang`,`a`.`nama_gudang` AS `nama_gudang`,`a`.`tanggal` AS `tanggal`,`a`.`id_proses` AS `id_proses`,`a`.`nama_proses` AS `nama_proses`,`a`.`id_komposisi` AS `id_komposisi`,`a`.`nama_komposisi` AS `nama_komposisi`,`a`.`id_satuan` AS `id_satuan`,`a`.`nama_satuan` AS `nama_satuan`,`a`.`id_corak` AS `id_corak`,`a`.`nama_corak` AS `nama_corak`,`a`.`id_motif` AS `id_motif`,`a`.`nama_motif` AS `nama_motif`,`a`.`id_workorder` AS `id_workorder`,`a`.`no_workorder` AS `no_workorder`,`a`.`id_workorder_barang` AS `id_workorder_barang`,`a`.`no_workorder_barang` AS `no_workorder_barang`,`a`.`id_kualitas` AS `id_kualitas`,`a`.`nama_kualitas` AS `nama_kualitas`,`a`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`a`.`kualitas_dudul` AS `kualitas_dudul`,`a`.`id_label` AS `id_label`,`a`.`nama_label` AS `nama_label`,`a`.`id_kemasan` AS `id_kemasan`,`a`.`nama_kemasan` AS `nama_kemasan`,`a`.`id_kemasansatuan` AS `id_kemasansatuan`,`a`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`a`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`a`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`a`.`id_kemasanseratus` AS `id_kemasanseratus`,`a`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`a`.`id_cap` AS `id_cap`,`a`.`nama_cap` AS `nama_cap`,`a`.`id_kualitas_proses` AS `id_kualitas_proses`,`a`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`a`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`a`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`a`.`id_perubahansatuan` AS `id_perubahansatuan`,`a`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`a`.`jumlah_rencana` AS `jumlah_rencana`,`a`.`tanggal_full` AS `tanggal_full`,`a`.`ket_1` AS `ket_1`,`a`.`ket_2` AS `ket_2`,`a`.`ket_3` AS `ket_3`,`a`.`ket_4` AS `ket_4`,`a`.`ket_5` AS `ket_5`,`a`.`nilai_awal` AS `nilai_awal`,`a`.`nilai_akhir` AS `nilai_akhir`,`a`.`id_detail` AS `id_detail`,`a`.`id_warna` AS `id_warna`,`a`.`nama_warna` AS `nama_warna`,`a`.`inisial_warna` AS `inisial_warna`,`a`.`ket_proses` AS `ket_proses`,`a`.`lebar` AS `lebar`,`a`.`panjang` AS `panjang`,`a`.`pick` AS `pick`,`mkb2`.`id_kb` AS `id_kategori`,`mkb2`.`nama` AS `nama_kategori`,`mkb`.`id_kb` AS `id_subkategori`,`mkb`.`nama` AS `nama_subkategori`,`mlp`.`id_lokasi` AS `id_lokasi`,`mlp`.`nama_lokasi` AS `nama_lokasi` from (((((`view_mutasitenun_sub` `A` join `ms_gudang` `mg` on((`mg`.`id_gudang` = `a`.`id_gudang`))) join `ms_barang` `mb` on((`mb`.`id` = `a`.`id_barang`))) join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`))) join `ms_lokasi_produksi` `mlp` on((`mg`.`id_lokasi` = `mlp`.`id_lokasi`))) order by `a`.`id_proses`,`a`.`id_komposisi`,`a`.`id_satuan`,`a`.`id_corak`,`a`.`id_motif`,`a`.`id_workorder_barang`,`a`.`id_kualitas`,`a`.`id_kualitas_dudul`,`a`.`id_label`,`a`.`id_kemasan`,`a`.`id_kemasansatuan`,`a`.`id_kemasansepuluh`,`a`.`id_kemasanseratus`,`a`.`id_cap`,`a`.`id_kualitas_proses`,`a`.`id_kualitas_periksa`,`a`.`id_perubahansatuan`,`a`.`jumlah_rencana`,`a`.`tanggal`,`mkb2`.`id_kb`;

-- membuang struktur untuk view si_sarung.view_mutasitenun_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_mutasitenun_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_mutasitenun_sub` AS select `vi`.`id` AS `id`,`vi`.`id_barang` AS `id_barang`,`vi`.`kode_barang` AS `kode_barang`,`vi`.`nama_barang` AS `nama_barang`,`vi`.`jumlah` AS `jumlah`,`vi`.`masuk` AS `masuk`,`vi`.`keluar` AS `keluar`,`vi`.`id_gudang` AS `id_gudang`,`vi`.`nama_gudang` AS `nama_gudang`,`vi`.`tanggal` AS `tanggal`,`vi`.`id_proses` AS `id_proses`,`vi`.`nama_proses` AS `nama_proses`,`vi`.`id_komposisi` AS `id_komposisi`,`vi`.`nama_komposisi` AS `nama_komposisi`,`vi`.`id_satuan` AS `id_satuan`,`vi`.`nama_satuan` AS `nama_satuan`,`vi`.`id_corak` AS `id_corak`,`vi`.`nama_corak` AS `nama_corak`,`vi`.`id_motif` AS `id_motif`,`vi`.`nama_motif` AS `nama_motif`,`vi`.`id_workorder` AS `id_workorder`,`vi`.`no_workorder` AS `no_workorder`,`vi`.`id_workorder_barang` AS `id_workorder_barang`,`vi`.`no_workorder_barang` AS `no_workorder_barang`,`vi`.`id_kualitas` AS `id_kualitas`,`vi`.`nama_kualitas` AS `nama_kualitas`,`vi`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vi`.`kualitas_dudul` AS `kualitas_dudul`,`vi`.`id_label` AS `id_label`,`vi`.`nama_label` AS `nama_label`,`vi`.`id_kemasan` AS `id_kemasan`,`vi`.`nama_kemasan` AS `nama_kemasan`,`vi`.`id_kemasansatuan` AS `id_kemasansatuan`,`vi`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vi`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vi`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vi`.`id_kemasanseratus` AS `id_kemasanseratus`,`vi`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vi`.`id_cap` AS `id_cap`,`vi`.`nama_cap` AS `nama_cap`,`vi`.`id_kualitas_proses` AS `id_kualitas_proses`,`vi`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vi`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vi`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vi`.`id_perubahansatuan` AS `id_perubahansatuan`,`vi`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vi`.`jumlah_rencana` AS `jumlah_rencana`,`vi`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Saldo Awal' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vi`.`id_komposisi`) or (`vi`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vi`.`id_komposisi`) or (`vi`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vi`.`id_komposisi`) or (`vi`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,'' AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from ((`view_inv_saldoawal` `vi` join `inv_saldoawal` `isa` on((`vi`.`id` = `isa`.`id`))) left join `ms_warnakomposisi` `mk` on((`vi`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,`vp`.`jumlah` AS `jumlah`,`vp`.`masuk` AS `masuk`,`vp`.`keluar` AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,`vp`.`id_satuan` AS `id_satuan`,`vp`.`nama_satuan` AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,`vp`.`tanggal_full` AS `tanggal_full`,concat(`pp`.`no_faktur`,`pp`.`sufix_no_faktur`) AS `ket_1`,`mp`.`nama` AS `ket_2`,concat('Pembelian dari : ',`mp`.`nama`) AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from ((`view_penerimaan` `vp` join `pem_pembelian` `pp` on((`vp`.`id` = `pp`.`id_pembelian`))) join `ms_penyedia` `mp` on((`pp`.`id_penyedia` = `mp`.`id_penyedia`))) union all select `vt`.`id` AS `id`,`vt`.`id_barang` AS `id_barang`,`vt`.`kode_barang` AS `kode_barang`,`vt`.`nama_barang` AS `nama_barang`,(`vt`.`jum_barang` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `jumlah`,0 AS `masuk`,(`vt`.`keluar` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `keluar`,`vt`.`id_gudang` AS `id_gudang`,`vt`.`nama_gudang` AS `nama_gudang`,`vt`.`tanggal` AS `tanggal`,`vt`.`id_proses` AS `id_proses`,`vt`.`nama_proses` AS `nama_proses`,`vt`.`id_komposisi` AS `id_komposisi`,`vt`.`nama_komposisi` AS `nama_komposisi`,`vt`.`id_satuan` AS `id_satuan`,`vt`.`nama_satuan` AS `nama_satuan`,`vt`.`id_corak` AS `id_corak`,`vt`.`nama_corak` AS `nama_corak`,`vt`.`id_motif` AS `id_motif`,`vt`.`nama_motif` AS `nama_motif`,`vt`.`id_workorder` AS `id_workorder`,`vt`.`no_workorder` AS `no_workorder`,`vt`.`id_workorder_barang` AS `id_workorder_barang`,`vt`.`no_workorder_barang` AS `no_workorder_barang`,`vt`.`id_kualitas` AS `id_kualitas`,`vt`.`nama_kualitas` AS `nama_kualitas`,`vt`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vt`.`kualitas_dudul` AS `kualitas_dudul`,`vt`.`id_label` AS `id_label`,`vt`.`nama_label` AS `nama_label`,`vt`.`id_kemasan` AS `id_kemasan`,`vt`.`nama_kemasan` AS `nama_kemasan`,`vt`.`id_kemasansatuan` AS `id_kemasansatuan`,`vt`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vt`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vt`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vt`.`id_kemasanseratus` AS `id_kemasanseratus`,`vt`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vt`.`id_cap` AS `id_cap`,`vt`.`nama_cap` AS `nama_cap`,`vt`.`id_kualitas_proses` AS `id_kualitas_proses`,`vt`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vt`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vt`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vt`.`id_perubahansatuan` AS `id_perubahansatuan`,`vt`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vt`.`jumlah_rencana` AS `jumlah_rencana`,`vt`.`tanggal_full` AS `tanggal_full`,concat(`it`.`no_faktur`,`it`.`faktur`) AS `ket_1`,`vt`.`nama_gudang` AS `ket_2`,'Transfer Keluar' AS `ket_3`,'' AS `ket_4`,`vt`.`keterangan` AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`vt`.`keterangan` AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from ((`view_transferkeluar_all` `vt` join `inv_transfergudang` `it` on((`vt`.`id` = `it`.`id_transfergudang`))) left join `ms_warnakomposisi` `mk` on((`vt`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `vt`.`id` AS `id`,`vt`.`id_barang` AS `id_barang`,`vt`.`kode_barang` AS `kode_barang`,`vt`.`nama_barang` AS `nama_barang`,(`vt`.`jum_barang` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `jumlah`,0 AS `masuk`,(`vt`.`keluar` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `keluar`,`vt`.`id_gudang` AS `id_gudang`,`vt`.`nama_gudang` AS `nama_gudang`,`vt`.`tanggal` AS `tanggal`,`vt`.`id_proses` AS `id_proses`,`vt`.`nama_proses` AS `nama_proses`,`vt`.`id_komposisi` AS `id_komposisi`,`vt`.`nama_komposisi` AS `nama_komposisi`,`vt`.`id_satuan` AS `id_satuan`,`vt`.`nama_satuan` AS `nama_satuan`,`vt`.`id_corak` AS `id_corak`,`vt`.`nama_corak` AS `nama_corak`,`vt`.`id_motif` AS `id_motif`,`vt`.`nama_motif` AS `nama_motif`,`vt`.`id_workorder` AS `id_workorder`,`vt`.`no_workorder` AS `no_workorder`,`vt`.`id_workorder_barang` AS `id_workorder_barang`,`vt`.`no_workorder_barang` AS `no_workorder_barang`,`vt`.`id_kualitas` AS `id_kualitas`,`vt`.`nama_kualitas` AS `nama_kualitas`,`vt`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vt`.`kualitas_dudul` AS `kualitas_dudul`,`vt`.`id_label` AS `id_label`,`vt`.`nama_label` AS `nama_label`,`vt`.`id_kemasan` AS `id_kemasan`,`vt`.`nama_kemasan` AS `nama_kemasan`,`vt`.`id_kemasansatuan` AS `id_kemasansatuan`,`vt`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vt`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vt`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vt`.`id_kemasanseratus` AS `id_kemasanseratus`,`vt`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vt`.`id_cap` AS `id_cap`,`vt`.`nama_cap` AS `nama_cap`,`vt`.`id_kualitas_proses` AS `id_kualitas_proses`,`vt`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vt`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vt`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vt`.`id_perubahansatuan` AS `id_perubahansatuan`,`vt`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vt`.`jumlah_rencana` AS `jumlah_rencana`,`vt`.`tanggal_full` AS `tanggal_full`,concat(`it`.`no_faktur`,`it`.`faktur`) AS `ket_1`,`vt`.`nama_gudang` AS `ket_2`,'Transfer Masuk' AS `ket_3`,'' AS `ket_4`,`vt`.`keterangan` AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`vt`.`keterangan` AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from ((`view_transfermasuk_all` `vt` join `inv_transfergudang` `it` on((`vt`.`id` = `it`.`id_transfergudang`))) left join `ms_warnakomposisi` `mk` on((`vt`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,`vp`.`jumlah` AS `jumlah`,`vp`.`masuk` AS `masuk`,`vp`.`keluar` AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,`vp`.`id_satuan` AS `id_satuan`,`vp`.`nama_satuan` AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,`vp`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Bon Bahan' AS `ket_3`,`mp`.`nama_proses` AS `ket_4`,'' AS `ket_5`,`vp`.`nilai_awal` AS `nilai_awal`,`vp`.`nilai_akhir` AS `nilai_akhir`,`vp`.`id_detail` AS `id_detail`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`pbb`.`keterangan` AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from ((((`view_keluar_all` `vp` left join `pro_barangkeluar_barang` `pbb` on((`vp`.`id_detail` = `pbb`.`id`))) join `pro_barangkeluar` `pb` on((`pbb`.`id_barangkeluar` = `pb`.`id_barangkeluar`))) join `ms_proses` `mp` on((`pb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mk` on((`pbb`.`warna` = `mk`.`id_komposisi`))) union all select `vm`.`id` AS `id`,`vm`.`id_barang` AS `id_barang`,`vm`.`kode_barang` AS `kode_barang`,`vm`.`nama_barang` AS `nama_barang`,`vm`.`jum_barang` AS `jumlah`,`vm`.`masuk` AS `masuk`,`vm`.`keluar` AS `keluar`,`vm`.`id_gudang` AS `id_gudang`,`vm`.`nama_gudang` AS `nama_gudang`,`vm`.`tanggal` AS `tanggal`,`vm`.`id_proses` AS `id_proses`,`vm`.`nama_proses` AS `nama_proses`,`vm`.`id_komposisi` AS `id_komposisi`,`vm`.`nama_komposisi` AS `nama_komposisi`,`vm`.`id_satuan` AS `id_satuan`,`vm`.`nama_satuan` AS `nama_satuan`,`vm`.`id_corak` AS `id_corak`,`vm`.`nama_corak` AS `nama_corak`,`vm`.`id_motif` AS `id_motif`,`vm`.`nama_motif` AS `nama_motif`,`vm`.`id_workorder` AS `id_workorder`,`vm`.`no_workorder` AS `no_workorder`,`vm`.`id_workorder_barang` AS `id_workorder_barang`,`vm`.`no_workorder_barang` AS `no_workorder_barang`,`vm`.`id_kualitas` AS `id_kualitas`,`vm`.`nama_kualitas` AS `nama_kualitas`,`vm`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vm`.`kualitas_dudul` AS `kualitas_dudul`,`vm`.`id_label` AS `id_label`,`vm`.`nama_label` AS `nama_label`,`vm`.`id_kemasan` AS `id_kemasan`,`vm`.`nama_kemasan` AS `nama_kemasan`,`vm`.`id_kemasansatuan` AS `id_kemasansatuan`,`vm`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vm`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vm`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vm`.`id_kemasanseratus` AS `id_kemasanseratus`,`vm`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vm`.`id_cap` AS `id_cap`,`vm`.`nama_cap` AS `nama_cap`,`vm`.`id_kualitas_proses` AS `id_kualitas_proses`,`vm`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vm`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vm`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vm`.`id_perubahansatuan` AS `id_perubahansatuan`,`vm`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vm`.`jumlah_rencana` AS `jumlah_rencana`,`vm`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Laporan Hasil' AS `ket_3`,`vm`.`nama_proses` AS `ket_4`,'' AS `ket_5`,`vm`.`nilai_awal` AS `nilai_awal`,`vm`.`nilai_akhir` AS `nilai_akhir`,`vm`.`id_detail` AS `id_detail`,`mk`.`id_komposisi` AS `id_warna`,`mk`.`nama` AS `nama_warna`,`mk`.`inisial` AS `inisial_warna`,`pbb`.`keterangan` AS `ket_proses`,`pbb`.`lebar` AS `lebar`,`pbb`.`panjang` AS `panjang`,`pbb`.`pick` AS `pick` from ((`view_masuk_all` `vm` left join `ms_warnakomposisi` `mk` on((`vm`.`id_komposisi` = `mk`.`id_komposisi`))) left join `pro_barangmasuk_barang` `pbb` on((`vm`.`id_detail` = `pbb`.`id`))) union all select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,`vp`.`jumlah` AS `jumlah`,`vp`.`masuk` AS `masuk`,`vp`.`keluar` AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,`vp`.`id_satuan` AS `id_satuan`,`vp`.`nama_satuan` AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,`vp`.`tanggal_full` AS `tanggal_full`,concat(`pp`.`no_faktur`,`pp`.`sufix_no_faktur`) AS `ket_1`,`mp`.`nama` AS `ket_2`,'Penjualan' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from ((`view_penjualan` `vp` join `pen_penjualan` `pp` on((`vp`.`id` = `pp`.`id_penjualan`))) join `ms_pelanggan` `mp` on((`pp`.`id_pelanggan` = `mp`.`id_pelanggan`))) union all select `vo`.`id` AS `id`,`vo`.`id_barang` AS `id_barang`,`vo`.`kode_barang` AS `kode_barang`,`vo`.`nama_barang` AS `nama_barang`,`vo`.`jumlah` AS `jumlah`,`vo`.`masuk` AS `masuk`,`vo`.`keluar` AS `keluar`,`vo`.`id_gudang` AS `id_gudang`,`vo`.`nama_gudang` AS `nama_gudang`,`vo`.`tanggal` AS `tanggal`,`vo`.`id_proses` AS `id_proses`,`vo`.`nama_proses` AS `nama_proses`,`vo`.`id_komposisi` AS `id_komposisi`,`vo`.`nama_komposisi` AS `nama_komposisi`,`vo`.`id_satuan` AS `id_satuan`,`vo`.`nama_satuan` AS `nama_satuan`,`vo`.`id_corak` AS `id_corak`,`vo`.`nama_corak` AS `nama_corak`,`vo`.`id_motif` AS `id_motif`,`vo`.`nama_motif` AS `nama_motif`,`vo`.`id_workorder` AS `id_workorder`,`vo`.`no_workorder` AS `no_workorder`,`vo`.`id_workorder_barang` AS `id_workorder_barang`,`vo`.`no_workorder_barang` AS `no_workorder_barang`,`vo`.`id_kualitas` AS `id_kualitas`,`vo`.`nama_kualitas` AS `nama_kualitas`,`vo`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vo`.`kualitas_dudul` AS `kualitas_dudul`,`vo`.`id_label` AS `id_label`,`vo`.`nama_label` AS `nama_label`,`vo`.`id_kemasan` AS `id_kemasan`,`vo`.`nama_kemasan` AS `nama_kemasan`,`vo`.`id_kemasansatuan` AS `id_kemasansatuan`,`vo`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vo`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vo`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vo`.`id_kemasanseratus` AS `id_kemasanseratus`,`vo`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vo`.`id_cap` AS `id_cap`,`vo`.`nama_cap` AS `nama_cap`,`vo`.`id_kualitas_proses` AS `id_kualitas_proses`,`vo`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vo`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vo`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vo`.`id_perubahansatuan` AS `id_perubahansatuan`,`vo`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vo`.`jumlah_rencana` AS `jumlah_rencana`,`vo`.`tanggal_full` AS `tanggal_full`,`io`.`keterangan` AS `ket_1`,`vo`.`nama_gudang` AS `ket_2`,'Stok Opname' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vo`.`id_komposisi`) or (`vo`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vo`.`id_komposisi`) or (`vo`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vo`.`id_komposisi`) or (`vo`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,'' AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from ((`view_opname` `vo` join `inv_opname` `io` on((`vo`.`id` = `io`.`id_opname`))) left join `ms_warnakomposisi` `mk` on((`vo`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `vk`.`id` AS `id`,`vk`.`id_barang` AS `id_barang`,`vk`.`kode_barang` AS `kode_barang`,`vk`.`nama_barang` AS `nama_barang`,`vk`.`jumlah` AS `jumlah`,`vk`.`masuk` AS `masuk`,`vk`.`keluar` AS `keluar`,`vk`.`id_gudang` AS `id_gudang`,`vk`.`nama_gudang` AS `nama_gudang`,`vk`.`tanggal` AS `tanggal`,`vk`.`id_proses` AS `id_proses`,`vk`.`nama_proses` AS `nama_proses`,`vk`.`id_komposisi` AS `id_komposisi`,`vk`.`nama_komposisi` AS `nama_komposisi`,`vk`.`id_satuan` AS `id_satuan`,`vk`.`nama_satuan` AS `nama_satuan`,`vk`.`id_corak` AS `id_corak`,`vk`.`nama_corak` AS `nama_corak`,`vk`.`id_motif` AS `id_motif`,`vk`.`nama_motif` AS `nama_motif`,`vk`.`id_workorder` AS `id_workorder`,`vk`.`no_workorder` AS `no_workorder`,`vk`.`id_workorder_barang` AS `id_workorder_barang`,`vk`.`no_workorder_barang` AS `no_workorder_barang`,`vk`.`id_kualitas` AS `id_kualitas`,`vk`.`nama_kualitas` AS `nama_kualitas`,`vk`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vk`.`kualitas_dudul` AS `kualitas_dudul`,`vk`.`id_label` AS `id_label`,`vk`.`nama_label` AS `nama_label`,`vk`.`id_kemasan` AS `id_kemasan`,`vk`.`nama_kemasan` AS `nama_kemasan`,`vk`.`id_kemasansatuan` AS `id_kemasansatuan`,`vk`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vk`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vk`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vk`.`id_kemasanseratus` AS `id_kemasanseratus`,`vk`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vk`.`id_cap` AS `id_cap`,`vk`.`nama_cap` AS `nama_cap`,`vk`.`id_kualitas_proses` AS `id_kualitas_proses`,`vk`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vk`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vk`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vk`.`id_perubahansatuan` AS `id_perubahansatuan`,`vk`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vk`.`jumlah_rencana` AS `jumlah_rencana`,`vk`.`tanggal_full` AS `tanggal_full`,concat(`pbk`.`noAuto`,`pbk`.`noAuto_ext`) AS `ket_1`,(case when isnull(`mp`.`nama_pegawai`) then concat(`mr`.`nama`,'( Rekanan )') else concat(`mp`.`nama_pegawai`,'( Pegawai )') end) AS `ket_2`,'Bon Bahan Multi' AS `ket_3`,`mpr`.`nama_proses` AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from ((((`view_keluarkemasan` `vk` join `pro_barangkeluar_kemasan` `pbk` on((`vk`.`id` = `pbk`.`id_barangkeluar_kemasan`))) left join `ms_pegawai` `mp` on((`pbk`.`id_pegawai` = `mp`.`id_pegawai`))) left join `ms_rekanan` `mr` on((`pbk`.`id_rekanan` = `mr`.`id_rekanan`))) left join `ms_proses` `mpr` on((`pbk`.`id_proses` = `mpr`.`id_proses`))) union all select `vm`.`id` AS `id`,`vm`.`id_barang` AS `id_barang`,`vm`.`kode_barang` AS `kode_barang`,`vm`.`nama_barang` AS `nama_barang`,`vm`.`jumlah` AS `jumlah`,`vm`.`masuk` AS `masuk`,`vm`.`keluar` AS `keluar`,`vm`.`id_gudang` AS `id_gudang`,`vm`.`nama_gudang` AS `nama_gudang`,`vm`.`tanggal` AS `tanggal`,`vm`.`id_proses` AS `id_proses`,`vm`.`nama_proses` AS `nama_proses`,`vm`.`id_komposisi` AS `id_komposisi`,`vm`.`nama_komposisi` AS `nama_komposisi`,`vm`.`id_satuan` AS `id_satuan`,`vm`.`nama_satuan` AS `nama_satuan`,`vm`.`id_corak` AS `id_corak`,`vm`.`nama_corak` AS `nama_corak`,`vm`.`id_motif` AS `id_motif`,`vm`.`nama_motif` AS `nama_motif`,`vm`.`id_workorder` AS `id_workorder`,`vm`.`no_workorder` AS `no_workorder`,`vm`.`id_workorder_barang` AS `id_workorder_barang`,`vm`.`no_workorder_barang` AS `no_workorder_barang`,`vm`.`id_kualitas` AS `id_kualitas`,`vm`.`nama_kualitas` AS `nama_kualitas`,`vm`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vm`.`kualitas_dudul` AS `kualitas_dudul`,`vm`.`id_label` AS `id_label`,`vm`.`nama_label` AS `nama_label`,`vm`.`id_kemasan` AS `id_kemasan`,`vm`.`nama_kemasan` AS `nama_kemasan`,`vm`.`id_kemasansatuan` AS `id_kemasansatuan`,`vm`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vm`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vm`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vm`.`id_kemasanseratus` AS `id_kemasanseratus`,`vm`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vm`.`id_cap` AS `id_cap`,`vm`.`nama_cap` AS `nama_cap`,`vm`.`id_kualitas_proses` AS `id_kualitas_proses`,`vm`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vm`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vm`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vm`.`id_perubahansatuan` AS `id_perubahansatuan`,`vm`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vm`.`jumlah_rencana` AS `jumlah_rencana`,`vm`.`tanggal_full` AS `tanggal_full`,concat(`pbm`.`noAuto`,`pbm`.`noAuto_ext`) AS `ket_1`,(case when isnull(`mp`.`nama_pegawai`) then concat(`mr`.`nama`,'( Rekanan )') else concat(`mp`.`nama_pegawai`,'( Pegawai )') end) AS `ket_2`,'Laporan Hasil Multi' AS `ket_3`,`mpr`.`nama_proses` AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from (((((`view_masukkemasan` `vm` join `pro_barangmasuk_kemasan` `pbm` on((`vm`.`id` = `pbm`.`id_barangmasuk_kemasan`))) join `pro_barangkeluar_kemasan` `pbk` on((`pbm`.`id_barangkeluar_kemasan` = `pbk`.`id_barangkeluar_kemasan`))) left join `ms_pegawai` `mp` on((`pbk`.`id_pegawai` = `mp`.`id_pegawai`))) left join `ms_rekanan` `mr` on((`pbk`.`id_rekanan` = `mr`.`id_rekanan`))) left join `ms_proses` `mpr` on((`pbk`.`id_proses` = `mpr`.`id_proses`))) union all select `vke`.`id` AS `id`,`vke`.`id_barang` AS `id_barang`,`vke`.`kode_barang` AS `kode_barang`,`vke`.`nama_barang` AS `nama_barang`,`vke`.`jumlah` AS `jumlah`,`vke`.`masuk` AS `masuk`,`vke`.`keluar` AS `keluar`,`vke`.`id_gudang` AS `id_gudang`,`vke`.`nama_gudang` AS `nama_gudang`,`vke`.`tanggal` AS `tanggal`,`vke`.`id_proses` AS `id_proses`,`vke`.`nama_proses` AS `nama_proses`,`vke`.`id_komposisi` AS `id_komposisi`,`vke`.`nama_komposisi` AS `nama_komposisi`,`vke`.`id_satuan` AS `id_satuan`,`vke`.`nama_satuan` AS `nama_satuan`,`vke`.`id_corak` AS `id_corak`,`vke`.`nama_corak` AS `nama_corak`,`vke`.`id_motif` AS `id_motif`,`vke`.`nama_motif` AS `nama_motif`,`vke`.`id_workorder` AS `id_workorder`,`vke`.`no_workorder` AS `no_workorder`,`vke`.`id_workorder_barang` AS `id_workorder_barang`,`vke`.`no_workorder_barang` AS `no_workorder_barang`,`vke`.`id_kualitas` AS `id_kualitas`,`vke`.`nama_kualitas` AS `nama_kualitas`,`vke`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vke`.`nama_kualitas_dudul` AS `nama_kualitas_dudul`,`vke`.`id_label` AS `id_label`,`vke`.`nama_label` AS `nama_label`,`vke`.`id_kemasan` AS `id_kemasan`,`vke`.`nama_kemasan` AS `nama_kemasan`,`vke`.`id_kemasansatuan` AS `id_kemasansatuan`,`vke`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vke`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vke`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vke`.`id_kemasanseratus` AS `id_kemasanseratus`,`vke`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vke`.`id_cap` AS `id_cap`,`vke`.`nama_cap` AS `nama_cap`,`vke`.`id_kualitas_proses` AS `id_kualitas_proses`,`vke`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vke`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vke`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vke`.`id_perubahansatuan` AS `id_perubahansatuan`,`vke`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vke`.`jumlah_rencana` AS `jumlah_rencana`,`vke`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Pengembalian Barang' AS `ket_3`,`vke`.`nama_proses` AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vke`.`id_komposisi`) or (`vke`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vke`.`id_komposisi`) or (`vke`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vke`.`id_komposisi`) or (`vke`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,'' AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from ((`view_kembali` `vke` join `pro_kembali` `pk` on((`vke`.`id` = `pk`.`id_kembali`))) left join `ms_warnakomposisi` `mk` on((`vke`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `v`.`id` AS `id`,`v`.`id_barang` AS `id_barang`,`v`.`kode_barang` AS `kode_barang`,`v`.`nama_barang` AS `nama_barang`,`v`.`jumlah` AS `jumlah`,`v`.`masuk` AS `masuk`,`v`.`keluar` AS `keluar`,`v`.`id_gudang` AS `id_gudang`,`v`.`nama_gudang` AS `nama_gudang`,`v`.`tanggal` AS `tanggal`,`v`.`id_proses` AS `id_proses`,`v`.`nama_proses` AS `nama_proses`,`v`.`id_komposisi` AS `id_komposisi`,`v`.`nama_komposisi` AS `nama_komposisi`,`v`.`id_satuan` AS `id_satuan`,`v`.`nama_satuan` AS `nama_satuan`,`v`.`id_corak` AS `id_corak`,`v`.`nama_corak` AS `nama_corak`,`v`.`id_motif` AS `id_motif`,`v`.`nama_motif` AS `nama_motif`,`v`.`id_workorder` AS `id_workorder`,`v`.`no_workorder` AS `no_workorder`,`v`.`id_workorder_barang` AS `id_workorder_barang`,`v`.`no_workorder_barang` AS `no_workorder_barang`,`v`.`id_kualitas` AS `id_kualitas`,`v`.`nama_kualitas` AS `nama_kualitas`,`v`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`v`.`kualitas_dudul` AS `kualitas_dudul`,`v`.`id_label` AS `id_label`,`v`.`nama_label` AS `nama_label`,`v`.`id_kemasan` AS `id_kemasan`,`v`.`nama_kemasan` AS `nama_kemasan`,`v`.`id_kemasansatuan` AS `id_kemasansatuan`,`v`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`v`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`v`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`v`.`id_kemasanseratus` AS `id_kemasanseratus`,`v`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`v`.`id_cap` AS `id_cap`,`v`.`nama_cap` AS `nama_cap`,`v`.`id_kualitas_proses` AS `id_kualitas_proses`,`v`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`v`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`v`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`v`.`id_perubahansatuan` AS `id_perubahansatuan`,`v`.`nama_perubahan_satuan` AS `nama_perubahan_satuan`,`v`.`jumlah_rencana` AS `jumlah_rencana`,`v`.`tanggal_full` AS `tanggal_full`,`ip`.`keterangan` AS `ket_1`,'' AS `ket_2`,'Penggunaan Barang' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses`,'0' AS `lebar`,'0' AS `panjang`,'0' AS `pick` from (`view_penggunaanbarang` `v` join `inv_pengeluaran` `ip` on((`v`.`id` = `ip`.`id_pengeluaran`)));

-- membuang struktur untuk view si_sarung.view_opname
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_opname`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_opname` AS select `view_opname_sub`.`id` AS `id`,`view_opname_sub`.`id_barang` AS `id_barang`,`view_opname_sub`.`kode_barang` AS `kode_barang`,`view_opname_sub`.`nama_barang` AS `nama_barang`,(`view_opname_sub`.`jumlah` * (`view_opname_sub`.`nilai_akhir` / `view_opname_sub`.`nilai_awal`)) AS `jumlah`,(`view_opname_sub`.`masuk` * (`view_opname_sub`.`nilai_akhir` / `view_opname_sub`.`nilai_awal`)) AS `masuk`,(`view_opname_sub`.`keluar` * (`view_opname_sub`.`nilai_akhir` / `view_opname_sub`.`nilai_awal`)) AS `keluar`,`view_opname_sub`.`id_gudang` AS `id_gudang`,`view_opname_sub`.`nama_gudang` AS `nama_gudang`,`view_opname_sub`.`tanggal` AS `tanggal`,`view_opname_sub`.`id_proses` AS `id_proses`,`view_opname_sub`.`nama_proses` AS `nama_proses`,`view_opname_sub`.`id_komposisi` AS `id_komposisi`,`view_opname_sub`.`nama_komposisi` AS `nama_komposisi`,`view_opname_sub`.`id_satuan` AS `id_satuan`,`view_opname_sub`.`nama_satuan` AS `nama_satuan`,`view_opname_sub`.`id_corak` AS `id_corak`,`view_opname_sub`.`nama_corak` AS `nama_corak`,`view_opname_sub`.`id_motif` AS `id_motif`,`view_opname_sub`.`nama_motif` AS `nama_motif`,`view_opname_sub`.`id_workorder` AS `id_workorder`,`view_opname_sub`.`no_workorder` AS `no_workorder`,`view_opname_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_opname_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_opname_sub`.`id_kualitas` AS `id_kualitas`,`view_opname_sub`.`nama_kualitas` AS `nama_kualitas`,`view_opname_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_opname_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_opname_sub`.`id_label` AS `id_label`,`view_opname_sub`.`nama_label` AS `nama_label`,`view_opname_sub`.`id_kemasan` AS `id_kemasan`,`view_opname_sub`.`nama_kemasan` AS `nama_kemasan`,`view_opname_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_opname_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_opname_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_opname_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_opname_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_opname_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_opname_sub`.`id_cap` AS `id_cap`,`view_opname_sub`.`nama_cap` AS `nama_cap`,`view_opname_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_opname_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_opname_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_opname_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_opname_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_opname_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_opname_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_opname_sub`.`tanggal_full` AS `tanggal_full` from `view_opname_sub`;

-- membuang struktur untuk view si_sarung.view_opnameproduksi
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_opnameproduksi`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_opnameproduksi` AS select `ip`.`id_opname` AS `id`,(case when (`iob`.`id_proses_sekarang` = 37) then '' else `mb`.`id` end) AS `id_barang`,(case when (`iob`.`id_proses_sekarang` = 37) then '' else `mb`.`kode_barang` end) AS `kode_barang`,(case when (`iob`.`id_proses_sekarang` = 37) then '' else `mb`.`nama_barang` end) AS `nama_barang`,abs((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`)) AS `jumlah`,(case when ((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`) < 0) then abs((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`)) else 0 end) AS `masuk`,(case when ((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`) > 0) then abs((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`)) else 0 end) AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,date_format(`ip`.`tanggal_full`,'%Y-%m-%d') AS `tanggal`,(case when isnull(`mp`.`id_proses`) then '' when (`iob`.`id_proses_sekarang` = '37') then `iob`.`id_proses_sekarang` else `mp`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`id_proses`) then '' when (`iob`.`id_proses_sekarang` = '37') then `mp2`.`nama_proses` else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`nama` end) AS `nama_komposisi`,(case when ((`iob`.`id_proses_sekarang` = 37) and (`ms2`.`id_satuan` is not null)) then `ms2`.`id_satuan` else `ms`.`id_satuan` end) AS `id_satuan`,(case when ((`iob`.`id_proses_sekarang` = 37) and (`ms2`.`id_satuan` is not null)) then `ms2`.`nama_satuan` else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when isnull(`pw`.`id_workorder`) then '' else `pw`.`id_workorder` end) AS `id_workorder`,(case when isnull(`pw`.`id_workorder`) then '' else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when isnull(`mk2`.`id_kualitas`) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_dudul`,(case when isnull(`mk2`.`id_kualitas`) then '' else `mk2`.`id_kualitas` end) AS `kualitas_dudul`,(case when isnull(`mb2`.`id`) then '' else `mb2`.`id` end) AS `id_label`,(case when isnull(`mb2`.`id`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when isnull(`mb3`.`id`) then '' else `mb3`.`id` end) AS `id_kemasan`,(case when isnull(`mb3`.`id`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when isnull(`mb4`.`id`) then '' else `mb4`.`id` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`id`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when isnull(`mb5`.`id`) then '' else `mb5`.`id` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`id`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when isnull(`mb6`.`id`) then '' else `mb6`.`id` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`id`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when isnull(`mb7`.`id`) then '' else `mb7`.`id` end) AS `id_cap`,(case when isnull(`mb7`.`id`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when isnull(`mk3`.`id_kualitas`) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_proses`,(case when isnull(`mk3`.`id_kualitas`) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when isnull(`mk4`.`id_kualitas`) then '' else `mk4`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when isnull(`mk4`.`id_kualitas`) then '' else `mk4`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when (isnull(`ms2`.`id_satuan`) or (`iob`.`id_proses_sekarang` = '37')) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when (isnull(`ms2`.`id_satuan`) or (`iob`.`id_proses_sekarang` = '37')) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when ((`iob`.`jumlah_rencana` <> 0) and (`iob`.`id_proses_sekarang` <> 37)) then `iob`.`jumlah_rencana` else '' end) AS `jumlah_rencana`,'' AS `ket_1`,'' AS `ket_2`,'Opname' AS `ket_3`,(case when isnull(`mp2`.`id_proses`) then '' else `mp2`.`nama_proses` end) AS `ket_4`,'' AS `ket_5`,1 AS `nilai_awal`,1 AS `nilai_akhir`,`iob`.`id_opnameproduksi_barang` AS `id_detail`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`id_komposisi` end) AS `id_warna`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`nama` end) AS `nama_warna`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`inisial` end) AS `inisial_warna`,`iob`.`keterangan` AS `ket_proses`,(case when isnull(`mp2`.`id_proses`) then '' else `mp2`.`id_proses` end) AS `id_proses_sekarang`,(case when isnull(`mp2`.`id_proses`) then '' else `mp2`.`nama_proses` end) AS `nama_proses_sekarang`,`ip`.`tanggal_full` AS `tanggal_full`,(case when isnull(`mkb2`.`id_kb`) then '' else `mkb2`.`id_kb` end) AS `id_kategori`,(case when isnull(`mkb2`.`id_kb`) then '' else `mkb2`.`nama` end) AS `nama_kategori`,(case when isnull(`mkb`.`id_kb`) then '' else `mkb`.`id_kb` end) AS `id_subkategori`,(case when isnull(`mkb`.`id_kb`) then '' else `mkb`.`nama` end) AS `nama_subkategori`,(case when isnull(`mlp`.`id_lokasi`) then '' else `mlp`.`id_lokasi` end) AS `id_lokasi`,(case when isnull(`mlp`.`id_lokasi`) then '' else `mlp`.`nama_lokasi` end) AS `nama_lokasi`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`id_pegawai` end) AS `id_pegawai`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`nama_pegawai` end) AS `nama_pegawai`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`id_rekanan` end) AS `id_rekanan`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`nama` end) AS `nama_rekanan`,(case when isnull(`mmes`.`id_mesin`) then '' else `mmes`.`id_mesin` end) AS `id_mesin`,(case when isnull(`mmes`.`id_mesin`) then '' else `mmes`.`nama` end) AS `nama_mesin` from ((((((((((((((((((((((((((((`inv_opnameproduksi` `ip` join `inv_opnameproduksi_barang` `iob` on((`ip`.`id_opname` = `iob`.`id_opname`))) left join `ms_barang` `mb` on((`iob`.`id_barang` = `mb`.`id`))) left join `ms_gudang` `mg` on((`mg`.`id_gudang` = `iob`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `iob`.`id_proses`))) left join `ms_warnakomposisi` `mw` on((`mw`.`id_komposisi` = `iob`.`id_komposisi`))) left join `ms_satuan` `ms` on((`ms`.`id_satuan` = `iob`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`mmb`.`id_motif_barang` = `iob`.`id_motif_barang`))) left join `ms_motif` `mm` on((`mm`.`id_motif` = `iob`.`id_motif`))) left join `pem_workorder` `pw` on((`pw`.`id_workorder` = `iob`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pwb`.`id_workorder_barang` = `iob`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`mk`.`id_kualitas` = `iob`.`id_kualitas`))) left join `ms_kualitas` `mk2` on((`mk2`.`id_kualitas` = `iob`.`id_kualitas_dudul`))) left join `ms_barang` `mb2` on((`mb2`.`id` = `iob`.`id_label`))) left join `ms_barang` `mb3` on((`mb3`.`id` = `iob`.`id_kemasan`))) left join `ms_barang` `mb4` on((`mb4`.`id` = `iob`.`id_kemasansatuan`))) left join `ms_barang` `mb5` on((`mb5`.`id` = `iob`.`id_kemasansepuluh`))) left join `ms_barang` `mb6` on((`mb6`.`id` = `iob`.`id_kemasanseratus`))) left join `ms_barang` `mb7` on((`mb7`.`id` = `iob`.`id_cap`))) left join `ms_kualitas` `mk3` on((`mk3`.`id_kualitas` = `iob`.`id_kualitas_proses`))) left join `ms_kualitas` `mk4` on((`mk4`.`id_kualitas` = `iob`.`id_kualitas_periksa`))) left join `ms_satuan` `ms2` on((`ms2`.`id_satuan` = `iob`.`id_perubahansatuan`))) left join `ms_proses` `mp2` on((`mp2`.`id_proses` = `iob`.`id_proses_sekarang`))) left join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) left join `ms_kategori_barang` `mkb2` on((`mkb2`.`id_kb` = `mkb`.`induk_kb`))) left join `ms_lokasi_produksi` `mlp` on((`mlp`.`id_lokasi` = `ip`.`id_lokasi`))) left join `ms_pegawai` `mpg` on((`iob`.`id_pegawai` = `mpg`.`id_pegawai`))) left join `ms_rekanan` `mpr` on((`iob`.`id_rekanan` = `mpr`.`id_rekanan`))) left join `ms_mesin` `mmes` on((`iob`.`id_mesin` = `mmes`.`id_mesin`)));

-- membuang struktur untuk view si_sarung.view_opname_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_opname_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_opname_sub` AS select `io`.`id_opname` AS `id`,`iob`.`id_barang` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,sum((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`)) AS `jumlah`,(case when (sum((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`)) > 0) then abs(sum((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`))) else 0 end) AS `masuk`,(case when (sum((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`)) < 0) then abs(sum((`iob`.`jumlah_opname` - `iob`.`jumlah_stok`))) else 0 end) AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`io`.`tanggal` AS `tanggal`,(case when (`iob`.`id_proses` = 0) then '' else `iob`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`iob`.`id_kualitas` = 0) then '' else `iob`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`iob`.`id_kualitas_dudul` = 0) then '' else `iob`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`iob`.`id_kualitas_dudul` = 0) then '' when (`iob`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`iob`.`id_label` = 0) then '' else `iob`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`iob`.`id_kemasan` = 0) then '' else `iob`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`iob`.`id_kemasansatuan` = 0) then '' else `iob`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`iob`.`id_kemasansepuluh` = 0) then '' else `iob`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`iob`.`id_kemasanseratus` = 0) then '' else `iob`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`iob`.`id_cap` = 0) then '' else `iob`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`iob`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`iob`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`iob`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`iob`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`iob`.`jumlah_rencana`) or (`iob`.`jumlah_rencana` = 0)) then '' else `iob`.`jumlah_rencana` end) AS `jumlah_rencana`,`io`.`tanggal_full` AS `tanggal_full` from ((((((((((((((((((((`inv_opname` `io` join `inv_opname_barang` `iob` on((`io`.`id_opname` = `iob`.`id_opname`))) join `ms_barang` `mb` on((`iob`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`io`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `iob`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`iob`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`iob`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`iob`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`iob`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`iob`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`iob`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`iob`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`iob`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`iob`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`iob`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`iob`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`iob`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`iob`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`iob`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`iob`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`iob`.`id_perubahansatuan` = `ms2`.`id_satuan`))) group by `iob`.`id_opname_barang`;

-- membuang struktur untuk view si_sarung.view_orderbeli
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_orderbeli`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_orderbeli` AS select `po`.`no_faktur` AS `no_faktur`,`po`.`sufix_no_order` AS `sufix_no_order`,`po`.`id_penyedia` AS `id_penyedia`,`po`.`termasuk_pajak` AS `termasuk_pajak`,`mp`.`nama` AS `nama`,`pob`.`id_orderbeli_barang` AS `id_orderbeli_barang`,`pob`.`id_barang` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,(case when (`po`.`termasuk_pajak` = 1) then ((100 * `pob`.`harga_satuan`) / 110) else `pob`.`harga_satuan` end) AS `harga_satuan`,(case when (`po`.`termasuk_pajak` = 1) then ((10 * `pob`.`harga_satuan`) / 110) else 0 end) AS `nilai_ppn`,`ms`.`id_satuan` AS `id_satuan`,`ms`.`nama_satuan` AS `nama_satuan`,`pob`.`jml_barang` AS `beli`,0 AS `ambil` from ((((`pem_orderbeli` `po` join `pem_orderbeli_barang` `pob` on((`po`.`id_orderbeli` = `pob`.`id_orderbeli`))) join `ms_barang` `mb` on((`pob`.`id_barang` = `mb`.`id`))) join `ms_penyedia` `mp` on((`po`.`id_penyedia` = `mp`.`id_penyedia`))) join `ms_satuan` `ms` on((`pob`.`id_satuan` = `ms`.`id_satuan`))) union select `pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,`pp`.`termasuk_pajak` AS `termasuk_pajak`,`mp`.`id_penyedia` AS `id_penyedia`,`mp`.`nama` AS `nama`,`ppb`.`id_orderbeli_barang` AS `id_orderbeli_barang`,`ppb`.`id_barang` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`ppb`.`harga_satuan` AS `harga_satuan`,0 AS `nilai_ppn`,`ms`.`id_satuan` AS `id_satuan`,`ms`.`nama_satuan` AS `nama_satuan`,0 AS `beli`,`ppb`.`jml_barang` AS `ambil` from ((((`pem_pembelian` `pp` join `pem_pembelian_barang` `ppb` on((`pp`.`id_pembelian` = `ppb`.`id_pembelian`))) join `ms_penyedia` `mp` on((`pp`.`id_penyedia` = `mp`.`id_penyedia`))) join `ms_barang` `mb` on((`ppb`.`id_barang` = `mb`.`id`))) join `ms_satuan` `ms` on((`ppb`.`id_satuan` = `ms`.`id_satuan`))) where (`ppb`.`id_orderbeli_barang` <> '0');

-- membuang struktur untuk view si_sarung.view_orderbeli_2
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_orderbeli_2`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_orderbeli_2` AS select `pp`.`id_orderbeli` AS `id_orderbeli`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_order` AS `sufix_no_order`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_penyedia` AS `id_penyedia`,`pp`.`potongan` AS `potongan`,`pp`.`termasuk_pajak` AS `termasuk_pajak`,`pp`.`pajak` AS `pajak`,`pp`.`nominal_ongkir` AS `nominal_ongkir`,`pp`.`status` AS `status`,`pp`.`keterangan` AS `keterangan`,`pp`.`keterangan_revisi` AS `keterangan_revisi`,`pp`.`syarat_bayar` AS `syarat_bayar`,`pp`.`tempat_serah` AS `tempat_serah`,`pp`.`tanggal_serah` AS `tanggal_serah`,`pp`.`penerima` AS `penerima`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,`pp`.`nominal_total` AS `nominal_total`,`pp`.`nominal_pajak_detail` AS `nominal_pajak_detail`,`pp`.`nominal_pajak` AS `nominal_pajak`,`pp`.`data_lokasi` AS `data_lokasi`,((`pp`.`nominal_total` + `pp`.`nominal_pajak`) - `pp`.`potongan`) AS `nominal_netto`,`mp`.`nama` AS `nama_penyedia`,`mp`.`pic` AS `pic`,`t`.`nama` AS `tempat_penyerahan`,`t`.`alamat` AS `alamat`,`mlp`.`nama_lokasi` AS `nama_lokasi` from (((`a_pem_orderbeli` `pp` join `ms_penyedia` `mp` on((`mp`.`id_penyedia` = `pp`.`id_penyedia`))) join `ms_tempat_penyerahan` `t` on((`t`.`id` = `pp`.`tempat_serah`))) left join `ms_lokasi_produksi` `mlp` on((`t`.`id_lokasi` = `mlp`.`id_lokasi`))) group by `pp`.`id_orderbeli`;

-- membuang struktur untuk view si_sarung.view_orderbeli_barang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_orderbeli_barang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_orderbeli_barang` AS select `po`.`id_orderbeli` AS `id_orderbeli`,`po`.`no_faktur` AS `no_faktur`,`po`.`sufix_no_order` AS `sufix_no_order`,`po`.`id_penyedia` AS `id_penyedia`,`po`.`keterangan_revisi` AS `keterangan_revisi`,`mp`.`nama` AS `nama`,`pob`.`id_orderbeli_barang` AS `id_orderbeli_barang`,`pob`.`id_barang` AS `id_barang`,`pob`.`keterangan_revisi_brg` AS `keterangan_revisi_brg`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,(case when (`po`.`termasuk_pajak` = 1) then ((100 * `pob`.`harga_satuan`) / 110) else `pob`.`harga_satuan` end) AS `harga_satuan`,(case when (`po`.`termasuk_pajak` = 1) then ((10 * `pob`.`harga_satuan`) / 110) when ((`po`.`termasuk_pajak` = 0) and (`po`.`pajak` = 1)) then ((10 * `pob`.`harga_satuan`) / 100) else 0 end) AS `nilai_ppn`,`ms`.`nama_satuan` AS `nama_satuan`,`pob`.`jml_barang` AS `jml_barang`,`pob`.`jml_barang_konv` AS `jml_barang_konv` from ((((`pem_orderbeli` `po` join `pem_orderbeli_barang` `pob` on((`po`.`id_orderbeli` = `pob`.`id_orderbeli`))) join `ms_barang` `mb` on((`pob`.`id_barang` = `mb`.`id`))) join `ms_penyedia` `mp` on((`po`.`id_penyedia` = `mp`.`id_penyedia`))) join `ms_satuan` `ms` on((`pob`.`id_satuan` = `ms`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_orderbeli_barang_st_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_orderbeli_barang_st_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_orderbeli_barang_st_bayar` AS select `opb`.`id_orderbeli` AS `id_orderbeli`,`opb`.`no_faktur` AS `no_faktur`,`opb`.`sufix_no_order` AS `sufix_no_order`,`opb`.`id_penyedia` AS `id_penyedia`,`opb`.`nama` AS `nama`,`opb`.`id_orderbeli_barang` AS `id_orderbeli_barang`,`opb`.`id_barang` AS `id_barang`,`opb`.`kode_barang` AS `kode_barang`,`opb`.`nama_barang` AS `nama_barang`,`opb`.`harga_satuan` AS `harga_satuan`,`opb`.`nilai_ppn` AS `nilai_ppn`,`opb`.`nama_satuan` AS `nama_satuan`,`opb`.`jml_barang` AS `jml_barang`,`opb`.`jml_barang_konv` AS `jml_barang_konv`,`mkb`.`id_kelompok` AS `id_kelompok`,`mkb2`.`id_kb` AS `id_kategori`,`mkb2`.`nama` AS `kategori`,`mkb`.`id_kb` AS `id_sub_kategori`,`mkb`.`nama` AS `sub_kategori`,`ms`.`satuan` AS `satuan`,`p`.`nominal_netto` AS `nominal_netto`,`p`.`total_bayar` AS `total_bayar` from (((((((`view_orderbeli_barang` `opb` join `ms_barang` `mb` on((`opb`.`id_barang` = `mb`.`id`))) join `ms_satuan` `ms` on((`mb`.`id_satuan` = `ms`.`id_satuan`))) join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`))) join `pem_orderbeli` `op` on((`op`.`id_orderbeli` = `opb`.`id_orderbeli`))) left join `pem_pembelian_barang` `pb` on((`pb`.`id_orderbeli_barang` = `opb`.`id_orderbeli_barang`))) left join `view_pembelian2` `p` on((`p`.`id_pembelian` = `pb`.`id_pembelian`))) order by `opb`.`id_orderbeli_barang`;

-- membuang struktur untuk view si_sarung.view_orderservice_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_orderservice_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_orderservice_bayar` AS select `s`.`id` AS `id`,`s`.`lokasi` AS `lokasi`,`s`.`user_id_create` AS `user_id_create`,`s`.`user_id_update` AS `user_id_update`,`s`.`cv` AS `cv`,`s`.`no_nota` AS `no_nota`,`s`.`sufix_no_nota` AS `sufix_no_nota`,concat(`s`.`no_nota`,`s`.`sufix_no_nota`) AS `nomor_nota`,`s`.`tanggal` AS `tanggal`,`s`.`tanggal_nota` AS `tanggal_nota`,`s`.`id_penyedia` AS `id_penyedia`,`s`.`no_faktur_pajak` AS `no_faktur_pajak`,`s`.`keterangan` AS `keterangan`,`s`.`id_akun_hutang` AS `id_akun_hutang`,`s`.`created_at` AS `created_at`,`s`.`updated_at` AS `updated_at`,ifnull(`d`.`sub_total`,0) AS `nominal_total`,ifnull(`p`.`nominal_pajak`,0) AS `nominal_pajak`,(ifnull(`d`.`sub_total`,0) + ifnull(`p`.`nominal_pajak`,0)) AS `nominal_netto`,sum(ifnull(`b`.`jum_bayar`,0)) AS `nominal_bayar`,`sup`.`nama` AS `nama_penyedia`,`sup`.`pic` AS `pic` from ((((`serv_orderservice` `s` left join `a_total_serv_orderservice_detail` `d` on((`d`.`id_nota` = `s`.`id`))) left join `a_total_serv_orderservice_pajak` `p` on((`p`.`id_nota` = `s`.`id`))) left join `serv_orderservice_bayar` `b` on((`b`.`id_orderservice` = `s`.`id`))) join `ms_penyedia` `sup` on((`sup`.`id_penyedia` = `s`.`id_penyedia`))) group by `s`.`id`;

-- membuang struktur untuk view si_sarung.view_orderservice_kartu_hutang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_orderservice_kartu_hutang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_orderservice_kartu_hutang` AS select `p`.`id` AS `id`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_nota` AS `no_nota`,`p`.`sufix_no_nota` AS `sufix_no_nota`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_nota` AS `tanggal_nota`,`p`.`id_penyedia` AS `id_penyedia`,`p`.`no_faktur_pajak` AS `no_faktur_pajak`,`p`.`keterangan` AS `keterangan`,`p`.`id_akun_hutang` AS `id_akun_hutang`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`p`.`nominal_total` AS `nominal_total`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_netto` AS `nominal_netto`,`p`.`nominal_bayar` AS `nominal_bayar`,`p`.`nama_penyedia` AS `nama_penyedia`,`p`.`pic` AS `pic`,`p`.`tanggal_nota` AS `tanggal_bukti`,ifnull(concat(`p`.`no_nota`,`p`.`sufix_no_nota`),0) AS `no_bukti`,`p`.`keterangan` AS `keterangan_bukti`,ifnull(`p`.`nominal_netto`,0) AS `orderservice`,0 AS `pembayaran` from `view_orderservice_bayar` `p` union all select `p`.`id` AS `id`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_nota` AS `no_nota`,`p`.`sufix_no_nota` AS `sufix_no_nota`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_nota` AS `tanggal_nota`,`p`.`id_penyedia` AS `id_penyedia`,`p`.`no_faktur_pajak` AS `no_faktur_pajak`,`p`.`keterangan` AS `keterangan`,`p`.`id_akun_hutang` AS `id_akun_hutang`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`p`.`nominal_total` AS `nominal_total`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_netto` AS `nominal_netto`,`p`.`nominal_bayar` AS `nominal_bayar`,`p`.`nama_penyedia` AS `nama_penyedia`,`p`.`pic` AS `pic`,`t`.`tanggal_bayar` AS `tanggal_bukti`,ifnull(`t`.`no_transaksi_bayar`,0) AS `no_bukti`,concat('Pembayaran Tagihan ',`p`.`nama_penyedia`,' untuk nota tgl ',convert(date_format(`p`.`tanggal_nota`,'%d/%m/%Y') using latin1),' - ',ifnull(concat(`p`.`no_nota`,`p`.`sufix_no_nota`),0)) AS `keterangan_bayar`,0 AS `orderservice`,ifnull(`b`.`jum_bayar`,0) AS `pembayaran` from ((`view_orderservice_bayar` `p` left join `serv_orderservice_bayar` `b` on((`p`.`id` = `b`.`id_orderservice`))) left join `serv_orderservice_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`)));

-- membuang struktur untuk view si_sarung.view_pegawai_bayar_kasbon
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_pegawai_bayar_kasbon`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_pegawai_bayar_kasbon` AS select `uh`.`id_upah_harian` AS `id_ref`,`uh`.`no_transaksi` AS `nomor_ref`,`uh`.`tanggal_transaksi` AS `tanggal_ref`,`uh`.`tanggal_transaksi` AS `tanggal`,`uhd`.`id_pegawai` AS `id_pegawai`,`uh`.`tanggal_transaksi` AS `tanggal_transaksi`,`uhd`.`potongan_kas_bon` AS `bayar_kasbon`,`mpg`.`id_akun_piutang` AS `id_dari_akun`,'K' AS `tipe_dari_akun`,`uh`.`id_akun` AS `id_ke_akun`,'D' AS `tipe_ke_akun`,'Bayar Kas Bon' AS `keterangan`,'upah_harian' AS `flag` from (((`pro_upah_harian_detail` `uhd` join `pro_upah_harian_akun` `uha` on((`uha`.`id_upah_harian` = `uhd`.`id_upah_harian`))) join `pro_upah_harian` `uh` on((`uh`.`id_upah_harian` = `uhd`.`id_upah_harian`))) join `ms_pegawai` `mpg` on((`mpg`.`id_pegawai` = `uhd`.`id_pegawai`))) where (`uhd`.`potongan_kas_bon` <> 0) union all select `up`.`id_upahproduksi` AS `id_ref`,`up`.`nomor` AS `nomor_ref`,`up`.`tanggal_bayar` AS `tanggal_ref`,`up`.`tanggal` AS `tanggal`,`up`.`id_pegawai` AS `id_pegawai`,`up`.`tanggal_bayar` AS `tanggal_transaksi`,`ubl`.`jumlah` AS `bayar_kasbon`,`mpg`.`id_akun_piutang` AS `id_dari_akun`,'K' AS `tipe_dari_akun`,`up`.`akun_bayar` AS `id_ke_akun`,'D' AS `tipe_ke_akun`,'Bayar Kas Bon' AS `keterangan`,'upah_produksi' AS `flag` from ((`pro_upahproduksi` `up` left join `pro_upah_borongan_lain_lain` `ubl` on((`ubl`.`id_upah_borongan` = `up`.`id_upahproduksi`))) join `ms_pegawai` `mpg` on((`mpg`.`id_pegawai` = `up`.`id_pegawai`))) where (`ubl`.`jenis_transaksi` = 'KASBON') union all select `up`.`id_upahproduksi_lainnya` AS `id_ref`,`up`.`nomor` AS `nomor_ref`,`up`.`tanggal_bayar` AS `tanggal_ref`,`up`.`tanggal_upah` AS `tanggal`,`up`.`id_pegawai` AS `id_pegawai`,`up`.`tanggal_bayar` AS `tanggal_transaksi`,`upll`.`jumlah` AS `bayar_kasbon`,`mpg`.`id_akun_piutang` AS `id_dari_akun`,'K' AS `tipe_dari_akun`,`up`.`id_akun_bayar` AS `id_ke_akun`,'D' AS `tipe_ke_akun`,'Bayar Kas Bon' AS `keterangan`,'upah_produksi_lainnya' AS `flag` from ((`pro_upahproduksi_lainnya` `up` left join `pro_upahproduksi_lainnya_lainlain` `upll` on((`upll`.`id_upahproduksi_lainnya` = `up`.`id_upahproduksi_lainnya`))) join `ms_pegawai` `mpg` on((`mpg`.`id_pegawai` = `up`.`id_pegawai`))) where (`upll`.`jenis_transaksi` = 'KASBON');

-- membuang struktur untuk view si_sarung.view_pembelian2
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_pembelian2`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_pembelian2` AS select `pp`.`id_pembelian` AS `id_pembelian`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,concat(`pp`.`no_faktur`,`pp`.`sufix_no_faktur`) AS `nomor_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_penyedia` AS `id_penyedia`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`termasuk_pajak` AS `termasuk_pajak`,`pp`.`pajak` AS `pajak`,`pp`.`no_faktur_pajak` AS `no_faktur_pajak`,`pp`.`nominal_ongkir` AS `nominal_ongkir`,`pp`.`status` AS `status`,`pp`.`keterangan` AS `keterangan`,`pp`.`syarat_bayar` AS `syarat_bayar`,`pp`.`tempat_serah` AS `tempat_serah`,`pp`.`tanggal_serah` AS `tanggal_serah`,`pp`.`penerima` AS `penerima`,`pp`.`id_akun_hutang` AS `id_akun_hutang`,`pp`.`id_akun_potongan` AS `id_akun_potongan`,`pp`.`id_akun_pajak` AS `id_akun_pajak`,`pp`.`id_akun_ongkir` AS `id_akun_ongkir`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,`pp`.`data_lokasi` AS `data_lokasi`,`pp`.`nominal_total` AS `nominal_total`,`pp`.`nominal_pajak` AS `nominal_pajak`,(((`pp`.`nominal_total` + `pp`.`nominal_pajak`) + `pp`.`nominal_ongkir`) - `pp`.`nominal_potongan`) AS `nominal_netto`,sum(ifnull(`ppb`.`jum_bayar`,0)) AS `total_bayar`,`mp`.`nama` AS `nama_penyedia`,`mp`.`pic` AS `pic`,2 AS `kode_sebagai`,'hutang_pembelian' AS `sebagai` from ((`a_pem_pembelian` `pp` left join `pem_pembelian_bayar` `ppb` on((`pp`.`id_pembelian` = `ppb`.`id_pembelian`))) join `ms_penyedia` `mp` on((`mp`.`id_penyedia` = `pp`.`id_penyedia`))) group by `pp`.`id_pembelian` union all select `hp`.`id` AS `id_pembelian`,`hp`.`lokasi` AS `lokasi`,`hp`.`user_id_create` AS `user_id_create`,`hp`.`user_id_update` AS `user_id_update`,`hp`.`cv` AS `cv`,`hp`.`no_faktur` AS `no_faktur`,`hp`.`sufix_no_faktur` AS `sufix_no_faktur`,concat(`hp`.`no_faktur`,`hp`.`sufix_no_faktur`) AS `nomor_faktur`,`hp`.`tanggal` AS `tanggal`,`hp`.`tanggal_faktur` AS `tanggal_faktur`,`hp`.`tanggal_tempo` AS `tanggal_tempo`,`hp`.`id_penyedia` AS `id_penyedia`,0 AS `nominal_potongan`,`hp`.`termasuk_pajak` AS `termasuk_pajak`,`hp`.`pajak` AS `pajak`,'' AS `no_faktur_pajak`,0 AS `nominal_ongkir`,0 AS `status`,`hp`.`keterangan` AS `keterangan`,'' AS `syarat_bayar`,0 AS `tempat_serah`,'0000-00-00' AS `tanggal_serah`,'' AS `penerima`,`hp`.`id_akun_hutang` AS `id_akun_hutang`,102 AS `id_akun_potongan`,`hp`.`id_akun_pajak` AS `id_akun_pajak`,105 AS `id_akun_ongkir`,`hp`.`created_at` AS `created_at`,`hp`.`updated_at` AS `updated_at`,`lp`.`nama_lokasi` AS `data_lokasi`,(case when (`hp`.`termasuk_pajak` = 1) then ((`hp`.`nominal` * 100) / 110) when ((`hp`.`termasuk_pajak` = 0) and (`hp`.`pajak` = 1)) then `hp`.`nominal` else `hp`.`nominal` end) AS `nominal_total`,(case when (`hp`.`termasuk_pajak` = 1) then ((`hp`.`nominal` * 10) / 110) when ((`hp`.`termasuk_pajak` = 0) and (`hp`.`pajak` = 1)) then ((`hp`.`nominal` * 10) / 100) else 0 end) AS `nominal_pajak`,((case when (`hp`.`termasuk_pajak` = 1) then ((`hp`.`nominal` * 100) / 110) when ((`hp`.`termasuk_pajak` = 0) and (`hp`.`pajak` = 1)) then `hp`.`nominal` else `hp`.`nominal` end) + (case when (`hp`.`termasuk_pajak` = 1) then ((`hp`.`nominal` * 10) / 110) when ((`hp`.`termasuk_pajak` = 0) and (`hp`.`pajak` = 1)) then ((`hp`.`nominal` * 10) / 100) else 0 end)) AS `nominal_netto`,sum(ifnull(`hpb`.`jum_bayar`,0)) AS `total_bayar`,`mp`.`nama` AS `nama_penyedia`,`mp`.`pic` AS `pic`,1 AS `kode_sebagai`,'hutang_awal' AS `sebagai` from (((`pem_hutangawal` `hp` left join `pem_hutangawal_bayar` `hpb` on((`hp`.`id` = `hpb`.`id_hutangawal`))) left join `ms_lokasi_produksi` `lp` on((`lp`.`id_lokasi` = `hp`.`lokasi`))) join `ms_penyedia` `mp` on((`mp`.`id_penyedia` = `hp`.`id_penyedia`))) group by `hp`.`id`;

-- membuang struktur untuk view si_sarung.view_pembelian_2
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_pembelian_2`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_pembelian_2` AS select `pp`.`id_pembelian` AS `id_pembelian`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_penyedia` AS `id_penyedia`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`termasuk_pajak` AS `termasuk_pajak`,`pp`.`pajak` AS `pajak`,`pp`.`no_faktur_pajak` AS `no_faktur_pajak`,`pp`.`nominal_ongkir` AS `nominal_ongkir`,`pp`.`status` AS `status`,`pp`.`keterangan` AS `keterangan`,`pp`.`syarat_bayar` AS `syarat_bayar`,`pp`.`tempat_serah` AS `tempat_serah`,`pp`.`tanggal_serah` AS `tanggal_serah`,`pp`.`penerima` AS `penerima`,`pp`.`id_akun_hutang` AS `id_akun_hutang`,`pp`.`id_akun_potongan` AS `id_akun_potongan`,`pp`.`id_akun_pajak` AS `id_akun_pajak`,`pp`.`id_akun_ongkir` AS `id_akun_ongkir`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,`pp`.`data_lokasi` AS `data_lokasi`,`pp`.`nominal_total` AS `nominal_total`,`pp`.`nominal_pajak` AS `nominal_pajak`,((`pp`.`nominal_total` + `pp`.`nominal_pajak`) - `pp`.`nominal_potongan`) AS `nominal_netto`,`mp`.`nama` AS `nama_penyedia`,`mp`.`pic` AS `pic`,`t`.`nama` AS `tempat_penyerahan`,`t`.`alamat` AS `alamat`,`mlp`.`nama_lokasi` AS `nama_lokasi` from (((`a_pem_pembelian` `pp` join `ms_penyedia` `mp` on((`mp`.`id_penyedia` = `pp`.`id_penyedia`))) join `ms_tempat_penyerahan` `t` on((`t`.`id` = `pp`.`tempat_serah`))) left join `ms_lokasi_produksi` `mlp` on((`t`.`id_lokasi` = `mlp`.`id_lokasi`))) group by `pp`.`id_pembelian`;

-- membuang struktur untuk view si_sarung.view_pembelian_barang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_pembelian_barang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_pembelian_barang` AS select `po`.`id_pembelian` AS `id_pembelian`,`po`.`no_faktur` AS `no_faktur`,`po`.`sufix_no_faktur` AS `sufix_no_faktur`,`po`.`id_penyedia` AS `id_penyedia`,`mp`.`nama` AS `nama`,`pob`.`id_beli_barang` AS `id_beli_barang`,`pob`.`id_barang` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,(case when (`po`.`termasuk_pajak` = 1) then ((100 * `pob`.`harga_satuan`) / 110) else `pob`.`harga_satuan` end) AS `harga_satuan`,(case when (`po`.`termasuk_pajak` = 1) then ((10 * `pob`.`harga_satuan`) / 110) when ((`po`.`termasuk_pajak` = 0) and (`po`.`pajak` = 1)) then ((10 * `pob`.`harga_satuan`) / 100) else 0 end) AS `nilai_ppn`,`ms`.`id_satuan` AS `id_satuan`,`ms`.`nama_satuan` AS `nama_satuan`,`pob`.`jml_barang` AS `jml_barang`,`pob`.`jml_barang_konv` AS `jml_barang_konv` from ((((`pem_pembelian` `po` join `pem_pembelian_barang` `pob` on((`po`.`id_pembelian` = `pob`.`id_pembelian`))) join `ms_barang` `mb` on((`pob`.`id_barang` = `mb`.`id`))) join `ms_penyedia` `mp` on((`po`.`id_penyedia` = `mp`.`id_penyedia`))) left join `ms_satuan` `ms` on((`pob`.`id_satuan` = `ms`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_pembelian_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_pembelian_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_pembelian_bayar` AS select `pp`.`id_pembelian` AS `id_pembelian`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_penyedia` AS `id_penyedia`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`termasuk_pajak` AS `termasuk_pajak`,`pp`.`pajak` AS `pajak`,`pp`.`no_faktur_pajak` AS `no_faktur_pajak`,`pp`.`nominal_ongkir` AS `nominal_ongkir`,`pp`.`status` AS `status`,`pp`.`keterangan` AS `keterangan`,`pp`.`syarat_bayar` AS `syarat_bayar`,`pp`.`tempat_serah` AS `tempat_serah`,`pp`.`tanggal_serah` AS `tanggal_serah`,`pp`.`penerima` AS `penerima`,`pp`.`id_akun_hutang` AS `id_akun_hutang`,`pp`.`id_akun_potongan` AS `id_akun_potongan`,`pp`.`id_akun_pajak` AS `id_akun_pajak`,`pp`.`id_akun_ongkir` AS `id_akun_ongkir`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,`pp`.`data_lokasi` AS `data_lokasi`,`pp`.`nominal_total` AS `nominal_total`,`pp`.`nominal_pajak` AS `nominal_pajak`,(((`pp`.`nominal_total` + `pp`.`nominal_pajak`) + `pp`.`nominal_ongkir`) - `pp`.`nominal_potongan`) AS `nominal_netto`,sum(ifnull(`ppb`.`jum_bayar`,0)) AS `total_bayar`,`mp`.`nama` AS `nama_penyedia`,`mp`.`pic` AS `pic` from ((`a_pem_pembelian` `pp` left join `pem_pembelian_bayar` `ppb` on((`pp`.`id_pembelian` = `ppb`.`id_pembelian`))) join `ms_penyedia` `mp` on((`mp`.`id_penyedia` = `pp`.`id_penyedia`))) group by `pp`.`id_pembelian`;

-- membuang struktur untuk view si_sarung.view_pembelian_hutang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_pembelian_hutang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_pembelian_hutang` AS select `pp`.`id_pembelian` AS `id_pembelian`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_penyedia` AS `id_penyedia`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`termasuk_pajak` AS `termasuk_pajak`,`pp`.`pajak` AS `pajak`,`pp`.`no_faktur_pajak` AS `no_faktur_pajak`,`pp`.`status` AS `status`,`pp`.`keterangan` AS `keterangan`,`pp`.`id_akun_hutang` AS `id_akun_hutang`,`pp`.`id_akun_potongan` AS `id_akun_potongan`,`pp`.`id_akun_pajak` AS `id_akun_pajak`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,(case when (`mhb`.`id_hutangbeli_bayar` is not null) then sum(`mhb`.`jum_bayar`) else 0 end) AS `total_bayar_hutang` from ((`pem_pembelian` `pp` left join `pem_pembelian_bayar` `ppb` on((`pp`.`id_pembelian` = `ppb`.`id_pembelian`))) left join `pem_hutangbeli_bayar` `mhb` on((`pp`.`id_pembelian` = `mhb`.`id_pembelian`))) group by `pp`.`id_pembelian`;

-- membuang struktur untuk view si_sarung.view_pembelian_kartu_hutang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_pembelian_kartu_hutang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_pembelian_kartu_hutang` AS select `p`.`id_pembelian` AS `id_pembelian`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_faktur` AS `no_faktur`,`p`.`sufix_no_faktur` AS `sufix_no_faktur`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_faktur` AS `tanggal_faktur`,`p`.`tanggal_tempo` AS `tanggal_tempo`,`p`.`id_penyedia` AS `id_penyedia`,`p`.`nominal_potongan` AS `nominal_potongan`,`p`.`termasuk_pajak` AS `termasuk_pajak`,`p`.`pajak` AS `pajak`,`p`.`no_faktur_pajak` AS `no_faktur_pajak`,`p`.`nominal_ongkir` AS `nominal_ongkir`,`p`.`status` AS `status`,`p`.`keterangan` AS `keterangan`,`p`.`syarat_bayar` AS `syarat_bayar`,`p`.`tempat_serah` AS `tempat_serah`,`p`.`tanggal_serah` AS `tanggal_serah`,`p`.`penerima` AS `penerima`,`p`.`id_akun_hutang` AS `id_akun_hutang`,`p`.`id_akun_potongan` AS `id_akun_potongan`,`p`.`id_akun_pajak` AS `id_akun_pajak`,`p`.`id_akun_ongkir` AS `id_akun_ongkir`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`p`.`data_lokasi` AS `data_lokasi`,`p`.`nominal_total` AS `nominal_total`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_netto` AS `nominal_netto`,`p`.`total_bayar` AS `total_bayar`,`p`.`nama_penyedia` AS `nama_penyedia`,`p`.`pic` AS `pic`,`p`.`kode_sebagai` AS `kode_sebagai`,`p`.`sebagai` AS `sebagai`,`p`.`tanggal_faktur` AS `tanggal_bukti`,ifnull(concat(`p`.`no_faktur`,`p`.`sufix_no_faktur`),0) AS `no_bukti`,`p`.`keterangan` AS `keterangan_bukti`,ifnull(`p`.`nominal_netto`,0) AS `pembelian`,0 AS `pembayaran` from `view_pembelian2` `p` union all select `p`.`id_pembelian` AS `id_pembelian`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_faktur` AS `no_faktur`,`p`.`sufix_no_faktur` AS `sufix_no_faktur`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_faktur` AS `tanggal_faktur`,`p`.`tanggal_tempo` AS `tanggal_tempo`,`p`.`id_penyedia` AS `id_penyedia`,`p`.`nominal_potongan` AS `nominal_potongan`,`p`.`termasuk_pajak` AS `termasuk_pajak`,`p`.`pajak` AS `pajak`,`p`.`no_faktur_pajak` AS `no_faktur_pajak`,`p`.`nominal_ongkir` AS `nominal_ongkir`,`p`.`status` AS `status`,`p`.`keterangan` AS `keterangan`,`p`.`syarat_bayar` AS `syarat_bayar`,`p`.`tempat_serah` AS `tempat_serah`,`p`.`tanggal_serah` AS `tanggal_serah`,`p`.`penerima` AS `penerima`,`p`.`id_akun_hutang` AS `id_akun_hutang`,`p`.`id_akun_potongan` AS `id_akun_potongan`,`p`.`id_akun_pajak` AS `id_akun_pajak`,`p`.`id_akun_ongkir` AS `id_akun_ongkir`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`p`.`data_lokasi` AS `data_lokasi`,`p`.`nominal_total` AS `nominal_total`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_netto` AS `nominal_netto`,`p`.`total_bayar` AS `total_bayar`,`p`.`nama_penyedia` AS `nama_penyedia`,`p`.`pic` AS `pic`,`p`.`kode_sebagai` AS `kode_sebagai`,`p`.`sebagai` AS `sebagai`,`t`.`tanggal_bayar` AS `tanggal_bukti`,ifnull(`t`.`no_transaksi_bayar`,0) AS `no_bukti`,concat('Pembayaran Tagihan ',`p`.`nama_penyedia`,' untuk nota tgl ',convert(date_format(`p`.`tanggal_faktur`,'%d/%m/%Y') using latin1),' - ',ifnull(concat(`p`.`no_faktur`,`p`.`sufix_no_faktur`),0)) AS `keterangan_bayar`,0 AS `pembelian`,(case when (`p`.`kode_sebagai` = 1) then ifnull(`hb`.`jum_bayar`,0) else ifnull(`b`.`jum_bayar`,0) end) AS `pembayaran` from (((`view_pembelian2` `p` left join `pem_pembelian_bayar` `b` on(((`p`.`id_pembelian` = `b`.`id_pembelian`) and (`p`.`kode_sebagai` = 2)))) left join `pem_hutangawal_bayar` `hb` on(((`p`.`id_pembelian` = `hb`.`id_hutangawal`) and (`p`.`kode_sebagai` = 1)))) left join `pem_pembelian_transaksi_bayar` `t` on(((`t`.`id` = `b`.`id_transaksi_bayar`) or (`t`.`id` = `hb`.`id_transaksi_bayar`))));

-- membuang struktur untuk view si_sarung.view_penerimaan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penerimaan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penerimaan` AS select `view_penerimaan_sub`.`id` AS `id`,`view_penerimaan_sub`.`id_barang` AS `id_barang`,`view_penerimaan_sub`.`kode_barang` AS `kode_barang`,`view_penerimaan_sub`.`nama_barang` AS `nama_barang`,(`view_penerimaan_sub`.`jum_barang` * (`view_penerimaan_sub`.`nilai_akhir` / `view_penerimaan_sub`.`nilai_awal`)) AS `jumlah`,(`view_penerimaan_sub`.`masuk` * (`view_penerimaan_sub`.`nilai_akhir` / `view_penerimaan_sub`.`nilai_awal`)) AS `masuk`,0 AS `keluar`,`view_penerimaan_sub`.`id_gudang` AS `id_gudang`,`view_penerimaan_sub`.`nama_gudang` AS `nama_gudang`,`view_penerimaan_sub`.`tanggal` AS `tanggal`,'' AS `id_proses`,'' AS `nama_proses`,'' AS `id_komposisi`,'' AS `nama_komposisi`,`view_penerimaan_sub`.`id_satuan` AS `id_satuan`,`view_penerimaan_sub`.`nama_satuan` AS `nama_satuan`,`view_penerimaan_sub`.`id_corak` AS `id_corak`,`view_penerimaan_sub`.`nama_corak` AS `nama_corak`,`view_penerimaan_sub`.`id_motif` AS `id_motif`,`view_penerimaan_sub`.`nama_motif` AS `nama_motif`,`view_penerimaan_sub`.`id_workorder` AS `id_workorder`,`view_penerimaan_sub`.`no_workorder` AS `no_workorder`,`view_penerimaan_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_penerimaan_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_penerimaan_sub`.`id_kualitas` AS `id_kualitas`,`view_penerimaan_sub`.`nama_kualitas` AS `nama_kualitas`,`view_penerimaan_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_penerimaan_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_penerimaan_sub`.`id_label` AS `id_label`,`view_penerimaan_sub`.`nama_label` AS `nama_label`,`view_penerimaan_sub`.`id_kemasan` AS `id_kemasan`,`view_penerimaan_sub`.`nama_kemasan` AS `nama_kemasan`,`view_penerimaan_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_penerimaan_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_penerimaan_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_penerimaan_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_penerimaan_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_penerimaan_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_penerimaan_sub`.`id_cap` AS `id_cap`,`view_penerimaan_sub`.`nama_cap` AS `nama_cap`,`view_penerimaan_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_penerimaan_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_penerimaan_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_penerimaan_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_penerimaan_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_penerimaan_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_penerimaan_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_penerimaan_sub`.`tanggal_akhir` AS `tanggal_full` from `view_penerimaan_sub`;

-- membuang struktur untuk view si_sarung.view_penerimaan_all
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penerimaan_all`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penerimaan_all` AS select `pp`.`id_pembelian` AS `id`,`pt`.`id_penerimaan` AS `id_penerimaan`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pt`.`jml_barang_terima` AS `jum_barang`,`pt`.`jml_barang_terima` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`pp`.`tanggal` AS `tanggal`,'' AS `id_proses`,'' AS `nama_proses`,'' AS `id_komposisi`,'' AS `nama_komposisi`,(case when isnull(`mk`.`nilai_awal`) then 1 else `mk`.`nilai_awal` end) AS `nilai_awal`,(case when isnull(`mk`.`nilai_akhir`) then 1 else `mk`.`nilai_akhir` end) AS `nilai_akhir`,(case when isnull(`mst`.`id_satuan`) then `mss1`.`id_satuan` else `mst`.`id_satuan` end) AS `id_satuan`,(case when isnull(`mst`.`nama_satuan`) then `mss1`.`nama_satuan` else `mst`.`nama_satuan` end) AS `nama_satuan`,'' AS `id_corak`,'' AS `nama_corak`,'' AS `id_motif`,'' AS `nama_motif`,'' AS `id_workorder`,'' AS `no_workorder`,'' AS `id_workorder_barang`,'' AS `no_workorder_barang`,'' AS `id_kualitas`,'' AS `nama_kualitas`,'' AS `id_kualitas_dudul`,'' AS `kualitas_dudul`,'' AS `id_label`,'' AS `nama_label`,'' AS `id_kemasan`,'' AS `nama_kemasan`,'' AS `id_kemasansatuan`,'' AS `nama_kemasansatuan`,'' AS `id_kemasansepuluh`,'' AS `nama_kemasansepuluh`,'' AS `id_kemasanseratus`,'' AS `nama_kemasanseratus`,'' AS `id_cap`,'' AS `nama_cap`,'' AS `id_kualitas_proses`,'' AS `nama_kualitas_proses`,'' AS `id_kualitas_periksa`,'' AS `nama_kualitas_periksa`,'' AS `id_perubahansatuan`,'' AS `nama_perubahansatuan`,'' AS `jumlah_rencana` from ((((((((`pem_pembelian` `pp` join `pem_pembelian_barang` `ppb` on((`pp`.`id_pembelian` = `ppb`.`id_pembelian`))) join `pem_penerimaan` `pt` on((`pt`.`id_beli_barang` = `ppb`.`id_beli_barang`))) join `ms_barang` `mb` on((`ppb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pt`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_satuan` `mss` on((`mb`.`id_satuan` = `mss`.`id_satuan`))) left join `ms_konversi` `mk` on(((`mb`.`id` = `mk`.`kode`) and (`ppb`.`id_satuan` = `mk`.`satuan_awal`)))) left join `ms_satuan` `mss1` on((`ppb`.`id_satuan` = `mss1`.`id_satuan`))) left join `ms_satuan` `mst` on((`mk`.`satuan_akhir` = `mst`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_penerimaan_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penerimaan_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penerimaan_sub` AS select `pp`.`id_pembelian` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pt`.`jml_barang_terima` AS `jum_barang`,`pt`.`jml_barang_terima` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,(case when isnull(`ppi`.`tanggal_terima`) then `pp`.`tanggal` else `ppi`.`tanggal_terima` end) AS `tanggal`,'' AS `id_proses`,'' AS `nama_proses`,'' AS `id_komposisi`,'' AS `nama_komposisi`,(case when isnull(`mk`.`nilai_awal`) then 1 else `mk`.`nilai_awal` end) AS `nilai_awal`,(case when isnull(`mk`.`nilai_akhir`) then 1 else `mk`.`nilai_akhir` end) AS `nilai_akhir`,(case when isnull(`mst`.`id_satuan`) then `mss1`.`id_satuan` else `mst`.`id_satuan` end) AS `id_satuan`,(case when isnull(`mst`.`nama_satuan`) then `mss1`.`nama_satuan` else `mst`.`nama_satuan` end) AS `nama_satuan`,'' AS `id_corak`,'' AS `nama_corak`,'' AS `id_motif`,'' AS `nama_motif`,'' AS `id_workorder`,'' AS `no_workorder`,'' AS `id_workorder_barang`,'' AS `no_workorder_barang`,'' AS `id_kualitas`,'' AS `nama_kualitas`,'' AS `id_kualitas_dudul`,'' AS `kualitas_dudul`,'' AS `id_label`,'' AS `nama_label`,'' AS `id_kemasan`,'' AS `nama_kemasan`,'' AS `id_kemasansatuan`,'' AS `nama_kemasansatuan`,'' AS `id_kemasansepuluh`,'' AS `nama_kemasansepuluh`,'' AS `id_kemasanseratus`,'' AS `nama_kemasanseratus`,'' AS `id_cap`,'' AS `nama_cap`,'' AS `id_kualitas_proses`,'' AS `nama_kualitas_proses`,'' AS `id_kualitas_periksa`,'' AS `nama_kualitas_periksa`,'' AS `id_perubahansatuan`,'' AS `nama_perubahansatuan`,'' AS `jumlah_rencana`,(case when isnull(`ppi`.`terima`) then `ppb`.`created_at` else `ppi`.`terima` end) AS `tanggal_akhir` from (((((((((`pem_pembelian` `pp` join `pem_pembelian_barang` `ppb` on((`pp`.`id_pembelian` = `ppb`.`id_pembelian`))) join `pem_penerimaan` `pt` on((`pt`.`id_beli_barang` = `ppb`.`id_beli_barang`))) left join `pem_penerimaan_induk` `ppi` on((`ppi`.`id_induk` = `pt`.`id_induk`))) join `ms_barang` `mb` on((`ppb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pt`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_satuan` `mss` on((`mb`.`id_satuan` = `mss`.`id_satuan`))) left join `ms_konversi` `mk` on(((`mb`.`id` = `mk`.`kode`) and (`ppb`.`id_satuan` = `mk`.`satuan_awal`)))) left join `ms_satuan` `mss1` on((`ppb`.`id_satuan` = `mss1`.`id_satuan`))) left join `ms_satuan` `mst` on((`mk`.`satuan_akhir` = `mst`.`id_satuan`))) where (`pt`.`status` = '1');

-- membuang struktur untuk view si_sarung.view_penggunaanbarang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penggunaanbarang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penggunaanbarang` AS select `ip`.`id_pengeluaran` AS `id`,`ipb`.`id_barang` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`ipb`.`jumlah` AS `jumlah`,0 AS `masuk`,`ipb`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,date_format(`ip`.`tanggal_full`,'%Y-%m-%d') AS `tanggal`,'' AS `id_proses`,'' AS `nama_proses`,'' AS `id_komposisi`,'' AS `nama_komposisi`,`ms`.`id_satuan` AS `id_satuan`,`ms`.`nama_satuan` AS `nama_satuan`,'' AS `id_corak`,'' AS `nama_corak`,'' AS `id_motif`,'' AS `nama_motif`,'' AS `id_workorder`,'' AS `no_workorder`,'' AS `id_workorder_barang`,'' AS `no_workorder_barang`,'' AS `id_kualitas`,'' AS `nama_kualitas`,'' AS `id_kualitas_dudul`,'' AS `kualitas_dudul`,'' AS `id_label`,'' AS `nama_label`,'' AS `id_kemasan`,'' AS `nama_kemasan`,'' AS `id_kemasansatuan`,'' AS `nama_kemasansatuan`,'' AS `id_kemasansepuluh`,'' AS `nama_kemasansepuluh`,'' AS `id_kemasanseratus`,'' AS `nama_kemasanseratus`,'' AS `id_cap`,'' AS `nama_cap`,'' AS `id_kualitas_proses`,'' AS `nama_kualitas_proses`,'' AS `id_kualitas_periksa`,'' AS `nama_kualitas_periksa`,'' AS `id_perubahansatuan`,'' AS `nama_perubahan_satuan`,'' AS `jumlah_rencana`,`ip`.`tanggal_full` AS `tanggal_full` from ((((`inv_pengeluaran` `ip` left join `inv_pengeluaran_barang` `ipb` on((`ip`.`id_pengeluaran` = `ipb`.`id_pengeluaran`))) left join `ms_barang` `mb` on((`ipb`.`id_barang` = `mb`.`id`))) left join `ms_satuan` `ms` on((`ipb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_gudang` `mg` on((`ipb`.`id_gudang` = `mg`.`id_gudang`)));

-- membuang struktur untuk view si_sarung.view_penggunaan_produksi
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penggunaan_produksi`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penggunaan_produksi` AS select `v`.`id` AS `id`,`v`.`id_lokasi` AS `id_lokasi`,`mlp`.`nama_lokasi` AS `nama_lokasi`,`v`.`tanggal` AS `tanggal`,(case when isnull(`mb`.`id`) then '' else `mb`.`id` end) AS `id_barang`,(case when isnull(`mb`.`id`) then '' else `mb`.`nama_barang` end) AS `nama_barang`,(case when isnull(`mp`.`id_proses`) then '' else `mp`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`id_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mw`.`id_komposisi`) then '' else `mw`.`nama` end) AS `nama_komposisi`,`v`.`jumlah` AS `jumlah`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mb2`.`id`) then '' else `mb2`.`id` end) AS `id_barangkeluar`,(case when isnull(`mb2`.`id`) then '' else `mb2`.`nama_barang` end) AS `nama_barangkeluar`,`v`.`jumlahkeluar` AS `jumlahkeluar`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_satuankeluar`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_satuankeluar`,(case when isnull(`mg`.`id_gudang`) then '' else `mg`.`id_gudang` end) AS `id_gudang`,(case when isnull(`mg`.`nama_gudang`) then '' else `mg`.`nama_gudang` end) AS `nama_gudang`,`v`.`is_aktif` AS `is_aktif` from ((((((((((`ms_penggunaan_produksi` `v` join `ms_lokasi_produksi` `mlp` on((`v`.`id_lokasi` = `mlp`.`id_lokasi`))) left join `ms_barang` `mb` on((`v`.`id_barang` = `mb`.`id`))) left join `ms_proses` `mp` on((`v`.`id_proses` = `mp`.`id_proses`))) left join `ms_motif_barang` `mmb` on((`v`.`id_corak` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`v`.`id_motif` = `mm`.`id_motif`))) left join `ms_warnakomposisi` `mw` on((`v`.`id_warna` = `mw`.`id_komposisi`))) left join `ms_satuan` `ms` on((`v`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_barang` `mb2` on((`v`.`id_barangkeluar` = `mb2`.`id`))) left join `ms_gudang` `mg` on((`v`.`id_gudangkeluar` = `mg`.`id_gudang`))) left join `ms_satuan` `ms2` on((`v`.`id_satuankeluar` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_penjualan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penjualan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penjualan` AS select `view_penjualan_sub`.`id` AS `id`,`view_penjualan_sub`.`id_barang` AS `id_barang`,`view_penjualan_sub`.`kode_barang` AS `kode_barang`,`view_penjualan_sub`.`nama_barang` AS `nama_barang`,(`view_penjualan_sub`.`jum_barang` * (`view_penjualan_sub`.`nilai_akhir` / `view_penjualan_sub`.`nilai_awal`)) AS `jumlah`,0 AS `masuk`,(`view_penjualan_sub`.`keluar` * (`view_penjualan_sub`.`nilai_akhir` / `view_penjualan_sub`.`nilai_awal`)) AS `keluar`,`view_penjualan_sub`.`id_gudang` AS `id_gudang`,`view_penjualan_sub`.`nama_gudang` AS `nama_gudang`,`view_penjualan_sub`.`tanggal` AS `tanggal`,`view_penjualan_sub`.`id_proses` AS `id_proses`,`view_penjualan_sub`.`nama_proses` AS `nama_proses`,`view_penjualan_sub`.`id_komposisi` AS `id_komposisi`,`view_penjualan_sub`.`nama_komposisi` AS `nama_komposisi`,`view_penjualan_sub`.`id_satuan` AS `id_satuan`,`view_penjualan_sub`.`nama_satuan` AS `nama_satuan`,`view_penjualan_sub`.`id_corak` AS `id_corak`,`view_penjualan_sub`.`nama_corak` AS `nama_corak`,`view_penjualan_sub`.`id_motif` AS `id_motif`,`view_penjualan_sub`.`nama_motif` AS `nama_motif`,`view_penjualan_sub`.`id_workorder` AS `id_workorder`,`view_penjualan_sub`.`no_workorder` AS `no_workorder`,`view_penjualan_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_penjualan_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_penjualan_sub`.`id_kualitas` AS `id_kualitas`,`view_penjualan_sub`.`nama_kualitas` AS `nama_kualitas`,`view_penjualan_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_penjualan_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_penjualan_sub`.`id_label` AS `id_label`,`view_penjualan_sub`.`nama_label` AS `nama_label`,`view_penjualan_sub`.`id_kemasan` AS `id_kemasan`,`view_penjualan_sub`.`nama_kemasan` AS `nama_kemasan`,`view_penjualan_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_penjualan_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_penjualan_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_penjualan_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_penjualan_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_penjualan_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_penjualan_sub`.`id_cap` AS `id_cap`,`view_penjualan_sub`.`nama_cap` AS `nama_cap`,`view_penjualan_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_penjualan_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_penjualan_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_penjualan_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_penjualan_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_penjualan_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_penjualan_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_penjualan_sub`.`tanggal_full` AS `tanggal_full` from `view_penjualan_sub` union all select `view_penjualan_retur`.`id` AS `id`,`view_penjualan_retur`.`id_barang` AS `id_barang`,`view_penjualan_retur`.`kode_barang` AS `kode_barang`,`view_penjualan_retur`.`nama_barang` AS `nama_barang`,`view_penjualan_retur`.`jum_barang` AS `jum_barang`,`view_penjualan_retur`.`masuk` AS `masuk`,`view_penjualan_retur`.`keluar` AS `keluar`,`view_penjualan_retur`.`id_gudang` AS `id_gudang`,`view_penjualan_retur`.`nama_gudang` AS `nama_gudang`,`view_penjualan_retur`.`tanggal` AS `tanggal`,`view_penjualan_retur`.`id_proses` AS `id_proses`,`view_penjualan_retur`.`nama_proses` AS `nama_proses`,`view_penjualan_retur`.`id_komposisi` AS `id_komposisi`,`view_penjualan_retur`.`nama_komposisi` AS `nama_komposisi`,`view_penjualan_retur`.`id_satuan` AS `id_satuan`,`view_penjualan_retur`.`nama_satuan` AS `nama_satuan`,`view_penjualan_retur`.`id_corak` AS `id_corak`,`view_penjualan_retur`.`nama_corak` AS `nama_corak`,`view_penjualan_retur`.`id_motif` AS `id_motif`,`view_penjualan_retur`.`nama_motif` AS `nama_motif`,`view_penjualan_retur`.`id_workorder` AS `id_workorder`,`view_penjualan_retur`.`nama_workorder` AS `nama_workorder`,`view_penjualan_retur`.`id_workorder_barang` AS `id_workorder_barang`,`view_penjualan_retur`.`no_workorder_barang` AS `no_workorder_barang`,`view_penjualan_retur`.`id_kualitas` AS `id_kualitas`,`view_penjualan_retur`.`nama_kualitas` AS `nama_kualitas`,`view_penjualan_retur`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_penjualan_retur`.`nama_kualitas_dudul` AS `nama_kualitas_dudul`,`view_penjualan_retur`.`id_label` AS `id_label`,`view_penjualan_retur`.`nama_label` AS `nama_label`,`view_penjualan_retur`.`id_kemasan` AS `id_kemasan`,`view_penjualan_retur`.`nama_kemasan` AS `nama_kemasan`,`view_penjualan_retur`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_penjualan_retur`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_penjualan_retur`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_penjualan_retur`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_penjualan_retur`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_penjualan_retur`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_penjualan_retur`.`id_cap` AS `id_cap`,`view_penjualan_retur`.`nama_cap` AS `nama_cap`,`view_penjualan_retur`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_penjualan_retur`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_penjualan_retur`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_penjualan_retur`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_penjualan_retur`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_penjualan_retur`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_penjualan_retur`.`jumlah_rencana` AS `jumlah_rencana`,`view_penjualan_retur`.`tanggal_full` AS `tanggal_full` from `view_penjualan_retur`;

-- membuang struktur untuk view si_sarung.view_penjualan2
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penjualan2`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penjualan2` AS select `pp`.`id_penjualan` AS `id_penjualan`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_pelanggan` AS `id_pelanggan`,`pp`.`mata_uang` AS `mata_uang`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`pajak` AS `pajak`,`pp`.`no_faktur_pajak` AS `no_faktur_pajak`,`pp`.`status` AS `status`,`pp`.`status_kirim` AS `status_kirim`,`pp`.`keterangan` AS `keterangan`,`pp`.`tanggal_surat` AS `tanggal_surat`,`pp`.`no_surat` AS `no_surat`,`pp`.`sufix_no_surat` AS `sufix_no_surat`,`pp`.`keterangan_surat` AS `keterangan_surat`,`pp`.`id_akun_piutang` AS `id_akun_piutang`,`pp`.`id_akun_potongan` AS `id_akun_potongan`,`pp`.`id_akun_pajak` AS `id_akun_pajak`,`pp`.`id_akun_penjualan` AS `id_akun_penjualan`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,`pp`.`nominal_total` AS `nominal_total`,`pp`.`nominal_pajak` AS `nominal_pajak`,((`pp`.`nominal_total` + `pp`.`nominal_pajak`) - `pp`.`nominal_potongan`) AS `nominal_netto`,sum(ifnull(`ppb`.`jum_bayar`,0)) AS `total_bayar`,`mp`.`nama` AS `nama_pelanggan`,`mp`.`pic` AS `pic`,2 AS `kode_sebagai`,'piutang_penjualan' AS `sebagai` from ((`a_pen_penjualan` `pp` left join `pen_penjualan_bayar` `ppb` on((`pp`.`id_penjualan` = `ppb`.`id_penjualan`))) join `ms_pelanggan` `mp` on((`mp`.`id_pelanggan` = `pp`.`id_pelanggan`))) group by `pp`.`id_penjualan` union all select `pa`.`id` AS `id`,`pa`.`lokasi` AS `lokasi`,`pa`.`user_id_create` AS `user_id_create`,`pa`.`user_id_update` AS `user_id_update`,`pa`.`cv` AS `cv`,`pa`.`no_faktur` AS `no_faktur`,`pa`.`sufix_no_faktur` AS `sufix_no_faktur`,`pa`.`tanggal` AS `tanggal`,`pa`.`tanggal_faktur` AS `tanggal_faktur`,`pa`.`tanggal_tempo` AS `tanggal_tempo`,`pa`.`id_pelanggan` AS `id_pelanggan`,1 AS `mata_uang`,0 AS `nominal_potongan`,`pa`.`pajak` AS `pajak`,'' AS `no_faktur_pajak`,0 AS `STATUS`,0 AS `status_kirim`,`pa`.`keterangan` AS `keterangan`,'0000-00-00' AS `tanggal_surat`,'' AS `no_surat`,NULL AS `sufix_no_surat`,'' AS `keterangan_surat`,`pa`.`id_akun_piutang` AS `id_akun_piutang`,0 AS `id_akun_potongan`,`pa`.`id_akun_pajak` AS `id_akun_pajak`,`pa`.`id_akun_penjualan` AS `id_akun_penjualan`,`pa`.`created_at` AS `created_at`,`pa`.`updated_at` AS `updated_at`,`pa`.`nominal` AS `nominal_total`,(case when (`pa`.`pajak` = 1) then ((`pa`.`nominal` * 10) / 100) else 0 end) AS `nominal_pajak`,(`pa`.`nominal` + (case when (`pa`.`pajak` = 1) then ((`pa`.`nominal` * 10) / 100) else 0 end)) AS `nominal_netto`,sum(ifnull(`ppb`.`jum_bayar`,0)) AS `total_bayar`,`pg`.`nama` AS `nama_pelanggan`,`pg`.`pic` AS `pic`,1 AS `kode_sebagai`,'piutang_awal' AS `sebagai` from ((`pen_piutangawal` `pa` join `ms_pelanggan` `pg` on((`pg`.`id_pelanggan` = `pa`.`id_pelanggan`))) left join `pen_piutangawal_bayar` `ppb` on((`ppb`.`id_piutangawal` = `pa`.`id`))) group by `pa`.`id`;

-- membuang struktur untuk view si_sarung.view_penjualan_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penjualan_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penjualan_bayar` AS select `pp`.`id_penjualan` AS `id_penjualan`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_pelanggan` AS `id_pelanggan`,`pp`.`mata_uang` AS `mata_uang`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`pajak` AS `pajak`,`pp`.`no_faktur_pajak` AS `no_faktur_pajak`,`pp`.`status` AS `status`,`pp`.`status_kirim` AS `status_kirim`,`pp`.`keterangan` AS `keterangan`,`pp`.`tanggal_surat` AS `tanggal_surat`,`pp`.`no_surat` AS `no_surat`,`pp`.`sufix_no_surat` AS `sufix_no_surat`,`pp`.`keterangan_surat` AS `keterangan_surat`,`pp`.`id_akun_piutang` AS `id_akun_piutang`,`pp`.`id_akun_potongan` AS `id_akun_potongan`,`pp`.`id_akun_pajak` AS `id_akun_pajak`,`pp`.`id_akun_penjualan` AS `id_akun_penjualan`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,`pp`.`nominal_total` AS `nominal_total`,`pp`.`nominal_pajak` AS `nominal_pajak`,((`pp`.`nominal_total` + `pp`.`nominal_pajak`) - `pp`.`nominal_potongan`) AS `nominal_netto`,(sum(ifnull(`ppb`.`jum_bayar`,0)) + ifnull(`bpp`.`jum_bayar`,0)) AS `total_bayar`,`mp`.`nama` AS `nama_pelanggan`,`mp`.`pic` AS `pic`,2 AS `kode_sebagai`,'piutang_penjualan' AS `sebagai` from (((`a_pen_penjualan` `pp` left join `pen_penjualan_bayar` `ppb` on((`pp`.`id_penjualan` = `ppb`.`id_penjualan`))) left join `view_byr_peny_ptg` `bpp` on((`pp`.`id_penjualan` = `bpp`.`id_penjualan`))) join `ms_pelanggan` `mp` on((`mp`.`id_pelanggan` = `pp`.`id_pelanggan`))) group by `pp`.`id_penjualan` union all select `pa`.`id` AS `id`,`pa`.`lokasi` AS `lokasi`,`pa`.`user_id_create` AS `user_id_create`,`pa`.`user_id_update` AS `user_id_update`,`pa`.`cv` AS `cv`,`pa`.`no_faktur` AS `no_faktur`,`pa`.`sufix_no_faktur` AS `sufix_no_faktur`,`pa`.`tanggal` AS `tanggal`,`pa`.`tanggal_faktur` AS `tanggal_faktur`,`pa`.`tanggal_tempo` AS `tanggal_tempo`,`pa`.`id_pelanggan` AS `id_pelanggan`,1 AS `mata_uang`,0 AS `nominal_potongan`,`pa`.`pajak` AS `pajak`,'' AS `no_faktur_pajak`,0 AS `status`,0 AS `status_kirim`,`pa`.`keterangan` AS `keterangan`,'0000-00-00' AS `tanggal_surat`,'' AS `no_surat`,NULL AS `sufix_no_surat`,'' AS `keterangan_surat`,`pa`.`id_akun_piutang` AS `id_akun_piutang`,0 AS `id_akun_potongan`,`pa`.`id_akun_pajak` AS `id_akun_pajak`,`pa`.`id_akun_penjualan` AS `id_akun_penjualan`,`pa`.`created_at` AS `created_at`,`pa`.`updated_at` AS `updated_at`,`pa`.`nominal` AS `nominal_total`,(case when (`pa`.`pajak` = 1) then ((`pa`.`nominal` * 10) / 100) else 0 end) AS `nominal_pajak`,(`pa`.`nominal` + (case when (`pa`.`pajak` = 1) then ((`pa`.`nominal` * 10) / 100) else 0 end)) AS `nominal_netto`,sum(ifnull(`ppb`.`jum_bayar`,0)) AS `total_bayar`,`pg`.`nama` AS `nama_pelanggan`,`pg`.`pic` AS `pic`,1 AS `kode_sebagai`,'piutang_awal' AS `sebagai` from ((`pen_piutangawal` `pa` join `ms_pelanggan` `pg` on((`pg`.`id_pelanggan` = `pa`.`id_pelanggan`))) left join `pen_piutangawal_bayar` `ppb` on((`ppb`.`id_piutangawal` = `pa`.`id`))) group by `pa`.`id`;

-- membuang struktur untuk view si_sarung.view_penjualan_hutang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penjualan_hutang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penjualan_hutang` AS select `pp`.`id_penjualan` AS `id_penjualan`,`pp`.`lokasi` AS `lokasi`,`pp`.`user_id_create` AS `user_id_create`,`pp`.`user_id_update` AS `user_id_update`,`pp`.`cv` AS `cv`,`pp`.`no_faktur` AS `no_faktur`,`pp`.`sufix_no_faktur` AS `sufix_no_faktur`,`pp`.`tanggal` AS `tanggal`,`pp`.`tanggal_faktur` AS `tanggal_faktur`,`pp`.`tanggal_tempo` AS `tanggal_tempo`,`pp`.`id_pelanggan` AS `id_pelanggan`,`pp`.`nominal_potongan` AS `nominal_potongan`,`pp`.`pajak` AS `pajak`,`pp`.`no_faktur_pajak` AS `no_faktur_pajak`,`pp`.`status` AS `status`,`pp`.`status_kirim` AS `status_kirim`,`pp`.`keterangan` AS `keterangan`,`pp`.`id_akun_piutang` AS `id_akun_piutang`,`pp`.`id_akun_potongan` AS `id_akun_potongan`,`pp`.`id_akun_pajak` AS `id_akun_pajak`,`pp`.`id_akun_penjualan` AS `id_akun_penjualan`,`pp`.`created_at` AS `created_at`,`pp`.`updated_at` AS `updated_at`,`mp`.`nama` AS `nama`,`mp`.`pic` AS `pic`,date_format(`pp`.`tanggal`,'%d-%m-%Y') AS `tgl`,date_format(`pp`.`tanggal_faktur`,'%d-%m-%Y') AS `tgl_faktur`,date_format(`pp`.`tanggal_tempo`,'%d-%m-%Y') AS `tgl_tempo`,`mpe`.`kode_perkiraan` AS `kode_perkiraan`,`mpe`.`nama_perkiraan` AS `nama_perkiraan`,(case when isnull(`ppb`.`id_jualbayar`) then 0 else 1 end) AS `jualbayar` from (((`pen_penjualan` `pp` join `ms_pelanggan` `mp` on((`pp`.`id_pelanggan` = `mp`.`id_pelanggan`))) left join `ms_perkiraan` `mpe` on((`pp`.`id_akun_penjualan` = `mpe`.`id`))) left join `pen_penjualan_bayar` `ppb` on((`pp`.`id_penjualan` = `ppb`.`id_penjualan`))) group by `pp`.`id_penjualan`;

-- membuang struktur untuk view si_sarung.view_penjualan_kartu_hutang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penjualan_kartu_hutang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penjualan_kartu_hutang` AS select `p`.`id_penjualan` AS `id_penjualan`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_faktur` AS `no_faktur`,`p`.`sufix_no_faktur` AS `sufix_no_faktur`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_faktur` AS `tanggal_faktur`,`p`.`tanggal_tempo` AS `tanggal_tempo`,`p`.`id_pelanggan` AS `id_pelanggan`,`p`.`nominal_potongan` AS `nominal_potongan`,`p`.`pajak` AS `pajak`,`p`.`no_faktur_pajak` AS `no_faktur_pajak`,`p`.`status` AS `status`,`p`.`keterangan` AS `keterangan`,`p`.`id_akun_piutang` AS `id_akun_piutang`,`p`.`id_akun_potongan` AS `id_akun_potongan`,`p`.`id_akun_pajak` AS `id_akun_pajak`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`p`.`nominal_total` AS `nominal_total`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_netto` AS `nominal_netto`,`p`.`total_bayar` AS `total_bayar`,`p`.`nama_pelanggan` AS `nama_pelanggan`,`p`.`pic` AS `pic`,`p`.`tanggal_faktur` AS `tanggal_bukti`,ifnull(concat(`p`.`no_faktur`,`p`.`sufix_no_faktur`),0) AS `no_bukti`,`p`.`keterangan` AS `keterangan_bukti`,ifnull(`p`.`nominal_netto`,0) AS `penjualan`,ifnull(`p`.`total_bayar`,0) AS `pembayaran` from `view_penjualan_bayar` `p` union all select `p`.`id_penjualan` AS `id_penjualan`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_faktur` AS `no_faktur`,`p`.`sufix_no_faktur` AS `sufix_no_faktur`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_faktur` AS `tanggal_faktur`,`p`.`tanggal_tempo` AS `tanggal_tempo`,`p`.`id_pelanggan` AS `id_pelanggan`,`p`.`nominal_potongan` AS `nominal_potongan`,`p`.`pajak` AS `pajak`,`p`.`no_faktur_pajak` AS `no_faktur_pajak`,`p`.`status` AS `status`,`p`.`keterangan` AS `keterangan`,`p`.`id_akun_piutang` AS `id_akun_piutang`,`p`.`id_akun_potongan` AS `id_akun_potongan`,`p`.`id_akun_pajak` AS `id_akun_pajak`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`p`.`nominal_total` AS `nominal_total`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_netto` AS `nominal_netto`,`p`.`total_bayar` AS `total_bayar`,`p`.`nama_pelanggan` AS `nama_pelanggan`,`p`.`pic` AS `pic`,`t`.`tanggal_bayar` AS `tanggal_bukti`,ifnull(`t`.`no_transaksi_bayar`,0) AS `no_bukti`,concat('Penerimaan dari ',ifnull(concat(`p`.`no_faktur`,`p`.`sufix_no_faktur`),0)) AS `keterangan_bukti`,0 AS `penjualan`,ifnull(`b`.`jum_bayar`,0) AS `pembayaran` from ((`view_penjualan_bayar` `p` left join `pen_penjualan_bayar` `b` on((`p`.`id_penjualan` = `b`.`id_penjualan`))) left join `pen_penjualan_transaksi_bayar` `t` on((`t`.`id` = `b`.`id_transaksi_bayar`)));

-- membuang struktur untuk view si_sarung.view_penjualan_kartu_piutang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penjualan_kartu_piutang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penjualan_kartu_piutang` AS select `p`.`id_penjualan` AS `id_penjualan`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_faktur` AS `no_faktur`,`p`.`sufix_no_faktur` AS `sufix_no_faktur`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_faktur` AS `tanggal_faktur`,`p`.`tanggal_tempo` AS `tanggal_tempo`,`p`.`id_pelanggan` AS `id_pelanggan`,`p`.`nominal_potongan` AS `nominal_potongan`,`p`.`pajak` AS `pajak`,`p`.`no_faktur_pajak` AS `no_faktur_pajak`,`p`.`status` AS `status`,`p`.`keterangan` AS `keterangan`,`p`.`id_akun_piutang` AS `id_akun_piutang`,`p`.`id_akun_potongan` AS `id_akun_potongan`,`p`.`id_akun_pajak` AS `id_akun_pajak`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`p`.`nominal_total` AS `nominal_total`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_netto` AS `nominal_netto`,`p`.`total_bayar` AS `total_bayar`,`p`.`nama_pelanggan` AS `nama_pelanggan`,`p`.`pic` AS `pic`,`p`.`tanggal_faktur` AS `tanggal_bukti`,ifnull(concat(`p`.`no_faktur`,`p`.`sufix_no_faktur`),0) AS `no_bukti`,`p`.`keterangan` AS `keterangan_bukti`,ifnull(`p`.`nominal_netto`,0) AS `penjualan`,0 AS `pembayaran`,(case when (`p`.`kode_sebagai` = 2) then `pp`.`mata_uang` else 1 end) AS `mata_uang`,(case when (`p`.`kode_sebagai` = 2) then `pp`.`kurs_jual` else 1 end) AS `kurs_jual` from ((`view_penjualan_bayar` `p` left join `pen_penjualan` `pp` on(((`p`.`id_penjualan` = `pp`.`id_penjualan`) and (`p`.`kode_sebagai` = 2)))) left join `pen_piutangawal` `pa` on(((`pa`.`id` = `p`.`id_penjualan`) and (`p`.`kode_sebagai` = 1)))) union all select `p`.`id_penjualan` AS `id_penjualan`,`p`.`lokasi` AS `lokasi`,`p`.`user_id_create` AS `user_id_create`,`p`.`user_id_update` AS `user_id_update`,`p`.`cv` AS `cv`,`p`.`no_faktur` AS `no_faktur`,`p`.`sufix_no_faktur` AS `sufix_no_faktur`,`p`.`tanggal` AS `tanggal`,`p`.`tanggal_faktur` AS `tanggal_faktur`,`p`.`tanggal_tempo` AS `tanggal_tempo`,`p`.`id_pelanggan` AS `id_pelanggan`,`p`.`nominal_potongan` AS `nominal_potongan`,`p`.`pajak` AS `pajak`,`p`.`no_faktur_pajak` AS `no_faktur_pajak`,`p`.`status` AS `status`,`p`.`keterangan` AS `keterangan`,`p`.`id_akun_piutang` AS `id_akun_piutang`,`p`.`id_akun_potongan` AS `id_akun_potongan`,`p`.`id_akun_pajak` AS `id_akun_pajak`,`p`.`created_at` AS `created_at`,`p`.`updated_at` AS `updated_at`,`p`.`nominal_total` AS `nominal_total`,`p`.`nominal_pajak` AS `nominal_pajak`,`p`.`nominal_netto` AS `nominal_netto`,`p`.`total_bayar` AS `total_bayar`,`p`.`nama_pelanggan` AS `nama_pelanggan`,`p`.`pic` AS `pic`,`t`.`tanggal_bayar` AS `tanggal_bukti`,ifnull(`t`.`no_transaksi_bayar`,0) AS `no_bukti`,concat('Pembayaran dari ',`p`.`nama_pelanggan`,' untuk nota tgl ',convert(date_format(`p`.`tanggal_faktur`,'%d/%m/%Y') using latin1),' - ',ifnull(concat(`p`.`no_faktur`,`p`.`sufix_no_faktur`),0)) AS `keterangan_bukti`,0 AS `penjualan`,(case when (`p`.`kode_sebagai` = 1) then ifnull(`pb`.`jum_bayar`,0) else ifnull(`b`.`jum_bayar`,0) end) AS `pembayaran`,(case when (`p`.`kode_sebagai` = 2) then `pp`.`mata_uang` else 1 end) AS `mata_uang`,(case when (`p`.`kode_sebagai` = 2) then `pp`.`kurs_jual` else 1 end) AS `kurs_jual` from (((((`view_penjualan_bayar` `p` left join `pen_penjualan` `pp` on(((`p`.`id_penjualan` = `pp`.`id_penjualan`) and (`p`.`kode_sebagai` = 2)))) left join `pen_piutangawal` `pa` on(((`p`.`id_penjualan` = `pa`.`id`) and (`p`.`kode_sebagai` = 1)))) left join `pen_penjualan_bayar` `b` on(((`p`.`id_penjualan` = `b`.`id_penjualan`) and (`p`.`kode_sebagai` = 2)))) left join `pen_piutangawal_bayar` `pb` on(((`p`.`id_penjualan` = `pb`.`id_piutangawal`) and (`p`.`kode_sebagai` = 1)))) left join `pen_penjualan_transaksi_bayar` `t` on(((`t`.`id` = `b`.`id_transaksi_bayar`) or (`t`.`id` = `pb`.`id_transaksi_bayar`))));

-- membuang struktur untuk view si_sarung.view_penjualan_retur
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penjualan_retur`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penjualan_retur` AS select `ppr`.`id` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`ppb`.`jml_retur` AS `jum_barang`,`ppb`.`jml_retur` AS `masuk`,'0' AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,date_format(`ppr`.`tanggal_full`,'%Y-%m-%d') AS `tanggal`,`mp`.`id_proses` AS `id_proses`,`mp`.`nama_proses` AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`mst`.`id_satuan`) then '' else `mst`.`id_satuan` end) AS `id_satuan`,(case when isnull(`mst`.`id_satuan`) then '' else `mst`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,'' AS `id_workorder`,'' AS `nama_workorder`,'' AS `id_workorder_barang`,'' AS `no_workorder_barang`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`id_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`pb`.`id_kualitas_dudul` = '0') then '' else `pb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`pb`.`id_kualitas_dudul` = '0') then '' when (`pb`.`id_kualitas_dudul` = '1') then 'Baik' else 'Jelek' end) AS `nama_kualitas_dudul`,(case when (`pb`.`id_label` = '0') then '' else `pb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`pb`.`id_kemasan` = '0') then '' else `pb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`pb`.`id_kemasansatuan` = '0') then '' else `pb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`pb`.`id_kemasansepuluh` = '0') then '' else `pb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`pb`.`id_kemasanseratus` = '0') then '' else `pb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`pb`.`id_cap` = '0') then '' else `pb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`pb`.`id_kualitas_proses` = '0') then '' else `pb`.`id_kualitas_proses` end) AS `id_kualitas_proses`,(case when isnull(`mk2`.`nama_kualitas`) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`pb`.`id_kualitas_periksa` = '0') then '' else `pb`.`id_kualitas_periksa` end) AS `id_kualitas_periksa`,(case when isnull(`mk3`.`nama_kualitas`) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`nama_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`pb`.`jumlah_rencana`) or (`pb`.`jumlah_rencana` = '0')) then '' else `pb`.`jumlah_rencana` end) AS `jumlah_rencana`,`ppr`.`tanggal_full` AS `tanggal_full` from (((((((((((((((((((((`pen_penjualan_retur` `ppr` join `pen_penjualan_retur_barang` `ppb` on((`ppr`.`id` = `ppb`.`id_penjualan_retur`))) join `pen_penjualan_barang` `pb` on((`ppb`.`id_penjualan_barang` = `pb`.`id_jual_barang`))) join `ms_barang` `mb` on((`pb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`pb`.`id_gudang` = `mg`.`id_gudang`))) join `ms_proses` `mp` on((`pb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`pb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `mst` on((`pb`.`id_satuan` = `mst`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`pb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`pb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`pb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`pb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`pb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`pb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`pb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`pb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`pb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`pb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`pb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`pb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`pb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`pb`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_penjualan_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_penjualan_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_penjualan_sub` AS select `pp`.`id_penjualan` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`ppb`.`jml_barang` AS `jum_barang`,0 AS `masuk`,`ppb`.`jml_barang` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,date_format(`pp`.`tanggal_full`,'%Y-%m-%d') AS `tanggal`,`ppb`.`id_proses` AS `id_proses`,`mp`.`nama_proses` AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`mst`.`id_satuan`) then '' else `mst`.`id_satuan` end) AS `id_satuan`,(case when isnull(`mst`.`nama_satuan`) then '' else `mst`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`ppb`.`id_kualitas` = 0) then '' else `ppb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`ppb`.`id_kualitas_dudul` = 0) then '' else `ppb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`ppb`.`id_kualitas_dudul` = 0) then '' when (`ppb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`ppb`.`id_label` = 0) then '' else `ppb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`ppb`.`id_kemasan` = 0) then '' else `ppb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`ppb`.`id_kemasansatuan` = 0) then '' else `ppb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`ppb`.`id_kemasansepuluh` = 0) then '' else `ppb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`ppb`.`id_kemasanseratus` = 0) then '' else `ppb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`ppb`.`id_cap` = 0) then '' else `ppb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`ppb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`ppb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`ppb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`ppb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`ppb`.`jumlah_rencana`) or (`ppb`.`jumlah_rencana` = 0)) then '' else `ppb`.`jumlah_rencana` end) AS `jumlah_rencana`,`pp`.`tanggal_full` AS `tanggal_full` from ((((((((((((((((((((`pen_penjualan` `pp` join `pen_penjualan_barang` `ppb` on((`pp`.`id_penjualan` = `ppb`.`id_penjualan`))) join `ms_barang` `mb` on((`ppb`.`id_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`ppb`.`id_gudang` = `mg`.`id_gudang`))) join `ms_proses` `mp` on((`ppb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`ppb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `mst` on((`ppb`.`id_satuan` = `mst`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`ppb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`ppb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`ppb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`ppb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`ppb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`ppb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`ppb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`ppb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`ppb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`ppb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`ppb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`ppb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`ppb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`ppb`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_rekanan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_rekanan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_rekanan` AS select `pb`.`id_barangkeluar` AS `id_barangkeluar`,`pb`.`tanggal` AS `tanggal`,`pb`.`id_rekanan` AS `id_rekanan`,`pb`.`id_pegawai` AS `id_pegawai`,`pb`.`id_mesin` AS `id_mesin`,`pb`.`id_proses` AS `id_proses`,`pb`.`id_proses_sebelum` AS `id_proses_sebelum`,`pb`.`id_workorder` AS `id_workorder`,`pb`.`id_workorder_barang` AS `id_workorder_barang`,`pb`.`id_lokasi` AS `id_lokasi`,`pb`.`tanggal_perkiraan` AS `tanggal_perkiraan`,`pb`.`jumlah` AS `jumlah`,`pb`.`status` AS `status`,`pb`.`status_beem` AS `status_beem`,`pb`.`tanggal_beem` AS `tanggal_beem`,`pb`.`status_workorder` AS `status_workorder`,`pb`.`created_at` AS `created_at`,`pb`.`update_at` AS `update_at`,`pb`.`noAuto` AS `noAuto`,`mr`.`nama` AS `nama_rekanan`,`mpg`.`nama_pegawai` AS `nama_pegawai`,`mp`.`nama_proses` AS `nama_proses`,`mb`.`id` AS `id`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`ms`.`nama_satuan` AS `nama_satuan`,`ms`.`satuan` AS `satuan`,`pwb`.`no_workorder` AS `no_workorder`,`mlp`.`nama_lokasi` AS `nama_lokasi`,sum(`pbb`.`jumlah`) AS `jum_keluar` from ((((((((`pro_barangkeluar` `pb` join `pro_barangkeluar_barang` `pbb` on((`pb`.`id_barangkeluar` = `pbb`.`id_barangkeluar`))) left join `ms_proses` `mp` on((`pb`.`id_proses` = `mp`.`id_proses`))) join `ms_barang` `mb` on((`pbb`.`id_barang` = `mb`.`id`))) left join `ms_satuan` `ms` on((`mb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_rekanan` `mr` on((`pb`.`id_rekanan` = `mr`.`id_rekanan`))) left join `ms_pegawai` `mpg` on((`pb`.`id_pegawai` = `mpg`.`id_pegawai`))) left join `pem_workorder_barang` `pwb` on((`pb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_lokasi_produksi` `mlp` on((`pb`.`id_lokasi` = `mlp`.`id_lokasi`))) where ((`pb`.`status` <> '2') and (`pb`.`status` <> 0)) group by `pb`.`id_barangkeluar`;

-- membuang struktur untuk view si_sarung.view_rekanan_kemasan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_rekanan_kemasan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_rekanan_kemasan` AS select `pbk`.`id_barangkeluar_kemasan` AS `id_barangkeluar_kemasan`,`pbk`.`tanggal` AS `tanggal`,`pbk`.`tanggal_perkiraan` AS `tanggal_perkiraan`,(case when (`pbk`.`id_proses` = 0) then '' else `pbk`.`id_proses` end) AS `id_proses`,(case when isnull(`mpro`.`nama_proses`) then '' else `mpro`.`nama_proses` end) AS `nama_proses`,`pbk`.`id_pegawai` AS `id_pegawai`,`mp`.`nama_pegawai` AS `nama_pegawai`,`pbk`.`id_rekanan` AS `id_rekanan`,`mr`.`nama` AS `nama_rekanan`,`pbk`.`id_lokasi` AS `id_lokasi`,`mlp`.`nama_lokasi` AS `nama_lokasi` from (((((((`pro_barangkeluar_kemasan` `pbk` join `pro_barangkeluar_kemasan_barang` `pbkb`) left join `ms_barang` `mb` on((`pbkb`.`id_barang` = `mb`.`id`))) left join `ms_satuan` `ms` on((`pbkb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_rekanan` `mr` on((`pbk`.`id_rekanan` = `mr`.`id_rekanan`))) left join `ms_pegawai` `mp` on((`pbk`.`id_pegawai` = `mp`.`id_pegawai`))) left join `ms_proses` `mpro` on((`pbk`.`id_proses` = `mpro`.`id_proses`))) left join `ms_lokasi_produksi` `mlp` on((`pbk`.`id_lokasi` = `mlp`.`id_lokasi`))) where ((`pbk`.`status` <> '2') and (`pbk`.`status` <> '0')) group by `pbk`.`id_barangkeluar_kemasan`;

-- membuang struktur untuk view si_sarung.view_retur_tagihan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_retur_tagihan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_retur_tagihan` AS select `rtp`.`id` AS `id_rtp`,`rtp`.`lokasi` AS `lokasi`,`rtp`.`user_id_create` AS `user_id_create`,`rtp`.`user_id_update` AS `user_id_update`,`rtp`.`cv` AS `cv`,`rtp`.`no_retur` AS `no_retur`,`rtp`.`sufix_no_retur` AS `sufix_no_retur`,`rtp`.`tanggal` AS `tanggal`,`rtp`.`tanggal_retur` AS `tanggal_retur`,`rtp`.`id_pelanggan` AS `id_pelanggan`,`rtp`.`id_penjualan` AS `id_penjualan`,`rtp`.`mata_uang` AS `mata_uang`,`rtp`.`kurs` AS `kurs`,`rtp`.`nominal_retur` AS `nominal_retur`,`rtp`.`id_akun` AS `id_akun`,`rtp`.`tipe_id_akun` AS `tipe_akun`,`rtp`.`keterangan` AS `keterangan`,2 AS `kode_sebagai` from `retur_tagihan_penjualan` `rtp` union all select `rtp`.`id` AS `id_rtp`,`rtp`.`lokasi` AS `lokasi`,`rtp`.`user_id_create` AS `user_id_create`,`rtp`.`user_id_update` AS `user_id_update`,`rtp`.`cv` AS `cv`,`rtp`.`no_retur` AS `no_retur`,`rtp`.`sufix_no_retur` AS `sufix_no_retur`,`rtp`.`tanggal` AS `tanggal`,`rtp`.`tanggal_retur` AS `tanggal_retur`,`rtp`.`id_pelanggan` AS `id_pelanggan`,`rtp`.`id_piutangawal` AS `id_penjualan`,`rtp`.`mata_uang` AS `mata_uang`,`rtp`.`kurs` AS `kurs`,`rtp`.`nominal_retur` AS `nominal_retur`,`rtp`.`id_akun` AS `id_akun`,`rtp`.`tipe_id_akun` AS `tipe_akun`,`rtp`.`keterangan` AS `keterangan`,1 AS `kode_sebagai` from `retur_tagihan_piutangawal` `rtp`;

-- membuang struktur untuk view si_sarung.view_retur_tagihan_bypelanggan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_retur_tagihan_bypelanggan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_retur_tagihan_bypelanggan` AS select `rtp`.`id_rtp` AS `id_rtp`,`rtp`.`lokasi` AS `lokasi`,`rtp`.`user_id_create` AS `user_id_create`,`rtp`.`user_id_update` AS `user_id_update`,`rtp`.`cv` AS `cv`,`rtp`.`no_retur` AS `no_retur`,`rtp`.`sufix_no_retur` AS `sufix_no_retur`,`rtp`.`tanggal` AS `tanggal`,`rtp`.`tanggal_retur` AS `tanggal_retur`,`rtp`.`id_pelanggan` AS `id_pelanggan`,`rtp`.`id_penjualan` AS `id_penjualan`,`rtp`.`mata_uang` AS `mata_uang`,`rtp`.`kurs` AS `kurs`,sum(`rtp`.`nominal_retur`) AS `total_retur`,`rtp`.`id_akun` AS `id_akun`,`rtp`.`tipe_akun` AS `tipe_akun`,`rtp`.`keterangan` AS `keterangan`,2 AS `kode_sebagai` from `view_retur_tagihan` `rtp` group by `rtp`.`id_pelanggan`;

-- membuang struktur untuk view si_sarung.view_rubahspk
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_rubahspk`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_rubahspk` AS select `view_rubahspk_keluar`.`id` AS `id`,`view_rubahspk_keluar`.`id_barang` AS `id_barang`,`view_rubahspk_keluar`.`kode_barang` AS `kode_barang`,`view_rubahspk_keluar`.`nama_barang` AS `nama_barang`,`view_rubahspk_keluar`.`jum_barang` AS `jumlah`,0 AS `masuk`,`view_rubahspk_keluar`.`keluar` AS `keluar`,`view_rubahspk_keluar`.`id_gudang` AS `id_gudang`,`view_rubahspk_keluar`.`nama_gudang` AS `nama_gudang`,`view_rubahspk_keluar`.`tanggal` AS `tanggal`,`view_rubahspk_keluar`.`id_proses` AS `id_proses`,`view_rubahspk_keluar`.`nama_proses` AS `nama_proses`,`view_rubahspk_keluar`.`id_komposisi` AS `id_komposisi`,`view_rubahspk_keluar`.`nama_komposisi` AS `nama_komposisi`,`view_rubahspk_keluar`.`id_satuan` AS `id_satuan`,`view_rubahspk_keluar`.`nama_satuan` AS `nama_satuan`,`view_rubahspk_keluar`.`id_corak` AS `id_corak`,`view_rubahspk_keluar`.`nama_corak` AS `nama_corak`,`view_rubahspk_keluar`.`id_motif` AS `id_motif`,`view_rubahspk_keluar`.`nama_motif` AS `nama_motif`,`view_rubahspk_keluar`.`id_workorder` AS `id_workorder`,`view_rubahspk_keluar`.`no_workorder` AS `no_workorder`,`view_rubahspk_keluar`.`id_workorder_barang` AS `id_workorder_barang`,`view_rubahspk_keluar`.`no_workorder_barang` AS `no_workorder_barang`,`view_rubahspk_keluar`.`id_kualitas` AS `id_kualitas`,`view_rubahspk_keluar`.`nama_kualitas` AS `nama_kualitas`,`view_rubahspk_keluar`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_rubahspk_keluar`.`kualitas_dudul` AS `kualitas_dudul`,`view_rubahspk_keluar`.`id_label` AS `id_label`,`view_rubahspk_keluar`.`nama_label` AS `nama_label`,`view_rubahspk_keluar`.`id_kemasan` AS `id_kemasan`,`view_rubahspk_keluar`.`nama_kemasan` AS `nama_kemasan`,`view_rubahspk_keluar`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_rubahspk_keluar`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_rubahspk_keluar`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_rubahspk_keluar`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_rubahspk_keluar`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_rubahspk_keluar`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_rubahspk_keluar`.`id_cap` AS `id_cap`,`view_rubahspk_keluar`.`nama_cap` AS `nama_cap`,`view_rubahspk_keluar`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_rubahspk_keluar`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_rubahspk_keluar`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_rubahspk_keluar`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_rubahspk_keluar`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_rubahspk_keluar`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_rubahspk_keluar`.`jumlah_rencana` AS `jumlah_rencana`,`view_rubahspk_keluar`.`tanggal_full` AS `tanggal_full` from `view_rubahspk_keluar` union all select `view_rubahspk_masuk`.`id` AS `id`,`view_rubahspk_masuk`.`id_barang` AS `id_barang`,`view_rubahspk_masuk`.`kode_barang` AS `kode_barang`,`view_rubahspk_masuk`.`nama_barang` AS `nama_barang`,`view_rubahspk_masuk`.`jum_barang` AS `jumlah`,`view_rubahspk_masuk`.`masuk` AS `masuk`,0 AS `keluar`,`view_rubahspk_masuk`.`id_gudang` AS `id_gudang`,`view_rubahspk_masuk`.`nama_gudang` AS `nama_gudang`,`view_rubahspk_masuk`.`tanggal` AS `tanggal`,`view_rubahspk_masuk`.`id_proses` AS `id_proses`,`view_rubahspk_masuk`.`nama_proses` AS `nama_proses`,`view_rubahspk_masuk`.`id_komposisi` AS `id_komposisi`,`view_rubahspk_masuk`.`nama_komposisi` AS `nama_komposisi`,`view_rubahspk_masuk`.`id_satuan` AS `id_satuan`,`view_rubahspk_masuk`.`nama_satuan` AS `nama_satuan`,`view_rubahspk_masuk`.`id_corak` AS `id_corak`,`view_rubahspk_masuk`.`nama_corak` AS `nama_corak`,`view_rubahspk_masuk`.`id_motif` AS `id_motif`,`view_rubahspk_masuk`.`nama_motif` AS `nama_motif`,`view_rubahspk_masuk`.`id_workorder` AS `id_workorder`,`view_rubahspk_masuk`.`no_workorder` AS `no_workorder`,`view_rubahspk_masuk`.`id_workorder_barang` AS `id_workorder_barang`,`view_rubahspk_masuk`.`no_workorder_barang` AS `no_workorder_barang`,`view_rubahspk_masuk`.`id_kualitas` AS `id_kualitas`,`view_rubahspk_masuk`.`nama_kualitas` AS `nama_kualitas`,`view_rubahspk_masuk`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_rubahspk_masuk`.`kualitas_dudul` AS `kualitas_dudul`,`view_rubahspk_masuk`.`id_label` AS `id_label`,`view_rubahspk_masuk`.`nama_label` AS `nama_label`,`view_rubahspk_masuk`.`id_kemasan` AS `id_kemasan`,`view_rubahspk_masuk`.`nama_kemasan` AS `nama_kemasan`,`view_rubahspk_masuk`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_rubahspk_masuk`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_rubahspk_masuk`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_rubahspk_masuk`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_rubahspk_masuk`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_rubahspk_masuk`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_rubahspk_masuk`.`id_cap` AS `id_cap`,`view_rubahspk_masuk`.`nama_cap` AS `nama_cap`,`view_rubahspk_masuk`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_rubahspk_masuk`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_rubahspk_masuk`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_rubahspk_masuk`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_rubahspk_masuk`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_rubahspk_masuk`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_rubahspk_masuk`.`jumlah_rencana` AS `jumlah_rencana`,`view_rubahspk_masuk`.`tanggal_full` AS `tanggal_full` from `view_rubahspk_masuk`;

-- membuang struktur untuk view si_sarung.view_rubahspk_keluar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_rubahspk_keluar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_rubahspk_keluar` AS select `ir`.`id_rubahspk` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`irb`.`jumlah` AS `jum_barang`,0 AS `masuk`,`irb`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`ir`.`tanggal` AS `tanggal`,(case when (`irb`.`id_proses` = 0) then '' else `irb`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`irb`.`id_kualitas` = 0) then '' else `irb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`irb`.`id_kualitas_dudul` = 0) then '' else `irb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`irb`.`id_kualitas_dudul` = 0) then '' when (`irb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`irb`.`id_label` = 0) then '' else `irb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`irb`.`id_kemasan` = 0) then '' else `irb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`irb`.`id_kemasansatuan` = 0) then '' else `irb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`irb`.`id_kemasansepuluh` = 0) then '' else `irb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`irb`.`id_kemasanseratus` = 0) then '' else `irb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`irb`.`id_cap` = 0) then '' else `irb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`irb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`irb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`irb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`irb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`irb`.`jumlah_rencana`) or (`irb`.`jumlah_rencana` = 0)) then '' else `irb`.`jumlah_rencana` end) AS `jumlah_rencana`,`ir`.`tanggal_full` AS `tanggal_full` from ((((((((((((((((((((`inv_rubahspk` `ir` join `inv_rubahspk_barang` `irb` on((`ir`.`id_rubahspk` = `irb`.`id_rubahspk`))) join `ms_barang` `mb` on((`irb`.`kode_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`irb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `irb`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`irb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`irb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`irb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`irb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`irb`.`id_workorder_awal` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`irb`.`id_workorder_barang_awal` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`irb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`irb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`irb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`irb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`irb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`irb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`irb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`irb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`irb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`irb`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_rubahspk_masuk
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_rubahspk_masuk`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_rubahspk_masuk` AS select `ir`.`id_rubahspk` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`irb`.`jumlah` AS `jum_barang`,`irb`.`jumlah` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`ir`.`tanggal` AS `tanggal`,(case when (`irb`.`id_proses` = 0) then '' else `irb`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`irb`.`id_kualitas` = 0) then '' else `irb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`irb`.`id_kualitas_dudul` = 0) then '' else `irb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`irb`.`id_kualitas_dudul` = 0) then '' when (`irb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`irb`.`id_label` = 0) then '' else `irb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`irb`.`id_kemasan` = 0) then '' else `irb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`irb`.`id_kemasansatuan` = 0) then '' else `irb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`irb`.`id_kemasansepuluh` = 0) then '' else `irb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`irb`.`id_kemasanseratus` = 0) then '' else `irb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`irb`.`id_cap` = 0) then '' else `irb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`irb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`irb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`irb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`irb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`irb`.`jumlah_rencana`) or (`irb`.`jumlah_rencana` = 0)) then '' else `irb`.`jumlah_rencana` end) AS `jumlah_rencana`,`ir`.`tanggal_full` AS `tanggal_full` from ((((((((((((((((((((`inv_rubahspk` `ir` join `inv_rubahspk_barang` `irb` on((`ir`.`id_rubahspk` = `irb`.`id_rubahspk`))) join `ms_barang` `mb` on((`irb`.`kode_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`irb`.`id_gudang` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `irb`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`irb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`irb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`irb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`irb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`irb`.`id_workorder_akhir` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`irb`.`id_workorder_barang_akhir` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`irb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`irb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`irb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`irb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`irb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`irb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`irb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`irb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`irb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`irb`.`id_perubahansatuan` = `ms2`.`id_satuan`)));

-- membuang struktur untuk view si_sarung.view_saldoawal
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_saldoawal`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_saldoawal` AS select `vps`.`id` AS `id`,`vps`.`kd_rek_1` AS `kd_rek_1`,`vps`.`kode_perkiraan` AS `kode_perkiraan`,`vps`.`nama_perkiraan` AS `nama_perkiraan`,`vps`.`level` AS `level`,`vps`.`saldo_normal` AS `saldo_normal`,`vps`.`used` AS `used`,`vps`.`parent` AS `parent`,`vps`.`locked` AS `locked`,`vps`.`created_at` AS `created_at`,`vps`.`updated_at` AS `updated_at`,`vps`.`id_tanggal_saldo` AS `id_tanggal_saldo`,`vps`.`tanggal_awal` AS `tanggal_awal`,`vps`.`tanggal_akhir` AS `tanggal_akhir`,`vps`.`tahun` AS `tahun`,`mps`.`id_saldoawal` AS `id_saldoawal`,`mps`.`id_perkiraan` AS `id_perkiraan`,`mps`.`nominal` AS `nominal` from (`view_saldoawal_sub` `vps` join `ms_perkiraan_saldoawal` `mps` on(((`mps`.`id_tanggalsaldo` = `vps`.`id_tanggal_saldo`) and (`mps`.`id_perkiraan` = `vps`.`id`))));

-- membuang struktur untuk view si_sarung.view_saldoawal_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_saldoawal_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_saldoawal_sub` AS select `mp`.`id` AS `id`,`mp`.`kd_rek_1` AS `kd_rek_1`,`mp`.`kode_perkiraan` AS `kode_perkiraan`,`mp`.`nama_perkiraan` AS `nama_perkiraan`,`mp`.`level` AS `level`,`mp`.`saldo_normal` AS `saldo_normal`,`mp`.`used` AS `used`,`mp`.`parent` AS `parent`,`mp`.`locked` AS `locked`,`mp`.`created_at` AS `created_at`,`mp`.`updated_at` AS `updated_at`,(select `ms_perkiraan_tanggalsaldo`.`id_tanggal_saldoawal` from `ms_perkiraan_tanggalsaldo` order by `ms_perkiraan_tanggalsaldo`.`id_tanggal_saldoawal` desc limit 1) AS `id_tanggal_saldo`,(select `ms_perkiraan_tanggalsaldo`.`tanggal_awal` from `ms_perkiraan_tanggalsaldo` order by `ms_perkiraan_tanggalsaldo`.`id_tanggal_saldoawal` desc limit 1) AS `tanggal_awal`,(select `ms_perkiraan_tanggalsaldo`.`tanggal_akhir` from `ms_perkiraan_tanggalsaldo` order by `ms_perkiraan_tanggalsaldo`.`id_tanggal_saldoawal` desc limit 1) AS `tanggal_akhir`,(select `ms_perkiraan_tanggalsaldo`.`tahun` from `ms_perkiraan_tanggalsaldo` order by `ms_perkiraan_tanggalsaldo`.`id_tanggal_saldoawal` desc limit 1) AS `tahun` from `ms_perkiraan` `mp` where (`mp`.`used` = 1) group by `mp`.`kode_perkiraan`;

-- membuang struktur untuk view si_sarung.view_semua_workorder
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_semua_workorder`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_semua_workorder` AS select `pw`.`id_workorder` AS `id_workorder`,`pw`.`nomor` AS `nomor`,`pwk`.`id_workorder_barang` AS `id_workorder_barang`,`pwk`.`no_workorder` AS `no_workorder` from ((`pro_barangkeluar` `pb` join `pem_workorder_barang` `pwk` on((`pb`.`id_workorder_barang` = `pwk`.`id_workorder_barang`))) join `pem_workorder` `pw` on((`pw`.`id_workorder` = `pwk`.`id_workorder`))) where (`pb`.`status_workorder` <> '1') group by `pwk`.`id_workorder_barang`;

-- membuang struktur untuk view si_sarung.view_sewa_bayar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_sewa_bayar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_sewa_bayar` AS select `ps`.`id_sewa` AS `id_sewa`,`ps`.`id_lokasi` AS `id_lokasi`,`ps`.`user_id_create` AS `user_id_create`,`ps`.`user_id_update` AS `user_id_update`,`ps`.`no_faktur` AS `no_faktur`,`ps`.`tanggal_faktur` AS `tanggal_faktur`,`ps`.`tahun` AS `tahun`,`ps`.`harga_per_tahun` AS `harga_per_tahun`,`ps`.`tanggal_awal` AS `tanggal_awal`,`ps`.`tanggal_akhir` AS `tanggal_akhir`,`ps`.`id_penyedia` AS `id_penyedia`,`ps`.`fungsi` AS `fungsi`,`ps`.`jenis` AS `jenis`,`ps`.`alamat` AS `alamat`,`ps`.`keterangan` AS `keterangan`,`ps`.`costing` AS `costing`,`ps`.`id_akun_sewa` AS `id_akun_sewa`,`ps`.`created_at` AS `created_at`,`ps`.`updated_at` AS `updated_at`,`ps`.`nama_lokasi` AS `nama_lokasi`,`ps`.`nominal_total` AS `nominal_total`,sum(ifnull(`psb`.`jumlah_bayar`,0)) AS `total_bayar`,`mp`.`nama` AS `nama_penyedia`,`mp`.`pic` AS `pic` from ((`a_pem_sewa` `ps` left join `pem_sewa_bayar` `psb` on((`ps`.`id_sewa` = `psb`.`id_sewa`))) join `ms_penyedia` `mp` on((`mp`.`id_penyedia` = `ps`.`id_penyedia`))) group by `ps`.`id_sewa`;

-- membuang struktur untuk view si_sarung.view_sub_mutasi
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_sub_mutasi`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_sub_mutasi` AS select `vi`.`id` AS `id`,`vi`.`id_barang` AS `id_barang`,`vi`.`kode_barang` AS `kode_barang`,`vi`.`nama_barang` AS `nama_barang`,`vi`.`jumlah` AS `jumlah`,`vi`.`masuk` AS `masuk`,`vi`.`keluar` AS `keluar`,`vi`.`id_gudang` AS `id_gudang`,`vi`.`nama_gudang` AS `nama_gudang`,`vi`.`tanggal` AS `tanggal`,`vi`.`id_proses` AS `id_proses`,`vi`.`nama_proses` AS `nama_proses`,`vi`.`id_komposisi` AS `id_komposisi`,`vi`.`nama_komposisi` AS `nama_komposisi`,`vi`.`id_satuan` AS `id_satuan`,`vi`.`nama_satuan` AS `nama_satuan`,`vi`.`id_corak` AS `id_corak`,`vi`.`nama_corak` AS `nama_corak`,`vi`.`id_motif` AS `id_motif`,`vi`.`nama_motif` AS `nama_motif`,`vi`.`id_workorder` AS `id_workorder`,`vi`.`no_workorder` AS `no_workorder`,`vi`.`id_workorder_barang` AS `id_workorder_barang`,`vi`.`no_workorder_barang` AS `no_workorder_barang`,`vi`.`id_kualitas` AS `id_kualitas`,`vi`.`nama_kualitas` AS `nama_kualitas`,`vi`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vi`.`kualitas_dudul` AS `kualitas_dudul`,`vi`.`id_label` AS `id_label`,`vi`.`nama_label` AS `nama_label`,`vi`.`id_kemasan` AS `id_kemasan`,`vi`.`nama_kemasan` AS `nama_kemasan`,`vi`.`id_kemasansatuan` AS `id_kemasansatuan`,`vi`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vi`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vi`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vi`.`id_kemasanseratus` AS `id_kemasanseratus`,`vi`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vi`.`id_cap` AS `id_cap`,`vi`.`nama_cap` AS `nama_cap`,`vi`.`id_kualitas_proses` AS `id_kualitas_proses`,`vi`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vi`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vi`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vi`.`id_perubahansatuan` AS `id_perubahansatuan`,`vi`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vi`.`jumlah_rencana` AS `jumlah_rencana`,`vi`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Saldo Awal' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vi`.`id_komposisi`) or (`vi`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vi`.`id_komposisi`) or (`vi`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vi`.`id_komposisi`) or (`vi`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,'' AS `ket_proses` from ((`view_inv_saldoawal` `vi` join `inv_saldoawal` `isa` on((`vi`.`id` = `isa`.`id`))) left join `ms_warnakomposisi` `mk` on((`vi`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,`vp`.`jumlah` AS `jumlah`,`vp`.`masuk` AS `masuk`,`vp`.`keluar` AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,`vp`.`id_satuan` AS `id_satuan`,`vp`.`nama_satuan` AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,`vp`.`tanggal_full` AS `tanggal_full`,concat(`pp`.`no_faktur`,`pp`.`sufix_no_faktur`) AS `ket_1`,`mp`.`nama` AS `ket_2`,concat('Pembelian dari : ',`mp`.`nama`) AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses` from ((`view_penerimaan` `vp` join `pem_pembelian` `pp` on((`vp`.`id` = `pp`.`id_pembelian`))) join `ms_penyedia` `mp` on((`pp`.`id_penyedia` = `mp`.`id_penyedia`))) union all select `vt`.`id` AS `id`,`vt`.`id_barang` AS `id_barang`,`vt`.`kode_barang` AS `kode_barang`,`vt`.`nama_barang` AS `nama_barang`,(`vt`.`jum_barang` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `jumlah`,0 AS `masuk`,(`vt`.`keluar` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `keluar`,`vt`.`id_gudang` AS `id_gudang`,`vt`.`nama_gudang` AS `nama_gudang`,`vt`.`tanggal` AS `tanggal`,`vt`.`id_proses` AS `id_proses`,`vt`.`nama_proses` AS `nama_proses`,`vt`.`id_komposisi` AS `id_komposisi`,`vt`.`nama_komposisi` AS `nama_komposisi`,`vt`.`id_satuan` AS `id_satuan`,`vt`.`nama_satuan` AS `nama_satuan`,`vt`.`id_corak` AS `id_corak`,`vt`.`nama_corak` AS `nama_corak`,`vt`.`id_motif` AS `id_motif`,`vt`.`nama_motif` AS `nama_motif`,`vt`.`id_workorder` AS `id_workorder`,`vt`.`no_workorder` AS `no_workorder`,`vt`.`id_workorder_barang` AS `id_workorder_barang`,`vt`.`no_workorder_barang` AS `no_workorder_barang`,`vt`.`id_kualitas` AS `id_kualitas`,`vt`.`nama_kualitas` AS `nama_kualitas`,`vt`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vt`.`kualitas_dudul` AS `kualitas_dudul`,`vt`.`id_label` AS `id_label`,`vt`.`nama_label` AS `nama_label`,`vt`.`id_kemasan` AS `id_kemasan`,`vt`.`nama_kemasan` AS `nama_kemasan`,`vt`.`id_kemasansatuan` AS `id_kemasansatuan`,`vt`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vt`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vt`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vt`.`id_kemasanseratus` AS `id_kemasanseratus`,`vt`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vt`.`id_cap` AS `id_cap`,`vt`.`nama_cap` AS `nama_cap`,`vt`.`id_kualitas_proses` AS `id_kualitas_proses`,`vt`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vt`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vt`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vt`.`id_perubahansatuan` AS `id_perubahansatuan`,`vt`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vt`.`jumlah_rencana` AS `jumlah_rencana`,`vt`.`tanggal_full` AS `tanggal_full`,concat(`it`.`no_faktur`,`it`.`faktur`) AS `ket_1`,`vt`.`nama_gudang` AS `ket_2`,'Transfer Keluar' AS `ket_3`,'' AS `ket_4`,`vt`.`keterangan` AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`vt`.`keterangan` AS `ket_proses` from ((`view_transferkeluar_all` `vt` join `inv_transfergudang` `it` on((`vt`.`id` = `it`.`id_transfergudang`))) left join `ms_warnakomposisi` `mk` on((`vt`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `vt`.`id` AS `id`,`vt`.`id_barang` AS `id_barang`,`vt`.`kode_barang` AS `kode_barang`,`vt`.`nama_barang` AS `nama_barang`,(`vt`.`jum_barang` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `jumlah`,(`vt`.`masuk` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `masuk`,0 AS `keluar`,`vt`.`id_gudang` AS `id_gudang`,`vt`.`nama_gudang` AS `nama_gudang`,`vt`.`tanggal` AS `tanggal`,`vt`.`id_proses` AS `id_proses`,`vt`.`nama_proses` AS `nama_proses`,`vt`.`id_komposisi` AS `id_komposisi`,`vt`.`nama_komposisi` AS `nama_komposisi`,`vt`.`id_satuan` AS `id_satuan`,`vt`.`nama_satuan` AS `nama_satuan`,`vt`.`id_corak` AS `id_corak`,`vt`.`nama_corak` AS `nama_corak`,`vt`.`id_motif` AS `id_motif`,`vt`.`nama_motif` AS `nama_motif`,`vt`.`id_workorder` AS `id_workorder`,`vt`.`no_workorder` AS `no_workorder`,`vt`.`id_workorder_barang` AS `id_workorder_barang`,`vt`.`no_workorder_barang` AS `no_workorder_barang`,`vt`.`id_kualitas` AS `id_kualitas`,`vt`.`nama_kualitas` AS `nama_kualitas`,`vt`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vt`.`kualitas_dudul` AS `kualitas_dudul`,`vt`.`id_label` AS `id_label`,`vt`.`nama_label` AS `nama_label`,`vt`.`id_kemasan` AS `id_kemasan`,`vt`.`nama_kemasan` AS `nama_kemasan`,`vt`.`id_kemasansatuan` AS `id_kemasansatuan`,`vt`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vt`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vt`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vt`.`id_kemasanseratus` AS `id_kemasanseratus`,`vt`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vt`.`id_cap` AS `id_cap`,`vt`.`nama_cap` AS `nama_cap`,`vt`.`id_kualitas_proses` AS `id_kualitas_proses`,`vt`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vt`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vt`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vt`.`id_perubahansatuan` AS `id_perubahansatuan`,`vt`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vt`.`jumlah_rencana` AS `jumlah_rencana`,`vt`.`tanggal_full` AS `tanggal_full`,concat(`it`.`no_faktur`,`it`.`faktur`) AS `ket_1`,`vt`.`nama_gudang` AS `ket_2`,'Transfer Masuk' AS `ket_3`,'' AS `ket_4`,`vt`.`keterangan` AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`vt`.`keterangan` AS `ket_proses` from ((`view_transfermasuk_all` `vt` join `inv_transfergudang` `it` on((`vt`.`id` = `it`.`id_transfergudang`))) left join `ms_warnakomposisi` `mk` on((`vt`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,`vp`.`jumlah` AS `jumlah`,`vp`.`masuk` AS `masuk`,`vp`.`keluar` AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,`vp`.`id_satuan` AS `id_satuan`,`vp`.`nama_satuan` AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,`vp`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Bon Bahan' AS `ket_3`,`mp`.`nama_proses` AS `ket_4`,'' AS `ket_5`,`vp`.`nilai_awal` AS `nilai_awal`,`vp`.`nilai_akhir` AS `nilai_akhir`,`vp`.`id_detail` AS `id_detail`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`pbb`.`keterangan` AS `ket_proses` from ((((`view_keluar_all` `vp` left join `pro_barangkeluar_barang` `pbb` on((`vp`.`id_detail` = `pbb`.`id`))) join `pro_barangkeluar` `pb` on((`pbb`.`id_barangkeluar` = `pb`.`id_barangkeluar`))) join `ms_proses` `mp` on((`pb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mk` on((`pbb`.`warna` = `mk`.`id_komposisi`))) union all select `vm`.`id` AS `id`,`vm`.`id_barang` AS `id_barang`,`vm`.`kode_barang` AS `kode_barang`,`vm`.`nama_barang` AS `nama_barang`,`vm`.`jum_barang` AS `jumlah`,`vm`.`masuk` AS `masuk`,`vm`.`keluar` AS `keluar`,`vm`.`id_gudang` AS `id_gudang`,`vm`.`nama_gudang` AS `nama_gudang`,`vm`.`tanggal` AS `tanggal`,`vm`.`id_proses` AS `id_proses`,`vm`.`nama_proses` AS `nama_proses`,`vm`.`id_komposisi` AS `id_komposisi`,`vm`.`nama_komposisi` AS `nama_komposisi`,`vm`.`id_satuan` AS `id_satuan`,`vm`.`nama_satuan` AS `nama_satuan`,`vm`.`id_corak` AS `id_corak`,`vm`.`nama_corak` AS `nama_corak`,`vm`.`id_motif` AS `id_motif`,`vm`.`nama_motif` AS `nama_motif`,`vm`.`id_workorder` AS `id_workorder`,`vm`.`no_workorder` AS `no_workorder`,`vm`.`id_workorder_barang` AS `id_workorder_barang`,`vm`.`no_workorder_barang` AS `no_workorder_barang`,`vm`.`id_kualitas` AS `id_kualitas`,`vm`.`nama_kualitas` AS `nama_kualitas`,`vm`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vm`.`kualitas_dudul` AS `kualitas_dudul`,`vm`.`id_label` AS `id_label`,`vm`.`nama_label` AS `nama_label`,`vm`.`id_kemasan` AS `id_kemasan`,`vm`.`nama_kemasan` AS `nama_kemasan`,`vm`.`id_kemasansatuan` AS `id_kemasansatuan`,`vm`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vm`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vm`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vm`.`id_kemasanseratus` AS `id_kemasanseratus`,`vm`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vm`.`id_cap` AS `id_cap`,`vm`.`nama_cap` AS `nama_cap`,`vm`.`id_kualitas_proses` AS `id_kualitas_proses`,`vm`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vm`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vm`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vm`.`id_perubahansatuan` AS `id_perubahansatuan`,`vm`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vm`.`jumlah_rencana` AS `jumlah_rencana`,`vm`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Laporan Hasil' AS `ket_3`,`vm`.`nama_proses` AS `ket_4`,'' AS `ket_5`,`vm`.`nilai_awal` AS `nilai_awal`,`vm`.`nilai_akhir` AS `nilai_akhir`,`vm`.`id_detail` AS `id_detail`,`mk`.`id_komposisi` AS `id_warna`,`mk`.`nama` AS `nama_warna`,`mk`.`inisial` AS `inisial_warna`,`pbb`.`keterangan` AS `ket_proses` from ((`view_masuk_all` `vm` left join `ms_warnakomposisi` `mk` on((`vm`.`id_komposisi` = `mk`.`id_komposisi`))) left join `pro_barangmasuk_barang` `pbb` on((`vm`.`id_detail` = `pbb`.`id`))) union all select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,`vp`.`jumlah` AS `jumlah`,`vp`.`masuk` AS `masuk`,`vp`.`keluar` AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,`vp`.`id_satuan` AS `id_satuan`,`vp`.`nama_satuan` AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,`vp`.`tanggal_full` AS `tanggal_full`,concat(`pp`.`no_faktur`,`pp`.`sufix_no_faktur`) AS `ket_1`,`mp`.`nama` AS `ket_2`,'Penjualan' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses` from ((`view_penjualan` `vp` join `pen_penjualan` `pp` on((`vp`.`id` = `pp`.`id_penjualan`))) join `ms_pelanggan` `mp` on((`pp`.`id_pelanggan` = `mp`.`id_pelanggan`))) union all select `vo`.`id` AS `id`,`vo`.`id_barang` AS `id_barang`,`vo`.`kode_barang` AS `kode_barang`,`vo`.`nama_barang` AS `nama_barang`,`vo`.`jumlah` AS `jumlah`,`vo`.`masuk` AS `masuk`,`vo`.`keluar` AS `keluar`,`vo`.`id_gudang` AS `id_gudang`,`vo`.`nama_gudang` AS `nama_gudang`,`vo`.`tanggal` AS `tanggal`,`vo`.`id_proses` AS `id_proses`,`vo`.`nama_proses` AS `nama_proses`,`vo`.`id_komposisi` AS `id_komposisi`,`vo`.`nama_komposisi` AS `nama_komposisi`,`vo`.`id_satuan` AS `id_satuan`,`vo`.`nama_satuan` AS `nama_satuan`,`vo`.`id_corak` AS `id_corak`,`vo`.`nama_corak` AS `nama_corak`,`vo`.`id_motif` AS `id_motif`,`vo`.`nama_motif` AS `nama_motif`,`vo`.`id_workorder` AS `id_workorder`,`vo`.`no_workorder` AS `no_workorder`,`vo`.`id_workorder_barang` AS `id_workorder_barang`,`vo`.`no_workorder_barang` AS `no_workorder_barang`,`vo`.`id_kualitas` AS `id_kualitas`,`vo`.`nama_kualitas` AS `nama_kualitas`,`vo`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vo`.`kualitas_dudul` AS `kualitas_dudul`,`vo`.`id_label` AS `id_label`,`vo`.`nama_label` AS `nama_label`,`vo`.`id_kemasan` AS `id_kemasan`,`vo`.`nama_kemasan` AS `nama_kemasan`,`vo`.`id_kemasansatuan` AS `id_kemasansatuan`,`vo`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vo`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vo`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vo`.`id_kemasanseratus` AS `id_kemasanseratus`,`vo`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vo`.`id_cap` AS `id_cap`,`vo`.`nama_cap` AS `nama_cap`,`vo`.`id_kualitas_proses` AS `id_kualitas_proses`,`vo`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vo`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vo`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vo`.`id_perubahansatuan` AS `id_perubahansatuan`,`vo`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vo`.`jumlah_rencana` AS `jumlah_rencana`,`vo`.`tanggal_full` AS `tanggal_full`,`io`.`keterangan` AS `ket_1`,`vo`.`nama_gudang` AS `ket_2`,'Stok Opname' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vo`.`id_komposisi`) or (`vo`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vo`.`id_komposisi`) or (`vo`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vo`.`id_komposisi`) or (`vo`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,'' AS `ket_proses` from ((`view_opname` `vo` join `inv_opname` `io` on((`vo`.`id` = `io`.`id_opname`))) left join `ms_warnakomposisi` `mk` on((`vo`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `vk`.`id` AS `id`,`vk`.`id_barang` AS `id_barang`,`vk`.`kode_barang` AS `kode_barang`,`vk`.`nama_barang` AS `nama_barang`,`vk`.`jumlah` AS `jumlah`,`vk`.`masuk` AS `masuk`,`vk`.`keluar` AS `keluar`,`vk`.`id_gudang` AS `id_gudang`,`vk`.`nama_gudang` AS `nama_gudang`,`vk`.`tanggal` AS `tanggal`,`vk`.`id_proses` AS `id_proses`,`vk`.`nama_proses` AS `nama_proses`,`vk`.`id_komposisi` AS `id_komposisi`,`vk`.`nama_komposisi` AS `nama_komposisi`,`vk`.`id_satuan` AS `id_satuan`,`vk`.`nama_satuan` AS `nama_satuan`,`vk`.`id_corak` AS `id_corak`,`vk`.`nama_corak` AS `nama_corak`,`vk`.`id_motif` AS `id_motif`,`vk`.`nama_motif` AS `nama_motif`,`vk`.`id_workorder` AS `id_workorder`,`vk`.`no_workorder` AS `no_workorder`,`vk`.`id_workorder_barang` AS `id_workorder_barang`,`vk`.`no_workorder_barang` AS `no_workorder_barang`,`vk`.`id_kualitas` AS `id_kualitas`,`vk`.`nama_kualitas` AS `nama_kualitas`,`vk`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vk`.`kualitas_dudul` AS `kualitas_dudul`,`vk`.`id_label` AS `id_label`,`vk`.`nama_label` AS `nama_label`,`vk`.`id_kemasan` AS `id_kemasan`,`vk`.`nama_kemasan` AS `nama_kemasan`,`vk`.`id_kemasansatuan` AS `id_kemasansatuan`,`vk`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vk`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vk`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vk`.`id_kemasanseratus` AS `id_kemasanseratus`,`vk`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vk`.`id_cap` AS `id_cap`,`vk`.`nama_cap` AS `nama_cap`,`vk`.`id_kualitas_proses` AS `id_kualitas_proses`,`vk`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vk`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vk`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vk`.`id_perubahansatuan` AS `id_perubahansatuan`,`vk`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vk`.`jumlah_rencana` AS `jumlah_rencana`,`vk`.`tanggal_full` AS `tanggal_full`,concat(`pbk`.`noAuto`,`pbk`.`noAuto_ext`) AS `ket_1`,(case when isnull(`mp`.`nama_pegawai`) then concat(`mr`.`nama`,'( Rekanan )') else concat(`mp`.`nama_pegawai`,'( Pegawai )') end) AS `ket_2`,'Bon Bahan Multi' AS `ket_3`,`mpr`.`nama_proses` AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses` from ((((`view_keluarkemasan` `vk` join `pro_barangkeluar_kemasan` `pbk` on((`vk`.`id` = `pbk`.`id_barangkeluar_kemasan`))) left join `ms_pegawai` `mp` on((`pbk`.`id_pegawai` = `mp`.`id_pegawai`))) left join `ms_rekanan` `mr` on((`pbk`.`id_rekanan` = `mr`.`id_rekanan`))) left join `ms_proses` `mpr` on((`pbk`.`id_proses` = `mpr`.`id_proses`))) union all select `vm`.`id` AS `id`,`vm`.`id_barang` AS `id_barang`,`vm`.`kode_barang` AS `kode_barang`,`vm`.`nama_barang` AS `nama_barang`,`vm`.`jumlah` AS `jumlah`,`vm`.`masuk` AS `masuk`,`vm`.`keluar` AS `keluar`,`vm`.`id_gudang` AS `id_gudang`,`vm`.`nama_gudang` AS `nama_gudang`,`vm`.`tanggal` AS `tanggal`,`vm`.`id_proses` AS `id_proses`,`vm`.`nama_proses` AS `nama_proses`,`vm`.`id_komposisi` AS `id_komposisi`,`vm`.`nama_komposisi` AS `nama_komposisi`,`vm`.`id_satuan` AS `id_satuan`,`vm`.`nama_satuan` AS `nama_satuan`,`vm`.`id_corak` AS `id_corak`,`vm`.`nama_corak` AS `nama_corak`,`vm`.`id_motif` AS `id_motif`,`vm`.`nama_motif` AS `nama_motif`,`vm`.`id_workorder` AS `id_workorder`,`vm`.`no_workorder` AS `no_workorder`,`vm`.`id_workorder_barang` AS `id_workorder_barang`,`vm`.`no_workorder_barang` AS `no_workorder_barang`,`vm`.`id_kualitas` AS `id_kualitas`,`vm`.`nama_kualitas` AS `nama_kualitas`,`vm`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vm`.`kualitas_dudul` AS `kualitas_dudul`,`vm`.`id_label` AS `id_label`,`vm`.`nama_label` AS `nama_label`,`vm`.`id_kemasan` AS `id_kemasan`,`vm`.`nama_kemasan` AS `nama_kemasan`,`vm`.`id_kemasansatuan` AS `id_kemasansatuan`,`vm`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vm`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vm`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vm`.`id_kemasanseratus` AS `id_kemasanseratus`,`vm`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vm`.`id_cap` AS `id_cap`,`vm`.`nama_cap` AS `nama_cap`,`vm`.`id_kualitas_proses` AS `id_kualitas_proses`,`vm`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vm`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vm`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vm`.`id_perubahansatuan` AS `id_perubahansatuan`,`vm`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vm`.`jumlah_rencana` AS `jumlah_rencana`,`vm`.`tanggal_full` AS `tanggal_full`,concat(`pbm`.`noAuto`,`pbm`.`noAuto_ext`) AS `ket_1`,(case when isnull(`mp`.`nama_pegawai`) then concat(`mr`.`nama`,'( Rekanan )') else concat(`mp`.`nama_pegawai`,'( Pegawai )') end) AS `ket_2`,'Laporan Hasil Multi' AS `ket_3`,`mpr`.`nama_proses` AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses` from (((((`view_masukkemasan` `vm` join `pro_barangmasuk_kemasan` `pbm` on((`vm`.`id` = `pbm`.`id_barangmasuk_kemasan`))) join `pro_barangkeluar_kemasan` `pbk` on((`pbm`.`id_barangkeluar_kemasan` = `pbk`.`id_barangkeluar_kemasan`))) left join `ms_pegawai` `mp` on((`pbk`.`id_pegawai` = `mp`.`id_pegawai`))) left join `ms_rekanan` `mr` on((`pbk`.`id_rekanan` = `mr`.`id_rekanan`))) left join `ms_proses` `mpr` on((`pbk`.`id_proses` = `mpr`.`id_proses`))) union all select `vke`.`id` AS `id`,`vke`.`id_barang` AS `id_barang`,`vke`.`kode_barang` AS `kode_barang`,`vke`.`nama_barang` AS `nama_barang`,`vke`.`jumlah` AS `jumlah`,`vke`.`masuk` AS `masuk`,`vke`.`keluar` AS `keluar`,`vke`.`id_gudang` AS `id_gudang`,`vke`.`nama_gudang` AS `nama_gudang`,`vke`.`tanggal` AS `tanggal`,`vke`.`id_proses` AS `id_proses`,`vke`.`nama_proses` AS `nama_proses`,`vke`.`id_komposisi` AS `id_komposisi`,`vke`.`nama_komposisi` AS `nama_komposisi`,`vke`.`id_satuan` AS `id_satuan`,`vke`.`nama_satuan` AS `nama_satuan`,`vke`.`id_corak` AS `id_corak`,`vke`.`nama_corak` AS `nama_corak`,`vke`.`id_motif` AS `id_motif`,`vke`.`nama_motif` AS `nama_motif`,`vke`.`id_workorder` AS `id_workorder`,`vke`.`no_workorder` AS `no_workorder`,`vke`.`id_workorder_barang` AS `id_workorder_barang`,`vke`.`no_workorder_barang` AS `no_workorder_barang`,`vke`.`id_kualitas` AS `id_kualitas`,`vke`.`nama_kualitas` AS `nama_kualitas`,`vke`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vke`.`nama_kualitas_dudul` AS `nama_kualitas_dudul`,`vke`.`id_label` AS `id_label`,`vke`.`nama_label` AS `nama_label`,`vke`.`id_kemasan` AS `id_kemasan`,`vke`.`nama_kemasan` AS `nama_kemasan`,`vke`.`id_kemasansatuan` AS `id_kemasansatuan`,`vke`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vke`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vke`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vke`.`id_kemasanseratus` AS `id_kemasanseratus`,`vke`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vke`.`id_cap` AS `id_cap`,`vke`.`nama_cap` AS `nama_cap`,`vke`.`id_kualitas_proses` AS `id_kualitas_proses`,`vke`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vke`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vke`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vke`.`id_perubahansatuan` AS `id_perubahansatuan`,`vke`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vke`.`jumlah_rencana` AS `jumlah_rencana`,`vke`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Pengembalian Barang' AS `ket_3`,`vke`.`nama_proses` AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vke`.`id_komposisi`) or (`vke`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vke`.`id_komposisi`) or (`vke`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vke`.`id_komposisi`) or (`vke`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,'' AS `ket_proses` from ((`view_kembali` `vke` join `pro_kembali` `pk` on((`vke`.`id` = `pk`.`id_kembali`))) left join `ms_warnakomposisi` `mk` on((`vke`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `v`.`id` AS `id`,`v`.`id_barang` AS `id_barang`,`v`.`kode_barang` AS `kode_barang`,`v`.`nama_barang` AS `nama_barang`,`v`.`jumlah` AS `jumlah`,`v`.`masuk` AS `masuk`,`v`.`keluar` AS `keluar`,`v`.`id_gudang` AS `id_gudang`,`v`.`nama_gudang` AS `nama_gudang`,`v`.`tanggal` AS `tanggal`,`v`.`id_proses` AS `id_proses`,`v`.`nama_proses` AS `nama_proses`,`v`.`id_komposisi` AS `id_komposisi`,`v`.`nama_komposisi` AS `nama_komposisi`,`v`.`id_satuan` AS `id_satuan`,`v`.`nama_satuan` AS `nama_satuan`,`v`.`id_corak` AS `id_corak`,`v`.`nama_corak` AS `nama_corak`,`v`.`id_motif` AS `id_motif`,`v`.`nama_motif` AS `nama_motif`,`v`.`id_workorder` AS `id_workorder`,`v`.`no_workorder` AS `no_workorder`,`v`.`id_workorder_barang` AS `id_workorder_barang`,`v`.`no_workorder_barang` AS `no_workorder_barang`,`v`.`id_kualitas` AS `id_kualitas`,`v`.`nama_kualitas` AS `nama_kualitas`,`v`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`v`.`kualitas_dudul` AS `kualitas_dudul`,`v`.`id_label` AS `id_label`,`v`.`nama_label` AS `nama_label`,`v`.`id_kemasan` AS `id_kemasan`,`v`.`nama_kemasan` AS `nama_kemasan`,`v`.`id_kemasansatuan` AS `id_kemasansatuan`,`v`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`v`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`v`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`v`.`id_kemasanseratus` AS `id_kemasanseratus`,`v`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`v`.`id_cap` AS `id_cap`,`v`.`nama_cap` AS `nama_cap`,`v`.`id_kualitas_proses` AS `id_kualitas_proses`,`v`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`v`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`v`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`v`.`id_perubahansatuan` AS `id_perubahansatuan`,`v`.`nama_perubahan_satuan` AS `nama_perubahan_satuan`,`v`.`jumlah_rencana` AS `jumlah_rencana`,`v`.`tanggal_full` AS `tanggal_full`,`ip`.`keterangan` AS `ket_1`,'' AS `ket_2`,'Penggunaan Barang' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses` from (`view_penggunaanbarang` `v` join `inv_pengeluaran` `ip` on((`v`.`id` = `ip`.`id_pengeluaran`)));

-- membuang struktur untuk view si_sarung.view_tenun_barangmasuk
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_tenun_barangmasuk`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_tenun_barangmasuk` AS select `pb`.`id_barangkeluar` AS `id_barangkeluar`,`pw`.`id_workorder` AS `id_workorder`,`pwb`.`id_workorder_barang` AS `id_workorder_barang`,`pwb`.`no_workorder` AS `no_workorder`,`mm`.`id_motif` AS `id_motif`,`mm`.`nama_motif` AS `nama_motif` from (((`pem_workorder` `pw` join `pem_workorder_barang` `pwb` on((`pw`.`id_workorder` = `pwb`.`id_workorder`))) join `ms_motif` `mm` on((`pwb`.`motif` = `mm`.`id_motif`))) join `pro_barangkeluar` `pb` on((`pwb`.`id_workorder_barang` = `pb`.`id_workorder_barang`)));

-- membuang struktur untuk view si_sarung.view_transaksi
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_transaksi`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_transaksi` AS select `sd`.`lokasi` AS `lokasi`,`sd`.`tanggal_transaksi` AS `tanggal_transaksi`,`sd`.`nomor_transaksi` AS `no_bukti`,`jsd`.`id_perkiraan` AS `id_akun`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`jsd`.`tipe_transaksi` AS `tipe_id_akun`,`jsd`.`kode_perkiraan_dariakun` AS `kode_perkiraan_dariakun`,`jsd`.`nama_perkiraan_dariakun` AS `nama_perkiraan_dariakun`,`jsd`.`kode_perkiraan_keakun` AS `kode_perkiraan_keakun`,`jsd`.`nama_perkiraan_keakun` AS `nama_perkiraan_keakun`,`jsd`.`nominal` AS `nominal_transaksi`,`jsd`.`keterangan` AS `keterangan` from ((`jurnal_sumber_dana` `jsd` join `keu_sumber_dana` `sd` on((`sd`.`id` = `jsd`.`id_ref`))) join `ms_perkiraan` `p` on((`p`.`id` = `sd`.`dari_akun`))) union all select `b`.`lokasi` AS `lokasi`,`bb`.`tgl_bayar` AS `tanggal_transaksi`,`ptb`.`no_transaksi_bayar` AS `no_bukti`,`bb`.`id_akun` AS `id_akun`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`bb`.`tipe_id_akun` AS `tipe_id_akun`,`p`.`kode_perkiraan` AS `kode_perkiraan_dariakun`,`p`.`nama_perkiraan` AS `nama_perkiraan_dariakun`,`mp`.`kode_perkiraan` AS `kode_perkiraan_keakun`,`mp`.`nama_perkiraan` AS `nama_perkiraan_keakun`,`bb`.`jum_bayar` AS `nominal_transaksi`,concat_ws(' ','Pembayaran untuk faktur pembelian',concat_ws('',`b`.`no_faktur`,`b`.`sufix_no_faktur`),concat_ws('','(',`pd`.`nama`,')')) AS `keterangan` from (((((`pem_pembelian_bayar` `bb` join `pem_pembelian` `b` on((`b`.`id_pembelian` = `bb`.`id_pembelian`))) join `pem_pembelian_transaksi_bayar` `ptb` on((`ptb`.`id` = `bb`.`id_transaksi_bayar`))) join `ms_penyedia` `pd` on((`pd`.`id_penyedia` = `b`.`id_penyedia`))) join `ms_perkiraan` `p` on((`p`.`id` = `bb`.`id_akun`))) join `ms_perkiraan` `mp` on((`mp`.`id` = `pd`.`id_akun_hutang`))) union all select `os`.`lokasi` AS `lokasi`,`osb`.`tgl_bayar` AS `tanggal_transaksi`,`ostb`.`no_transaksi_bayar` AS `no_bukti`,`osb`.`id_akun` AS `id_akun`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`osb`.`tipe_id_akun` AS `tipe_id_akun`,`p`.`kode_perkiraan` AS `kode_perkiraan_dariakun`,`p`.`nama_perkiraan` AS `nama_perkiraan_dariakun`,`mp`.`kode_perkiraan` AS `kode_perkiraan_keakun`,(case when (`mpd`.`id_akun_hutang` = 775) then concat_ws(' ',`mp`.`nama_perkiraan`,`mpd`.`nama`) when (`mpd`.`id_akun_hutang` = 58) then concat_ws(' ',`mp`.`nama_perkiraan`,`mpd`.`nama`) else `mp`.`nama_perkiraan` end) AS `nama_perkiraan_keakun`,`osb`.`jum_bayar` AS `nominal_transaksi`,concat_ws(' ','Pembayaran untuk nota order service',concat_ws('',`os`.`no_nota`,`os`.`sufix_no_nota`),concat_ws('','(',`mpd`.`nama`,')')) AS `keterangan` from (((((`serv_orderservice_bayar` `osb` join `serv_orderservice` `os` on((`os`.`id` = `osb`.`id_orderservice`))) left join `serv_orderservice_transaksi_bayar` `ostb` on((`ostb`.`id` = `osb`.`id_transaksi_bayar`))) left join `ms_penyedia` `mpd` on((`mpd`.`id_penyedia` = `os`.`id_penyedia`))) left join `ms_perkiraan` `p` on((`p`.`id` = `osb`.`id_akun`))) left join `ms_perkiraan` `mp` on((`mp`.`id` = `mpd`.`id_akun_hutang`))) union all select `ps`.`id_lokasi` AS `lokasi`,`psb`.`tanggal_bayar` AS `tanggal_transaksi`,`pstb`.`no_transaksi_bayar` AS `no_bukti`,`psb`.`id_akun_bayar` AS `id_akun`,`p`.`kode_perkiraan` AS `kode_perkiraan`,`p`.`nama_perkiraan` AS `nama_perkiraan`,`psb`.`tipe_akun_bayar` AS `tipe_id_akun`,`p`.`kode_perkiraan` AS `kode_perkiraan_dariakun`,`p`.`nama_perkiraan` AS `nama_perkiraan_dariakun`,`mp`.`kode_perkiraan` AS `kode_perkiraan_keakun`,(case when (`mpd`.`id_akun_hutang` = 775) then concat_ws(' ',`mp`.`nama_perkiraan`,`mpd`.`nama`) when (`mpd`.`id_akun_hutang` = 58) then concat_ws(' ',`mp`.`nama_perkiraan`,`mpd`.`nama`) else `mp`.`nama_perkiraan` end) AS `nama_perkiraan_keakun`,`psb`.`jumlah_bayar` AS `nominal_transaksi`,concat_ws(' ','Pembayaran untuk nota/faktur sewa',`ps`.`no_faktur`,concat_ws('','(',`mpd`.`nama`,')')) AS `keterangan` from (((((`pem_sewa_bayar` `psb` join `pem_sewa` `ps` on((`ps`.`id` = `psb`.`id_sewa`))) left join `pem_sewa_transaksi_bayar` `pstb` on((`pstb`.`id` = `psb`.`id_transaksi_bayar`))) left join `ms_penyedia` `mpd` on((`mpd`.`id_penyedia` = `ps`.`id_penyedia`))) left join `ms_perkiraan` `p` on((`p`.`id` = `psb`.`id_akun_bayar`))) left join `ms_perkiraan` `mp` on((`mp`.`id` = `mpd`.`id_akun_hutang`))) union all select `p`.`lokasi` AS `lokasi`,`pjtb`.`tanggal_bayar` AS `tanggal_transaksi`,`pjtb`.`no_transaksi_bayar` AS `no_bukti`,`pb`.`id_akun` AS `id_akun`,`mp`.`kode_perkiraan` AS `kode_perkiraan`,`mp`.`nama_perkiraan` AS `nama_perkiraan`,'D' AS `tipe_id_akun`,`mpda`.`kode_perkiraan` AS `kode_perkiraan_dariakun`,(case when (`plg`.`id_akun_piutang` = 21) then concat_ws(' ',`mpda`.`nama_perkiraan`,`plg`.`nama`) when (`plg`.`id_akun_piutang` = 292) then concat_ws(' ',`mpda`.`nama_perkiraan`,`plg`.`nama`) else `mpda`.`nama_perkiraan` end) AS `nama_perkiraan_dariakun`,`mp`.`kode_perkiraan` AS `kode_perkiraan_keakun`,`mp`.`nama_perkiraan` AS `nama_perkiraan_keakun`,sum(`pb`.`jum_bayar`) AS `nominal_transaksi`,concat_ws(' ','Penerimaan pembayaran dari faktur',concat_ws('',`p`.`no_faktur`,`p`.`sufix_no_faktur`),concat_ws('','(',`plg`.`nama`,')')) AS `keterangan` from ((((((`pen_penjualan_bayar` `pb` join `pen_penjualan` `p` on((`p`.`id_penjualan` = `pb`.`id_penjualan`))) join `pen_penjualan_transaksi_bayar` `pjtb` on((`pjtb`.`id` = `pb`.`id_transaksi_bayar`))) join `ms_pelanggan` `plg` on((`plg`.`id_pelanggan` = `p`.`id_pelanggan`))) join `ms_perkiraan` `mp` on((`mp`.`id` = `pb`.`id_akun`))) join `ms_perkiraan` `mpda` on((`mpda`.`id` = `plg`.`id_akun_piutang`))) join `a_ref_jurnal` `rj` on((`rj`.`kode` = `p`.`id_akun_piutang`))) group by `pb`.`id_transaksi_bayar` union all select `p`.`lokasi` AS `lokasi`,`pjtb`.`tanggal_bayar` AS `tanggal_transaksi`,`pjtb`.`no_transaksi_bayar` AS `no_bukti`,`pb`.`id_akun` AS `id_akun`,`mp`.`kode_perkiraan` AS `kode_perkiraan`,`mp`.`nama_perkiraan` AS `nama_perkiraan`,'D' AS `tipe_id_akun`,`mpda`.`kode_perkiraan` AS `kode_perkiraan_dariakun`,(case when (`plg`.`id_akun_piutang` = 21) then concat_ws(' ',`mpda`.`nama_perkiraan`,`plg`.`nama`) when (`plg`.`id_akun_piutang` = 292) then concat_ws(' ',`mpda`.`nama_perkiraan`,`plg`.`nama`) else `mpda`.`nama_perkiraan` end) AS `nama_perkiraan_dariakun`,`mp`.`kode_perkiraan` AS `kode_perkiraan_keakun`,`mp`.`nama_perkiraan` AS `nama_perkiraan_keakun`,sum(`pb`.`jum_bayar`) AS `nominal_transaksi`,concat_ws(' ','Penerimaan pembayaran dari faktur',concat_ws('',`p`.`no_faktur`,`p`.`sufix_no_faktur`),concat_ws('','(',`plg`.`nama`,')')) AS `keterangan` from ((((((`pen_piutangawal_bayar` `pb` join `pen_piutangawal` `p` on((`p`.`id` = `pb`.`id_piutangawal`))) join `pen_penjualan_transaksi_bayar` `pjtb` on((`pjtb`.`id` = `pb`.`id_transaksi_bayar`))) join `ms_pelanggan` `plg` on((`plg`.`id_pelanggan` = `p`.`id_pelanggan`))) join `ms_perkiraan` `mp` on((`mp`.`id` = `pb`.`id_akun`))) join `ms_perkiraan` `mpda` on((`mpda`.`id` = `plg`.`id_akun_piutang`))) join `a_ref_jurnal` `rj` on((`rj`.`kode` = `p`.`id_akun_piutang`))) group by `pb`.`id_transaksi_bayar` union all select `rtp`.`lokasi` AS `lokasi`,`rtp`.`tanggal_retur` AS `tanggal_transaksi`,concat_ws('',`rtp`.`no_retur`,`rtp`.`sufix_no_retur`) AS `no_bukti`,`rtp`.`id_akun` AS `id_akun`,`mpk`.`kode_perkiraan` AS `kode_perkiraan`,`mpk`.`nama_perkiraan` AS `nama_perkiraan`,`rtp`.`tipe_id_akun` AS `tipe_id_akun`,`mpk`.`kode_perkiraan` AS `kode_perkiraan_dariakun`,`mpk`.`nama_perkiraan` AS `nama_perkiraan_dariakun`,`mp`.`kode_perkiraan` AS `kode_perkiraan_keakun`,(case when (`plg`.`id_akun_piutang` = 21) then concat_ws(' ',`mp`.`nama_perkiraan`,`plg`.`nama`) when (`plg`.`id_akun_piutang` = 292) then concat_ws(' ',`mp`.`nama_perkiraan`,`plg`.`nama`) else `mp`.`nama_perkiraan` end) AS `nama_perkiraan_keakun`,`rtp`.`nominal_retur` AS `nominal_transaksi`,`rtp`.`keterangan` AS `keterangan` from (((`retur_tagihan_penjualan` `rtp` join `ms_pelanggan` `plg` on((`plg`.`id_pelanggan` = `rtp`.`id_pelanggan`))) join `ms_perkiraan` `mp` on((`mp`.`id` = `plg`.`id_akun_piutang`))) join `ms_perkiraan` `mpk` on((`mpk`.`id` = `rtp`.`id_akun`))) union all select `rtp`.`lokasi` AS `lokasi`,`rtp`.`tanggal_retur` AS `tanggal_transaksi`,concat_ws('',`rtp`.`no_retur`,`rtp`.`sufix_no_retur`) AS `no_bukti`,`rtp`.`id_akun` AS `id_akun`,`mpk`.`kode_perkiraan` AS `kode_perkiraan`,`mpk`.`nama_perkiraan` AS `nama_perkiraan`,`rtp`.`tipe_id_akun` AS `tipe_id_akun`,`mpk`.`kode_perkiraan` AS `kode_perkiraan_dariakun`,`mpk`.`nama_perkiraan` AS `nama_perkiraan_dariakun`,`mp`.`kode_perkiraan` AS `kode_perkiraan_keakun`,(case when (`plg`.`id_akun_piutang` = 21) then concat_ws(' ',`mp`.`nama_perkiraan`,`plg`.`nama`) when (`plg`.`id_akun_piutang` = 292) then concat_ws(' ',`mp`.`nama_perkiraan`,`plg`.`nama`) else `mp`.`nama_perkiraan` end) AS `nama_perkiraan_keakun`,`rtp`.`nominal_retur` AS `nominal_transaksi`,`rtp`.`keterangan` AS `keterangan` from (((`retur_tagihan_piutangawal` `rtp` join `ms_pelanggan` `plg` on((`plg`.`id_pelanggan` = `rtp`.`id_pelanggan`))) join `ms_perkiraan` `mp` on((`mp`.`id` = `plg`.`id_akun_piutang`))) join `ms_perkiraan` `mpk` on((`mpk`.`id` = `rtp`.`id_akun`)));

-- membuang struktur untuk view si_sarung.view_transfer
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_transfer`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_transfer` AS select `view_transfermasuk_sub`.`id` AS `id`,`view_transfermasuk_sub`.`id_barang` AS `id_barang`,`view_transfermasuk_sub`.`kode_barang` AS `kode_barang`,`view_transfermasuk_sub`.`nama_barang` AS `nama_barang`,(`view_transfermasuk_sub`.`jum_barang` * (`view_transfermasuk_sub`.`nilai_akhir` / `view_transfermasuk_sub`.`nilai_awal`)) AS `jumlah`,(`view_transfermasuk_sub`.`masuk` * (`view_transfermasuk_sub`.`nilai_akhir` / `view_transfermasuk_sub`.`nilai_awal`)) AS `masuk`,0 AS `keluar`,`view_transfermasuk_sub`.`id_gudang` AS `id_gudang`,`view_transfermasuk_sub`.`nama_gudang` AS `nama_gudang`,`view_transfermasuk_sub`.`tanggal` AS `tanggal`,`view_transfermasuk_sub`.`id_proses` AS `id_proses`,`view_transfermasuk_sub`.`nama_proses` AS `nama_proses`,`view_transfermasuk_sub`.`id_komposisi` AS `id_komposisi`,`view_transfermasuk_sub`.`nama_komposisi` AS `nama_komposisi`,`view_transfermasuk_sub`.`id_satuan` AS `id_satuan`,`view_transfermasuk_sub`.`nama_satuan` AS `nama_satuan`,`view_transfermasuk_sub`.`id_corak` AS `id_corak`,`view_transfermasuk_sub`.`nama_corak` AS `nama_corak`,`view_transfermasuk_sub`.`id_motif` AS `id_motif`,`view_transfermasuk_sub`.`nama_motif` AS `nama_motif`,`view_transfermasuk_sub`.`id_workorder` AS `id_workorder`,`view_transfermasuk_sub`.`no_workorder` AS `no_workorder`,`view_transfermasuk_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_transfermasuk_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_transfermasuk_sub`.`id_kualitas` AS `id_kualitas`,`view_transfermasuk_sub`.`nama_kualitas` AS `nama_kualitas`,`view_transfermasuk_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_transfermasuk_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_transfermasuk_sub`.`id_label` AS `id_label`,`view_transfermasuk_sub`.`nama_label` AS `nama_label`,`view_transfermasuk_sub`.`id_kemasan` AS `id_kemasan`,`view_transfermasuk_sub`.`nama_kemasan` AS `nama_kemasan`,`view_transfermasuk_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_transfermasuk_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_transfermasuk_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_transfermasuk_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_transfermasuk_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_transfermasuk_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_transfermasuk_sub`.`id_cap` AS `id_cap`,`view_transfermasuk_sub`.`nama_cap` AS `nama_cap`,`view_transfermasuk_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_transfermasuk_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_transfermasuk_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_transfermasuk_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_transfermasuk_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_transfermasuk_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_transfermasuk_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_transfermasuk_sub`.`tanggal_full` AS `tanggal_full` from `view_transfermasuk_sub` union all select `view_transferkeluar_sub`.`id` AS `id`,`view_transferkeluar_sub`.`id_barang` AS `id_barang`,`view_transferkeluar_sub`.`kode_barang` AS `kode_barang`,`view_transferkeluar_sub`.`nama_barang` AS `nama_barang`,(`view_transferkeluar_sub`.`jum_barang` * (`view_transferkeluar_sub`.`nilai_akhir` / `view_transferkeluar_sub`.`nilai_awal`)) AS `jumlah`,0 AS `masuk`,(`view_transferkeluar_sub`.`keluar` * (`view_transferkeluar_sub`.`nilai_akhir` / `view_transferkeluar_sub`.`nilai_awal`)) AS `keluar`,`view_transferkeluar_sub`.`id_gudang` AS `id_gudang`,`view_transferkeluar_sub`.`nama_gudang` AS `nama_gudang`,`view_transferkeluar_sub`.`tanggal` AS `tanggal`,`view_transferkeluar_sub`.`id_proses` AS `id_proses`,`view_transferkeluar_sub`.`nama_proses` AS `nama_proses`,`view_transferkeluar_sub`.`id_komposisi` AS `id_komposisi`,`view_transferkeluar_sub`.`nama_komposisi` AS `nama_komposisi`,`view_transferkeluar_sub`.`id_satuan` AS `id_satuan`,`view_transferkeluar_sub`.`nama_satuan` AS `nama_satuan`,`view_transferkeluar_sub`.`id_corak` AS `id_corak`,`view_transferkeluar_sub`.`nama_corak` AS `nama_corak`,`view_transferkeluar_sub`.`id_motif` AS `id_motif`,`view_transferkeluar_sub`.`nama_motif` AS `nama_motif`,`view_transferkeluar_sub`.`id_workorder` AS `id_workorder`,`view_transferkeluar_sub`.`no_workorder` AS `no_workorder`,`view_transferkeluar_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_transferkeluar_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_transferkeluar_sub`.`id_kualitas` AS `id_kualitas`,`view_transferkeluar_sub`.`nama_kualitas` AS `nama_kualitas`,`view_transferkeluar_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_transferkeluar_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_transferkeluar_sub`.`id_label` AS `id_label`,`view_transferkeluar_sub`.`nama_label` AS `nama_label`,`view_transferkeluar_sub`.`id_kemasan` AS `id_kemasan`,`view_transferkeluar_sub`.`nama_kemasan` AS `nama_kemasan`,`view_transferkeluar_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_transferkeluar_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_transferkeluar_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_transferkeluar_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_transferkeluar_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_transferkeluar_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_transferkeluar_sub`.`id_cap` AS `id_cap`,`view_transferkeluar_sub`.`nama_cap` AS `nama_cap`,`view_transferkeluar_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_transferkeluar_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_transferkeluar_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_transferkeluar_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_transferkeluar_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_transferkeluar_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_transferkeluar_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_transferkeluar_sub`.`tanggal_full` AS `tanggal_full` from `view_transferkeluar_sub`;

-- membuang struktur untuk view si_sarung.view_transferkeluar
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_transferkeluar`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_transferkeluar` AS select `view_transferkeluar_sub`.`id` AS `id`,`view_transferkeluar_sub`.`id_barang` AS `id_barang`,`view_transferkeluar_sub`.`kode_barang` AS `kode_barang`,`view_transferkeluar_sub`.`nama_barang` AS `nama_barang`,(`view_transferkeluar_sub`.`jum_barang` * (`view_transferkeluar_sub`.`nilai_akhir` / `view_transferkeluar_sub`.`nilai_awal`)) AS `jumlah`,0 AS `masuk`,(`view_transferkeluar_sub`.`keluar` * (`view_transferkeluar_sub`.`nilai_akhir` / `view_transferkeluar_sub`.`nilai_awal`)) AS `keluar`,`view_transferkeluar_sub`.`id_gudang` AS `id_gudang`,`view_transferkeluar_sub`.`nama_gudang` AS `nama_gudang`,`view_transferkeluar_sub`.`tanggal` AS `tanggal`,`view_transferkeluar_sub`.`id_proses` AS `id_proses`,`view_transferkeluar_sub`.`nama_proses` AS `nama_proses`,`view_transferkeluar_sub`.`id_komposisi` AS `id_komposisi`,`view_transferkeluar_sub`.`nama_komposisi` AS `nama_komposisi`,`view_transferkeluar_sub`.`id_satuan` AS `id_satuan`,`view_transferkeluar_sub`.`nama_satuan` AS `nama_satuan`,`view_transferkeluar_sub`.`id_corak` AS `id_corak`,`view_transferkeluar_sub`.`nama_corak` AS `nama_corak`,`view_transferkeluar_sub`.`id_motif` AS `id_motif`,`view_transferkeluar_sub`.`nama_motif` AS `nama_motif`,`view_transferkeluar_sub`.`id_workorder` AS `id_workorder`,`view_transferkeluar_sub`.`no_workorder` AS `no_workorder`,`view_transferkeluar_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_transferkeluar_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_transferkeluar_sub`.`id_kualitas` AS `id_kualitas`,`view_transferkeluar_sub`.`nama_kualitas` AS `nama_kualitas`,`view_transferkeluar_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_transferkeluar_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_transferkeluar_sub`.`id_label` AS `id_label`,`view_transferkeluar_sub`.`nama_label` AS `nama_label`,`view_transferkeluar_sub`.`id_kemasan` AS `id_kemasan`,`view_transferkeluar_sub`.`nama_kemasan` AS `nama_kemasan`,`view_transferkeluar_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_transferkeluar_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_transferkeluar_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_transferkeluar_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_transferkeluar_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_transferkeluar_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_transferkeluar_sub`.`id_cap` AS `id_cap`,`view_transferkeluar_sub`.`nama_cap` AS `nama_cap`,`view_transferkeluar_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_transferkeluar_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_transferkeluar_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_transferkeluar_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_transferkeluar_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_transferkeluar_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_transferkeluar_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_transferkeluar_sub`.`tanggal_full` AS `tanggal_full` from `view_transferkeluar_sub`;

-- membuang struktur untuk view si_sarung.view_transferkeluar_all
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_transferkeluar_all`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_transferkeluar_all` AS select `it`.`id_transfergudang` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`itb`.`jumlah` AS `jum_barang`,0 AS `masuk`,`itb`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`it`.`tanggal` AS `tanggal`,(case when (`itb`.`id_proses` = 0) then '' else `itb`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`itb`.`id_kualitas` = 0) then '' else `itb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`itb`.`id_kualitas_dudul` = 0) then '' else `itb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`itb`.`id_kualitas_dudul` = 0) then '' when (`itb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`itb`.`id_label` = 0) then '' else `itb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`itb`.`id_kemasan` = 0) then '' else `itb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`itb`.`id_kemasansatuan` = 0) then '' else `itb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`itb`.`id_kemasansepuluh` = 0) then '' else `itb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`itb`.`id_kemasanseratus` = 0) then '' else `itb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`itb`.`id_cap` = 0) then '' else `itb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_cap`,(case when (`itb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`itb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`itb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`itb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`itb`.`jumlah_rencana`) or (`itb`.`jumlah_rencana` = 0)) then '' else `itb`.`jumlah_rencana` end) AS `jumlah_rencana`,(case when isnull(`itb`.`keterangan`) then '' else `itb`.`keterangan` end) AS `keterangan`,`it`.`tanggal_keluar` AS `tanggal_full` from ((((((((((((((((((((`inv_transfergudang` `it` join `inv_transfergudang_barang` `itb` on((`it`.`id_transfergudang` = `itb`.`kode_transfergudang`))) join `ms_barang` `mb` on((`itb`.`kode_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`it`.`gudang_awal` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `itb`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`itb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`itb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`itb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`itb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`itb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`itb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`itb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`itb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`itb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`itb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`itb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`itb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`itb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`itb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`itb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`itb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) where (`it`.`status` <> 0);

-- membuang struktur untuk view si_sarung.view_transferkeluar_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_transferkeluar_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_transferkeluar_sub` AS select `it`.`id_transfergudang` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`itb`.`jumlah` AS `jum_barang`,0 AS `masuk`,`itb`.`jumlah` AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,`it`.`tanggal` AS `tanggal`,(case when (`itb`.`id_proses` = 0) then '' else `itb`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`itb`.`id_kualitas` = 0) then '' else `itb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`itb`.`id_kualitas_dudul` = 0) then '' else `itb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`itb`.`id_kualitas_dudul` = 0) then '' when (`itb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`itb`.`id_label` = 0) then '' else `itb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`itb`.`id_kemasan` = 0) then '' else `itb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`itb`.`id_kemasansatuan` = 0) then '' else `itb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`itb`.`id_kemasansepuluh` = 0) then '' else `itb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`itb`.`id_kemasanseratus` = 0) then '' else `itb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`itb`.`id_cap` = 0) then '' else `itb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_cap`,(case when (`itb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`itb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`itb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`itb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`itb`.`jumlah_rencana`) or (`itb`.`jumlah_rencana` = 0)) then '' else `itb`.`jumlah_rencana` end) AS `jumlah_rencana`,`it`.`tanggal_keluar` AS `tanggal_full` from ((((((((((((((((((((`inv_transfergudang` `it` join `inv_transfergudang_barang` `itb` on((`it`.`id_transfergudang` = `itb`.`kode_transfergudang`))) join `ms_barang` `mb` on((`itb`.`kode_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`it`.`gudang_awal` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `itb`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`itb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`itb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`itb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`itb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`itb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`itb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`itb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`itb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`itb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`itb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`itb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`itb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`itb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`itb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`itb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`itb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) where (`it`.`status` <> 0);

-- membuang struktur untuk view si_sarung.view_transfermasuk
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_transfermasuk`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_transfermasuk` AS select `view_transfermasuk_sub`.`id` AS `id`,`view_transfermasuk_sub`.`id_barang` AS `id_barang`,`view_transfermasuk_sub`.`kode_barang` AS `kode_barang`,`view_transfermasuk_sub`.`nama_barang` AS `nama_barang`,(`view_transfermasuk_sub`.`jum_barang` * (`view_transfermasuk_sub`.`nilai_akhir` / `view_transfermasuk_sub`.`nilai_awal`)) AS `jumlah`,(`view_transfermasuk_sub`.`masuk` * (`view_transfermasuk_sub`.`nilai_akhir` / `view_transfermasuk_sub`.`nilai_awal`)) AS `masuk`,0 AS `keluar`,`view_transfermasuk_sub`.`id_gudang` AS `id_gudang`,`view_transfermasuk_sub`.`nama_gudang` AS `nama_gudang`,`view_transfermasuk_sub`.`tanggal` AS `tanggal`,`view_transfermasuk_sub`.`id_proses` AS `id_proses`,`view_transfermasuk_sub`.`nama_proses` AS `nama_proses`,`view_transfermasuk_sub`.`id_komposisi` AS `id_komposisi`,`view_transfermasuk_sub`.`nama_komposisi` AS `nama_komposisi`,`view_transfermasuk_sub`.`id_satuan` AS `id_satuan`,`view_transfermasuk_sub`.`nama_satuan` AS `nama_satuan`,`view_transfermasuk_sub`.`id_corak` AS `id_corak`,`view_transfermasuk_sub`.`nama_corak` AS `nama_corak`,`view_transfermasuk_sub`.`id_motif` AS `id_motif`,`view_transfermasuk_sub`.`nama_motif` AS `nama_motif`,`view_transfermasuk_sub`.`id_workorder` AS `id_workorder`,`view_transfermasuk_sub`.`no_workorder` AS `no_workorder`,`view_transfermasuk_sub`.`id_workorder_barang` AS `id_workorder_barang`,`view_transfermasuk_sub`.`no_workorder_barang` AS `no_workorder_barang`,`view_transfermasuk_sub`.`id_kualitas` AS `id_kualitas`,`view_transfermasuk_sub`.`nama_kualitas` AS `nama_kualitas`,`view_transfermasuk_sub`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`view_transfermasuk_sub`.`kualitas_dudul` AS `kualitas_dudul`,`view_transfermasuk_sub`.`id_label` AS `id_label`,`view_transfermasuk_sub`.`nama_label` AS `nama_label`,`view_transfermasuk_sub`.`id_kemasan` AS `id_kemasan`,`view_transfermasuk_sub`.`nama_kemasan` AS `nama_kemasan`,`view_transfermasuk_sub`.`id_kemasansatuan` AS `id_kemasansatuan`,`view_transfermasuk_sub`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`view_transfermasuk_sub`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`view_transfermasuk_sub`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`view_transfermasuk_sub`.`id_kemasanseratus` AS `id_kemasanseratus`,`view_transfermasuk_sub`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`view_transfermasuk_sub`.`id_cap` AS `id_cap`,`view_transfermasuk_sub`.`nama_cap` AS `nama_cap`,`view_transfermasuk_sub`.`id_kualitas_proses` AS `id_kualitas_proses`,`view_transfermasuk_sub`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`view_transfermasuk_sub`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`view_transfermasuk_sub`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`view_transfermasuk_sub`.`id_perubahansatuan` AS `id_perubahansatuan`,`view_transfermasuk_sub`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`view_transfermasuk_sub`.`jumlah_rencana` AS `jumlah_rencana`,`view_transfermasuk_sub`.`tanggal_full` AS `tanggal_full` from `view_transfermasuk_sub`;

-- membuang struktur untuk view si_sarung.view_transfermasuk_all
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_transfermasuk_all`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_transfermasuk_all` AS select `it`.`id_transfergudang` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`itb`.`jumlah` AS `jum_barang`,`itb`.`jumlah` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,date_format(`it`.`tanggal_masuk`,'%Y-%m-%d') AS `tanggal`,(case when (`itb`.`id_proses` = 0) then '' else `itb`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`itb`.`id_kualitas` = 0) then '' else `itb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`itb`.`id_kualitas_dudul` = 0) then '' else `itb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`itb`.`id_kualitas_dudul` = 0) then '' when (`itb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`itb`.`id_label` = 0) then '' else `itb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`itb`.`id_kemasan` = 0) then '' else `itb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`itb`.`id_kemasansatuan` = 0) then '' else `itb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`itb`.`id_kemasansepuluh` = 0) then '' else `itb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`itb`.`id_kemasanseratus` = 0) then '' else `itb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`itb`.`id_cap` = 0) then '' else `itb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`itb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`itb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`itb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`itb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`itb`.`jumlah_rencana`) or (`itb`.`jumlah_rencana` = 0)) then '' else `itb`.`jumlah_rencana` end) AS `jumlah_rencana`,(case when isnull(`itb`.`keterangan`) then '' else `itb`.`keterangan` end) AS `keterangan`,`it`.`tanggal_masuk` AS `tanggal_full` from ((((((((((((((((((((`inv_transfergudang` `it` join `inv_transfergudang_barang` `itb` on((`it`.`id_transfergudang` = `itb`.`kode_transfergudang`))) join `ms_barang` `mb` on((`itb`.`kode_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`it`.`gudang_tujuan` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `itb`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`itb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`itb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`itb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`itb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`itb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`itb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`itb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`itb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`itb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`itb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`itb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`itb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`itb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`itb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`itb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`itb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) where (`it`.`status` = 2);

-- membuang struktur untuk view si_sarung.view_transfermasuk_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_transfermasuk_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_transfermasuk_sub` AS select `it`.`id_transfergudang` AS `id`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`itb`.`jumlah` AS `jum_barang`,`itb`.`jumlah` AS `masuk`,0 AS `keluar`,`mg`.`id_gudang` AS `id_gudang`,`mg`.`nama_gudang` AS `nama_gudang`,date_format(`it`.`tanggal_masuk`,'%Y-%m-%d') AS `tanggal`,(case when (`itb`.`id_proses` = 0) then '' else `itb`.`id_proses` end) AS `id_proses`,(case when isnull(`mp`.`nama_proses`) then '' else `mp`.`nama_proses` end) AS `nama_proses`,(case when isnull(`mwk`.`id_komposisi`) then '' else `mwk`.`id_komposisi` end) AS `id_komposisi`,(case when isnull(`mwk`.`nama`) then '' else `mwk`.`nama` end) AS `nama_komposisi`,'1' AS `nilai_awal`,'1' AS `nilai_akhir`,(case when isnull(`ms`.`id_satuan`) then '' else `ms`.`id_satuan` end) AS `id_satuan`,(case when isnull(`ms`.`nama_satuan`) then '' else `ms`.`nama_satuan` end) AS `nama_satuan`,(case when isnull(`mmb`.`id_motif_barang`) then '' else `mmb`.`id_motif_barang` end) AS `id_corak`,(case when isnull(`mmb`.`motif_keterangan`) then '' else `mmb`.`motif_keterangan` end) AS `nama_corak`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`id_motif` end) AS `id_motif`,(case when isnull(`mm`.`id_motif`) then '' else `mm`.`nama_motif` end) AS `nama_motif`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`id_workorder` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`id_workorder` end) AS `id_workorder`,(case when (isnull(`pw`.`id_workorder`) and isnull(`pwb`.`id_workorder_barang`)) then '' when isnull(`pw`.`id_workorder`) then (select `pw`.`nomor` from (`pem_workorder` `pw` join `pem_workorder_barang` `pwb2` on((`pw`.`id_workorder` = `pwb2`.`id_workorder`))) where (`pwb2`.`id_workorder_barang` = `pwb`.`id_workorder_barang`)) else `pw`.`nomor` end) AS `no_workorder`,(case when isnull(`pwb`.`id_workorder_barang`) then '' else `pwb`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when isnull(`pwb`.`no_workorder`) then '' else `pwb`.`no_workorder` end) AS `no_workorder_barang`,(case when (`itb`.`id_kualitas` = 0) then '' else `itb`.`id_kualitas` end) AS `id_kualitas`,(case when isnull(`mk`.`nama_kualitas`) then '' else `mk`.`nama_kualitas` end) AS `nama_kualitas`,(case when (`itb`.`id_kualitas_dudul` = 0) then '' else `itb`.`id_kualitas_dudul` end) AS `id_kualitas_dudul`,(case when (`itb`.`id_kualitas_dudul` = 0) then '' when (`itb`.`id_kualitas_dudul` = 1) then 'Baik' else 'Jelek' end) AS `kualitas_dudul`,(case when (`itb`.`id_label` = 0) then '' else `itb`.`id_label` end) AS `id_label`,(case when isnull(`mb2`.`nama_barang`) then '' else `mb2`.`nama_barang` end) AS `nama_label`,(case when (`itb`.`id_kemasan` = 0) then '' else `itb`.`id_kemasan` end) AS `id_kemasan`,(case when isnull(`mb3`.`nama_barang`) then '' else `mb3`.`nama_barang` end) AS `nama_kemasan`,(case when (`itb`.`id_kemasansatuan` = 0) then '' else `itb`.`id_kemasansatuan` end) AS `id_kemasansatuan`,(case when isnull(`mb4`.`nama_barang`) then '' else `mb4`.`nama_barang` end) AS `nama_kemasansatuan`,(case when (`itb`.`id_kemasansepuluh` = 0) then '' else `itb`.`id_kemasansepuluh` end) AS `id_kemasansepuluh`,(case when isnull(`mb5`.`nama_barang`) then '' else `mb5`.`nama_barang` end) AS `nama_kemasansepuluh`,(case when (`itb`.`id_kemasanseratus` = 0) then '' else `itb`.`id_kemasanseratus` end) AS `id_kemasanseratus`,(case when isnull(`mb6`.`nama_barang`) then '' else `mb6`.`nama_barang` end) AS `nama_kemasanseratus`,(case when (`itb`.`id_cap` = 0) then '' else `itb`.`id_cap` end) AS `id_cap`,(case when isnull(`mb7`.`nama_barang`) then '' else `mb7`.`nama_barang` end) AS `nama_cap`,(case when (`itb`.`id_kualitas_proses` = 0) then '' else `mk2`.`id_kualitas` end) AS `id_kualitas_proses`,(case when (`itb`.`id_kualitas_proses` = 0) then '' else `mk2`.`nama_kualitas` end) AS `nama_kualitas_proses`,(case when (`itb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`id_kualitas` end) AS `id_kualitas_periksa`,(case when (`itb`.`id_kualitas_periksa` = 0) then '' else `mk3`.`nama_kualitas` end) AS `nama_kualitas_periksa`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`id_satuan` end) AS `id_perubahansatuan`,(case when isnull(`ms2`.`id_satuan`) then '' else `ms2`.`nama_satuan` end) AS `nama_perubahansatuan`,(case when (isnull(`itb`.`jumlah_rencana`) or (`itb`.`jumlah_rencana` = 0)) then '' else `itb`.`jumlah_rencana` end) AS `jumlah_rencana`,`it`.`tanggal_masuk` AS `tanggal_full` from ((((((((((((((((((((`inv_transfergudang` `it` join `inv_transfergudang_barang` `itb` on((`it`.`id_transfergudang` = `itb`.`kode_transfergudang`))) join `ms_barang` `mb` on((`itb`.`kode_barang` = `mb`.`id`))) join `ms_gudang` `mg` on((`it`.`gudang_tujuan` = `mg`.`id_gudang`))) left join `ms_proses` `mp` on((`mp`.`id_proses` = `itb`.`id_proses`))) left join `ms_warnakomposisi` `mwk` on((`itb`.`id_komposisi` = `mwk`.`id_komposisi`))) left join `ms_satuan` `ms` on((`itb`.`id_satuan` = `ms`.`id_satuan`))) left join `ms_motif_barang` `mmb` on((`itb`.`id_motif_barang` = `mmb`.`id_motif_barang`))) left join `ms_motif` `mm` on((`itb`.`id_motif` = `mm`.`id_motif`))) left join `pem_workorder` `pw` on((`itb`.`id_workorder` = `pw`.`id_workorder`))) left join `pem_workorder_barang` `pwb` on((`itb`.`id_workorder_barang` = `pwb`.`id_workorder_barang`))) left join `ms_kualitas` `mk` on((`itb`.`id_kualitas` = `mk`.`id_kualitas`))) left join `ms_barang` `mb2` on((`itb`.`id_label` = `mb2`.`id`))) left join `ms_barang` `mb3` on((`itb`.`id_kemasan` = `mb3`.`id`))) left join `ms_barang` `mb4` on((`itb`.`id_kemasansatuan` = `mb4`.`id`))) left join `ms_barang` `mb5` on((`itb`.`id_kemasansepuluh` = `mb5`.`id`))) left join `ms_barang` `mb6` on((`itb`.`id_kemasanseratus` = `mb6`.`id`))) left join `ms_barang` `mb7` on((`itb`.`id_cap` = `mb7`.`id`))) left join `ms_kualitas` `mk2` on((`itb`.`id_kualitas_proses` = `mk2`.`id_kualitas`))) left join `ms_kualitas` `mk3` on((`itb`.`id_kualitas_periksa` = `mk3`.`id_kualitas`))) left join `ms_satuan` `ms2` on((`itb`.`id_perubahansatuan` = `ms2`.`id_satuan`))) where (`it`.`status` = 2);

-- membuang struktur untuk view si_sarung.view_upah_harian
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_upah_harian`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_upah_harian` AS select `uh`.`id_upah_harian` AS `id_upah_harian`,`uh`.`no_transaksi` AS `no_transaksi`,`uh`.`tanggal_transaksi` AS `tanggal_transaksi`,`uhd`.`id_pegawai` AS `id_pegawai`,`pg`.`nomor_pegawai` AS `nomor_pegawai`,`pg`.`nama_pegawai` AS `nama_pegawai`,`dp`.`nama` AS `bagian`,`uhd`.`lokasi` AS `id_lokasi_produksi`,`lkp`.`nama_lokasi` AS `nama_lokasi`,`uhd`.`hari_normal` AS `hari_normal`,`uhd`.`absen_hari` AS `absen_hari`,`uhd`.`hari_kerja` AS `hari_kerja`,`uhd`.`upah_perhari` AS `upah_perhari`,`uhd`.`jumlah_jam_lembur` AS `jumlah_jam_lembur`,`uhd`.`upah_lembur_jam` AS `upah_lembur_jam`,`uhd`.`jumlah_hari_lembur` AS `jumlah_hari_lembur`,`uhd`.`upah_lembur_hari` AS `upah_lembur_hari`,`uhd`.`jumlah_jam_um_lembur` AS `jumlah_jam_um_lembur`,`uhd`.`um_lembur_jam` AS `um_lembur_jam`,`uhd`.`jumlah_hari_um_lembur` AS `jumlah_hari_um_lembur`,`uhd`.`um_lembur_hari` AS `um_lembur_hari`,`uhd`.`jumlah_hari_um_desa` AS `jumlah_hari_um_desa`,`uhd`.`um_desa` AS `um_desa`,`uhd`.`jumlah_hari_um_kediri` AS `jumlah_hari_um_kediri`,`uhd`.`um_kediri` AS `um_kediri`,`uhd`.`jumlah_jam_keterlambatan` AS `jumlah_jam_keterlambatan`,`uhd`.`potongan_keterlambatan` AS `potongan_keterlambatan`,`uhd`.`potongan_kas_bon` AS `potongan_kas_bon`,`uhd`.`pembulatan` AS `pembulatan`,`uhd`.`upah_terima` AS `upah_terima`,`uh`.`created_at` AS `created_at` from ((((`pro_upah_harian` `uh` join `pro_upah_harian_detail` `uhd` on((`uhd`.`id_upah_harian` = `uh`.`id_upah_harian`))) join `ms_pegawai` `pg` on((`pg`.`id_pegawai` = `uhd`.`id_pegawai`))) join `ms_departement` `dp` on((`dp`.`id_departement` = `pg`.`id_departement`))) join `ms_lokasi_produksi` `lkp` on((`lkp`.`id_lokasi` = `uhd`.`lokasi`)));

-- membuang struktur untuk view si_sarung.view_workorderbarang
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_workorderbarang`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_workorderbarang` AS select `pwb`.`id_workorder_barang` AS `id_workorder_barang`,`pwb`.`id_workorder` AS `id_workorder`,`pwb`.`no_workorder` AS `no_workorder`,`pwb`.`motif` AS `motif`,`pwb`.`tanggal_celup` AS `tanggal_celup`,`pwb`.`hb` AS `hb`,`pwb`.`jumlah_beem` AS `jumlah_beem`,`pwb`.`dasar` AS `dasar`,`pwb`.`dasar2` AS `dasar2`,`pwb`.`dasar3` AS `dasar3`,`pwb`.`streep` AS `streep`,`pwb`.`kombinasi1` AS `kombinasi1`,`pwb`.`kombinasi2` AS `kombinasi2`,`pwb`.`kombinasi3` AS `kombinasi3`,`pwb`.`kluwungan1` AS `kluwungan1`,`pwb`.`kluwungan2` AS `kluwungan2`,`pwb`.`kluwungan3` AS `kluwungan3`,`pwb`.`kluwungan4` AS `kluwungan4`,`pwb`.`timbulan1` AS `timbulan1`,`pwb`.`timbulan2` AS `timbulan2`,`pwb`.`timbulan3` AS `timbulan3`,`pwb`.`songketan1` AS `songketan1`,`pwb`.`songketan2` AS `songketan2`,`pwb`.`songketan3` AS `songketan3`,`pwb`.`songketan4` AS `songketan4`,`pwb`.`pancingan1` AS `pancingan1`,`pwb`.`pancingan2` AS `pancingan2`,`pwb`.`gunungan1_atas` AS `gunungan1_atas`,`pwb`.`gunungan2_atas` AS `gunungan2_atas`,`pwb`.`gunungan3_atas` AS `gunungan3_atas`,`pwb`.`gunungan1_bawah` AS `gunungan1_bawah`,`pwb`.`gunungan2_bawah` AS `gunungan2_bawah`,`pwb`.`gunungan3_bawah` AS `gunungan3_bawah`,`pwb`.`garis1` AS `garis1`,`pwb`.`garis2` AS `garis2`,`pwb`.`beem` AS `beem`,`pwb`.`pakan` AS `pakan`,`pwb`.`created_at` AS `created_at`,`pwb`.`update_at` AS `update_at`,`mwk`.`id_komposisi` AS `id_komposisi`,`mwk`.`nama` AS `nama_komposisi`,`mb`.`id` AS `id_barang`,`mb`.`nama_barang` AS `nama_barang`,`mb`.`kode_barang` AS `kode_barang`,`mwk`.`inisial` AS `inisial` from (((`pem_workorder` `pw` join `pem_workorder_barang` `pwb` on((`pw`.`id_workorder` = `pwb`.`id_workorder`))) join `ms_barang` `mb` on((`pw`.`id_barang` = `mb`.`id`))) join `ms_warnakomposisi` `mwk` on((`pwb`.`dasar` = `mwk`.`id_komposisi`))) union all select `pwb`.`id_workorder_barang` AS `id_workorder_barang`,`pwb`.`id_workorder` AS `id_workorder`,`pwb`.`no_workorder` AS `no_workorder`,`pwb`.`motif` AS `motif`,`pwb`.`tanggal_celup` AS `tanggal_celup`,`pwb`.`hb` AS `hb`,`pwb`.`jumlah_beem` AS `jumlah_beem`,`pwb`.`dasar` AS `dasar`,`pwb`.`dasar2` AS `dasar2`,`pwb`.`dasar3` AS `dasar3`,`pwb`.`streep` AS `streep`,`pwb`.`kombinasi1` AS `kombinasi1`,`pwb`.`kombinasi2` AS `kombinasi2`,`pwb`.`kombinasi3` AS `kombinasi3`,`pwb`.`kluwungan1` AS `kluwungan1`,`pwb`.`kluwungan2` AS `kluwungan2`,`pwb`.`kluwungan3` AS `kluwungan3`,`pwb`.`kluwungan4` AS `kluwungan4`,`pwb`.`timbulan1` AS `timbulan1`,`pwb`.`timbulan2` AS `timbulan2`,`pwb`.`timbulan3` AS `timbulan3`,`pwb`.`songketan1` AS `songketan1`,`pwb`.`songketan2` AS `songketan2`,`pwb`.`songketan3` AS `songketan3`,`pwb`.`songketan4` AS `songketan4`,`pwb`.`pancingan1` AS `pancingan1`,`pwb`.`pancingan2` AS `pancingan2`,`pwb`.`gunungan1_atas` AS `gunungan1_atas`,`pwb`.`gunungan2_atas` AS `gunungan2_atas`,`pwb`.`gunungan3_atas` AS `gunungan3_atas`,`pwb`.`gunungan1_bawah` AS `gunungan1_bawah`,`pwb`.`gunungan2_bawah` AS `gunungan2_bawah`,`pwb`.`gunungan3_bawah` AS `gunungan3_bawah`,`pwb`.`garis1` AS `garis1`,`pwb`.`garis2` AS `garis2`,`pwb`.`beem` AS `beem`,`pwb`.`pakan` AS `pakan`,`pwb`.`created_at` AS `created_at`,`pwb`.`update_at` AS `update_at`,`mwk`.`id_komposisi` AS `id_komposisi`,`mwk`.`nama` AS `nama_komposisi`,`mb`.`id` AS `id_barang`,`mb`.`nama_barang` AS `nama_barang`,`mb`.`kode_barang` AS `kode_barang`,`mwk`.`inisial` AS `inisial` from (((`pem_workorder` `pw` join `pem_workorder_barang` `pwb` on((`pw`.`id_workorder` = `pwb`.`id_workorder`))) join `ms_barang` `mb` on((`pw`.`id_barang` = `mb`.`id`))) join `ms_warnakomposisi` `mwk` on((`pwb`.`streep` = `mwk`.`id_komposisi`)));

-- membuang struktur untuk view si_sarung.view_workorder_ket
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `view_workorder_ket`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_workorder_ket` AS select `ppb`.`id` AS `id`,`pbk`.`id_barangkeluar` AS `id_barangkeluar`,`pw`.`id_workorder` AS `id_workorder`,`pw`.`nomor` AS `nomor`,`pw`.`tanggal` AS `tanggal`,`pwk`.`id_workorder_ket` AS `id_workorder_ket`,`mmb`.`id_motif_barang` AS `id_motif_barang`,`mmb`.`motif_keterangan` AS `motif_keterangan`,`mb`.`id` AS `id_barang`,`mb`.`kode_barang` AS `kode_barang`,`mb`.`nama_barang` AS `nama_barang`,`pwk`.`jumlah` AS `jumlah`,`mw`.`id_komposisi` AS `id_komposisi`,`mw`.`nama` AS `nama_komposisi` from ((((((`pem_workorder` `pw` join `pem_workorder_ket` `pwk` on((`pw`.`id_workorder` = `pwk`.`id_workorder`))) join `ms_barang` `mb` on((`pwk`.`id_barang` = `mb`.`id`))) left join `ms_motif_barang` `mmb` on((`pwk`.`keterangan` = `mmb`.`id_motif_barang`))) join `pro_barangkeluar` `pbk` on((`pw`.`id_workorder` = `pbk`.`id_workorder`))) join `pro_barangkeluar_barang` `ppb` on((`pbk`.`id_barangkeluar` = `ppb`.`id_barangkeluar`))) left join `ms_warnakomposisi` `mw` on((`mw`.`id_komposisi` = `ppb`.`warna`))) group by `pbk`.`id_barangkeluar`,`pw`.`id_workorder`,`pwk`.`id_workorder_ket`,`mmb`.`id_motif_barang`,`mb`.`id`;

-- membuang struktur untuk view si_sarung.v_mutasi
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `v_mutasi`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v_mutasi` AS select `a`.`id` AS `id`,`a`.`id_barang` AS `id_barang`,`a`.`kode_barang` AS `kode_barang`,`a`.`nama_barang` AS `nama_barang`,`a`.`jumlah` AS `jumlah`,`a`.`masuk` AS `masuk`,`a`.`keluar` AS `keluar`,`a`.`id_gudang` AS `id_gudang`,`a`.`nama_gudang` AS `nama_gudang`,`a`.`tanggal` AS `tanggal`,`a`.`id_proses` AS `id_proses`,`a`.`nama_proses` AS `nama_proses`,`a`.`id_komposisi` AS `id_komposisi`,`a`.`nama_komposisi` AS `nama_komposisi`,`a`.`id_satuan` AS `id_satuan`,`a`.`nama_satuan` AS `nama_satuan`,`a`.`id_corak` AS `id_corak`,`a`.`nama_corak` AS `nama_corak`,`a`.`id_motif` AS `id_motif`,`a`.`nama_motif` AS `nama_motif`,`a`.`id_workorder` AS `id_workorder`,`a`.`no_workorder` AS `no_workorder`,`a`.`id_workorder_barang` AS `id_workorder_barang`,`a`.`no_workorder_barang` AS `no_workorder_barang`,`a`.`id_kualitas` AS `id_kualitas`,`a`.`nama_kualitas` AS `nama_kualitas`,`a`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`a`.`kualitas_dudul` AS `kualitas_dudul`,`a`.`id_label` AS `id_label`,`a`.`nama_label` AS `nama_label`,`a`.`id_kemasan` AS `id_kemasan`,`a`.`nama_kemasan` AS `nama_kemasan`,`a`.`id_kemasansatuan` AS `id_kemasansatuan`,`a`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`a`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`a`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`a`.`id_kemasanseratus` AS `id_kemasanseratus`,`a`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`a`.`id_cap` AS `id_cap`,`a`.`nama_cap` AS `nama_cap`,`a`.`id_kualitas_proses` AS `id_kualitas_proses`,`a`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`a`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`a`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`a`.`id_perubahansatuan` AS `id_perubahansatuan`,`a`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`a`.`jumlah_rencana` AS `jumlah_rencana`,`a`.`tanggal_full` AS `tanggal_full`,`a`.`ket_1` AS `ket_1`,`a`.`ket_2` AS `ket_2`,`a`.`ket_3` AS `ket_3`,`a`.`ket_4` AS `ket_4`,`a`.`ket_5` AS `ket_5`,`a`.`nilai_awal` AS `nilai_awal`,`a`.`nilai_akhir` AS `nilai_akhir`,`a`.`id_detail` AS `id_detail`,`a`.`id_warna` AS `id_warna`,`a`.`nama_warna` AS `nama_warna`,`a`.`inisial_warna` AS `inisial_warna`,`a`.`ket_proses` AS `ket_proses`,`mkb2`.`id_kb` AS `id_kategori`,`mkb2`.`nama` AS `nama_kategori`,`mkb`.`id_kb` AS `id_subkategori`,`mkb`.`nama` AS `nama_subkategori`,`mlp`.`id_lokasi` AS `id_lokasi`,`mlp`.`nama_lokasi` AS `nama_lokasi` from (((((`v_mutasi_` `A` join `ms_gudang` `mg` on((`mg`.`id_gudang` = `a`.`id_gudang`))) join `ms_barang` `mb` on((`mb`.`id` = `a`.`id_barang`))) join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`))) join `ms_lokasi_produksi` `mlp` on((`mg`.`id_lokasi` = `mlp`.`id_lokasi`))) order by `a`.`id_proses`,`a`.`id_komposisi`,`a`.`id_satuan`,`a`.`id_corak`,`a`.`id_motif`,`a`.`id_workorder_barang`,`a`.`id_kualitas`,`a`.`id_kualitas_dudul`,`a`.`id_label`,`a`.`id_kemasan`,`a`.`id_kemasansatuan`,`a`.`id_kemasansepuluh`,`a`.`id_kemasanseratus`,`a`.`id_cap`,`a`.`id_kualitas_proses`,`a`.`id_kualitas_periksa`,`a`.`id_perubahansatuan`,`a`.`jumlah_rencana`,`a`.`tanggal`,`mkb2`.`id_kb`;

-- membuang struktur untuk view si_sarung.v_mutasi_
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `v_mutasi_`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v_mutasi_` AS select `v`.`id` AS `id`,`v`.`id_barang` AS `id_barang`,`v`.`kode_barang` AS `kode_barang`,`v`.`nama_barang` AS `nama_barang`,(case when ((`v`.`id_perubahansatuan` <> '') and (`v`.`jumlah_rencana` <> '') and (`v`.`id_proses` = '33')) then (`v`.`jumlah` * `v`.`jumlah_rencana`) when ((`mps`.`id_perubahansatuan` is not null) and (`v`.`id_proses` = '33')) then (`v`.`jumlah` * `mps`.`jumlah_hasil`) else `v`.`jumlah` end) AS `jumlah`,(case when ((`v`.`id_perubahansatuan` <> '') and (`v`.`jumlah_rencana` <> '') and (`v`.`id_proses` = '33')) then (`v`.`masuk` * `v`.`jumlah_rencana`) when ((`mps`.`id_perubahansatuan` is not null) and (`v`.`id_proses` = '33')) then (`v`.`masuk` * `mps`.`jumlah_hasil`) else `v`.`masuk` end) AS `masuk`,(case when ((`v`.`id_perubahansatuan` <> '') and (`v`.`jumlah_rencana` <> '') and (`v`.`id_proses` = '33')) then (`v`.`keluar` * `v`.`jumlah_rencana`) when ((`mps`.`id_perubahansatuan` is not null) and (`v`.`id_proses` = '33')) then (`v`.`keluar` * `mps`.`jumlah_hasil`) else `v`.`keluar` end) AS `keluar`,`v`.`id_gudang` AS `id_gudang`,`v`.`nama_gudang` AS `nama_gudang`,`v`.`tanggal` AS `tanggal`,`v`.`id_proses` AS `id_proses`,`v`.`nama_proses` AS `nama_proses`,`v`.`id_komposisi` AS `id_komposisi`,`v`.`nama_komposisi` AS `nama_komposisi`,(case when ((`mps`.`id_perubahansatuan` is not null) and (`v`.`id_proses` = '33')) then `ms_rubah`.`id_satuan` else `v`.`id_satuan` end) AS `id_satuan`,(case when ((`mps`.`id_perubahansatuan` is not null) and (`v`.`id_proses` = '33')) then `ms_rubah`.`nama_satuan` else `v`.`nama_satuan` end) AS `nama_satuan`,`v`.`id_corak` AS `id_corak`,`v`.`nama_corak` AS `nama_corak`,`v`.`id_motif` AS `id_motif`,`v`.`nama_motif` AS `nama_motif`,(case when (`v`.`id_proses` = '37') then '' else `v`.`id_workorder` end) AS `id_workorder`,(case when (`v`.`id_proses` = '37') then '' else `v`.`no_workorder` end) AS `no_workorder`,(case when (`v`.`id_proses` = '37') then '' else `v`.`id_workorder_barang` end) AS `id_workorder_barang`,(case when (`v`.`id_proses` = '37') then '' else `v`.`no_workorder_barang` end) AS `no_workorder_barang`,(case when (`v`.`id_proses` = '37') then '' else `v`.`id_kualitas` end) AS `id_kualitas`,(case when (`v`.`id_proses` = '37') then '' else `v`.`nama_kualitas` end) AS `nama_kualitas`,`v`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`v`.`kualitas_dudul` AS `kualitas_dudul`,`v`.`id_label` AS `id_label`,`v`.`nama_label` AS `nama_label`,`v`.`id_kemasan` AS `id_kemasan`,`v`.`nama_kemasan` AS `nama_kemasan`,`v`.`id_kemasansatuan` AS `id_kemasansatuan`,`v`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`v`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`v`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`v`.`id_kemasanseratus` AS `id_kemasanseratus`,`v`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`v`.`id_cap` AS `id_cap`,`v`.`nama_cap` AS `nama_cap`,`v`.`id_kualitas_proses` AS `id_kualitas_proses`,`v`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`v`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`v`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,(case when ((`mps`.`id_perubahansatuan` is not null) and (`v`.`id_proses` = '33')) then '' else `v`.`id_perubahansatuan` end) AS `id_perubahansatuan`,(case when ((`mps`.`id_perubahansatuan` is not null) and (`v`.`id_proses` = '33')) then '' else `v`.`nama_perubahansatuan` end) AS `nama_perubahansatuan`,(case when ((`mps`.`id_perubahansatuan` is not null) and (`v`.`id_proses` = '33')) then '' else `v`.`jumlah_rencana` end) AS `jumlah_rencana`,`v`.`tanggal_full` AS `tanggal_full`,`v`.`ket_1` AS `ket_1`,`v`.`ket_2` AS `ket_2`,`v`.`ket_3` AS `ket_3`,`v`.`ket_4` AS `ket_4`,`v`.`ket_5` AS `ket_5`,(case when ((`v`.`id_perubahansatuan` <> '') and (`v`.`jumlah_rencana` <> '') and (`v`.`id_proses` = '33')) then `mps`.`jumlah_satuanawal` when ((`mps`.`id_perubahansatuan` is not null) and (`v`.`id_proses` = '33')) then `mps`.`jumlah_satuanawal` else 1 end) AS `nilai_awal`,(case when ((`v`.`id_perubahansatuan` <> '') and (`v`.`jumlah_rencana` <> '') and (`v`.`id_proses` = '33')) then `v`.`jumlah_rencana` when ((`mps`.`id_perubahansatuan` is not null) and (`v`.`id_proses` = '33')) then `mps`.`jumlah_satuanperubahan` else 1 end) AS `nilai_akhir`,`v`.`id_detail` AS `id_detail`,`v`.`id_warna` AS `id_warna`,`v`.`nama_warna` AS `nama_warna`,`v`.`inisial_warna` AS `inisial_warna`,`v`.`ket_proses` AS `ket_proses` from (((`v_mutasi_base` `v` left join `ms_gudang` `mg` on((`mg`.`id_gudang` = `v`.`id_gudang`))) left join `ms_perubahansatuan` `mps` on(((`mps`.`id_satuanawal` = `v`.`id_satuan`) and (`mps`.`id_proses` = `v`.`id_proses`) and (`mps`.`id_motif_barang` = `v`.`id_corak`) and (`mps`.`id_motif` = `v`.`id_motif`) and (`mps`.`id_lokasi` = `mg`.`id_lokasi`)))) left join `ms_satuan` `ms_rubah` on((`ms_rubah`.`id_satuan` = `mps`.`id_satuanperubahan`)));

-- membuang struktur untuk view si_sarung.v_mutasi_base
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `v_mutasi_base`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v_mutasi_base` AS select `vi`.`id` AS `id`,`vi`.`id_barang` AS `id_barang`,`vi`.`kode_barang` AS `kode_barang`,`vi`.`nama_barang` AS `nama_barang`,`vi`.`jumlah` AS `jumlah`,`vi`.`masuk` AS `masuk`,`vi`.`keluar` AS `keluar`,`vi`.`id_gudang` AS `id_gudang`,`vi`.`nama_gudang` AS `nama_gudang`,`vi`.`tanggal` AS `tanggal`,`vi`.`id_proses` AS `id_proses`,`vi`.`nama_proses` AS `nama_proses`,`vi`.`id_komposisi` AS `id_komposisi`,`vi`.`nama_komposisi` AS `nama_komposisi`,`vi`.`id_satuan` AS `id_satuan`,`vi`.`nama_satuan` AS `nama_satuan`,`vi`.`id_corak` AS `id_corak`,`vi`.`nama_corak` AS `nama_corak`,`vi`.`id_motif` AS `id_motif`,`vi`.`nama_motif` AS `nama_motif`,`vi`.`id_workorder` AS `id_workorder`,`vi`.`no_workorder` AS `no_workorder`,`vi`.`id_workorder_barang` AS `id_workorder_barang`,`vi`.`no_workorder_barang` AS `no_workorder_barang`,`vi`.`id_kualitas` AS `id_kualitas`,`vi`.`nama_kualitas` AS `nama_kualitas`,`vi`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vi`.`kualitas_dudul` AS `kualitas_dudul`,`vi`.`id_label` AS `id_label`,`vi`.`nama_label` AS `nama_label`,`vi`.`id_kemasan` AS `id_kemasan`,`vi`.`nama_kemasan` AS `nama_kemasan`,`vi`.`id_kemasansatuan` AS `id_kemasansatuan`,`vi`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vi`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vi`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vi`.`id_kemasanseratus` AS `id_kemasanseratus`,`vi`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vi`.`id_cap` AS `id_cap`,`vi`.`nama_cap` AS `nama_cap`,`vi`.`id_kualitas_proses` AS `id_kualitas_proses`,`vi`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vi`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vi`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vi`.`id_perubahansatuan` AS `id_perubahansatuan`,`vi`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vi`.`jumlah_rencana` AS `jumlah_rencana`,`vi`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Saldo Awal' AS `ket_3`,'' AS `ket_4`,`isa`.`keterangan` AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vi`.`id_komposisi`) or (`vi`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vi`.`id_komposisi`) or (`vi`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vi`.`id_komposisi`) or (`vi`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,'' AS `ket_proses` from ((`view_inv_saldoawal` `vi` join `inv_saldoawal` `isa` on((`vi`.`id` = `isa`.`id`))) left join `ms_warnakomposisi` `mk` on((`vi`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,`vp`.`jumlah` AS `jumlah`,`vp`.`masuk` AS `masuk`,`vp`.`keluar` AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,`vp`.`id_satuan` AS `id_satuan`,`vp`.`nama_satuan` AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,`vp`.`tanggal_full` AS `tanggal_full`,concat(`pp`.`no_faktur`,`pp`.`sufix_no_faktur`) AS `ket_1`,`mp`.`nama` AS `ket_2`,concat('Pembelian dari : ',`mp`.`nama`) AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses` from ((`view_penerimaan` `vp` join `pem_pembelian` `pp` on((`vp`.`id` = `pp`.`id_pembelian`))) join `ms_penyedia` `mp` on((`pp`.`id_penyedia` = `mp`.`id_penyedia`))) union all select `vt`.`id` AS `id`,`vt`.`id_barang` AS `id_barang`,`vt`.`kode_barang` AS `kode_barang`,`vt`.`nama_barang` AS `nama_barang`,(`vt`.`jum_barang` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `jumlah`,0 AS `masuk`,(`vt`.`keluar` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `keluar`,`vt`.`id_gudang` AS `id_gudang`,`vt`.`nama_gudang` AS `nama_gudang`,`vt`.`tanggal` AS `tanggal`,`vt`.`id_proses` AS `id_proses`,`vt`.`nama_proses` AS `nama_proses`,`vt`.`id_komposisi` AS `id_komposisi`,`vt`.`nama_komposisi` AS `nama_komposisi`,`vt`.`id_satuan` AS `id_satuan`,`vt`.`nama_satuan` AS `nama_satuan`,`vt`.`id_corak` AS `id_corak`,`vt`.`nama_corak` AS `nama_corak`,`vt`.`id_motif` AS `id_motif`,`vt`.`nama_motif` AS `nama_motif`,`vt`.`id_workorder` AS `id_workorder`,`vt`.`no_workorder` AS `no_workorder`,`vt`.`id_workorder_barang` AS `id_workorder_barang`,`vt`.`no_workorder_barang` AS `no_workorder_barang`,`vt`.`id_kualitas` AS `id_kualitas`,`vt`.`nama_kualitas` AS `nama_kualitas`,`vt`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vt`.`kualitas_dudul` AS `kualitas_dudul`,`vt`.`id_label` AS `id_label`,`vt`.`nama_label` AS `nama_label`,`vt`.`id_kemasan` AS `id_kemasan`,`vt`.`nama_kemasan` AS `nama_kemasan`,`vt`.`id_kemasansatuan` AS `id_kemasansatuan`,`vt`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vt`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vt`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vt`.`id_kemasanseratus` AS `id_kemasanseratus`,`vt`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vt`.`id_cap` AS `id_cap`,`vt`.`nama_cap` AS `nama_cap`,`vt`.`id_kualitas_proses` AS `id_kualitas_proses`,`vt`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vt`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vt`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vt`.`id_perubahansatuan` AS `id_perubahansatuan`,`vt`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vt`.`jumlah_rencana` AS `jumlah_rencana`,`vt`.`tanggal_full` AS `tanggal_full`,concat(`it`.`no_faktur`,`it`.`faktur`) AS `ket_1`,`vt`.`nama_gudang` AS `ket_2`,concat('Transfer Keluar ke ',`mg`.`nama_gudang`) AS `ket_3`,'' AS `ket_4`,`vt`.`keterangan` AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`vt`.`keterangan` AS `ket_proses` from (((`view_transferkeluar_all` `vt` join `inv_transfergudang` `it` on((`vt`.`id` = `it`.`id_transfergudang`))) left join `ms_warnakomposisi` `mk` on((`vt`.`id_komposisi` = `mk`.`id_komposisi`))) left join `ms_gudang` `mg` on((`it`.`gudang_tujuan` = `mg`.`id_gudang`))) union all select `vt`.`id` AS `id`,`vt`.`id_barang` AS `id_barang`,`vt`.`kode_barang` AS `kode_barang`,`vt`.`nama_barang` AS `nama_barang`,(`vt`.`jum_barang` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `jumlah`,(`vt`.`masuk` * (`vt`.`nilai_akhir` / `vt`.`nilai_awal`)) AS `masuk`,0 AS `keluar`,`vt`.`id_gudang` AS `id_gudang`,`vt`.`nama_gudang` AS `nama_gudang`,`vt`.`tanggal` AS `tanggal`,`vt`.`id_proses` AS `id_proses`,`vt`.`nama_proses` AS `nama_proses`,`vt`.`id_komposisi` AS `id_komposisi`,`vt`.`nama_komposisi` AS `nama_komposisi`,`vt`.`id_satuan` AS `id_satuan`,`vt`.`nama_satuan` AS `nama_satuan`,`vt`.`id_corak` AS `id_corak`,`vt`.`nama_corak` AS `nama_corak`,`vt`.`id_motif` AS `id_motif`,`vt`.`nama_motif` AS `nama_motif`,`vt`.`id_workorder` AS `id_workorder`,`vt`.`no_workorder` AS `no_workorder`,`vt`.`id_workorder_barang` AS `id_workorder_barang`,`vt`.`no_workorder_barang` AS `no_workorder_barang`,`vt`.`id_kualitas` AS `id_kualitas`,`vt`.`nama_kualitas` AS `nama_kualitas`,`vt`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vt`.`kualitas_dudul` AS `kualitas_dudul`,`vt`.`id_label` AS `id_label`,`vt`.`nama_label` AS `nama_label`,`vt`.`id_kemasan` AS `id_kemasan`,`vt`.`nama_kemasan` AS `nama_kemasan`,`vt`.`id_kemasansatuan` AS `id_kemasansatuan`,`vt`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vt`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vt`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vt`.`id_kemasanseratus` AS `id_kemasanseratus`,`vt`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vt`.`id_cap` AS `id_cap`,`vt`.`nama_cap` AS `nama_cap`,`vt`.`id_kualitas_proses` AS `id_kualitas_proses`,`vt`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vt`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vt`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vt`.`id_perubahansatuan` AS `id_perubahansatuan`,`vt`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vt`.`jumlah_rencana` AS `jumlah_rencana`,`vt`.`tanggal_full` AS `tanggal_full`,concat(`it`.`no_faktur`,`it`.`faktur`) AS `ket_1`,`vt`.`nama_gudang` AS `ket_2`,concat('Transfer Masuk dari ',`mg`.`nama_gudang`) AS `ket_3`,'' AS `ket_4`,`vt`.`keterangan` AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vt`.`id_komposisi`) or (`vt`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`vt`.`keterangan` AS `ket_proses` from (((`view_transfermasuk_all` `vt` join `inv_transfergudang` `it` on((`vt`.`id` = `it`.`id_transfergudang`))) left join `ms_warnakomposisi` `mk` on((`vt`.`id_komposisi` = `mk`.`id_komposisi`))) left join `ms_gudang` `mg` on((`it`.`gudang_awal` = `mg`.`id_gudang`))) union all select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,`vp`.`jumlah` AS `jumlah`,`vp`.`masuk` AS `masuk`,`vp`.`keluar` AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,`vp`.`id_satuan` AS `id_satuan`,`vp`.`nama_satuan` AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,`vp`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Bon Bahan' AS `ket_3`,`mp`.`nama_proses` AS `ket_4`,'' AS `ket_5`,`vp`.`nilai_awal` AS `nilai_awal`,`vp`.`nilai_akhir` AS `nilai_akhir`,`vp`.`id_detail` AS `id_detail`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`pbb`.`keterangan` AS `ket_proses` from ((((`view_keluar_all` `vp` left join `pro_barangkeluar_barang` `pbb` on((`vp`.`id_detail` = `pbb`.`id`))) join `pro_barangkeluar` `pb` on((`pbb`.`id_barangkeluar` = `pb`.`id_barangkeluar`))) join `ms_proses` `mp` on((`pb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mk` on((`pbb`.`warna` = `mk`.`id_komposisi`))) union all select `vm`.`id` AS `id`,`vm`.`id_barang` AS `id_barang`,`vm`.`kode_barang` AS `kode_barang`,`vm`.`nama_barang` AS `nama_barang`,`vm`.`jum_barang` AS `jumlah`,`vm`.`masuk` AS `masuk`,`vm`.`keluar` AS `keluar`,`vm`.`id_gudang` AS `id_gudang`,`vm`.`nama_gudang` AS `nama_gudang`,`vm`.`tanggal` AS `tanggal`,`vm`.`id_proses` AS `id_proses`,`vm`.`nama_proses` AS `nama_proses`,`vm`.`id_komposisi` AS `id_komposisi`,`vm`.`nama_komposisi` AS `nama_komposisi`,`vm`.`id_satuan` AS `id_satuan`,`vm`.`nama_satuan` AS `nama_satuan`,`vm`.`id_corak` AS `id_corak`,`vm`.`nama_corak` AS `nama_corak`,`vm`.`id_motif` AS `id_motif`,`vm`.`nama_motif` AS `nama_motif`,`vm`.`id_workorder` AS `id_workorder`,`vm`.`no_workorder` AS `no_workorder`,`vm`.`id_workorder_barang` AS `id_workorder_barang`,`vm`.`no_workorder_barang` AS `no_workorder_barang`,`vm`.`id_kualitas` AS `id_kualitas`,`vm`.`nama_kualitas` AS `nama_kualitas`,`vm`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vm`.`kualitas_dudul` AS `kualitas_dudul`,`vm`.`id_label` AS `id_label`,`vm`.`nama_label` AS `nama_label`,`vm`.`id_kemasan` AS `id_kemasan`,`vm`.`nama_kemasan` AS `nama_kemasan`,`vm`.`id_kemasansatuan` AS `id_kemasansatuan`,`vm`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vm`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vm`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vm`.`id_kemasanseratus` AS `id_kemasanseratus`,`vm`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vm`.`id_cap` AS `id_cap`,`vm`.`nama_cap` AS `nama_cap`,`vm`.`id_kualitas_proses` AS `id_kualitas_proses`,`vm`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vm`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vm`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vm`.`id_perubahansatuan` AS `id_perubahansatuan`,`vm`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vm`.`jumlah_rencana` AS `jumlah_rencana`,`vm`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Laporan Hasil' AS `ket_3`,`vm`.`nama_proses` AS `ket_4`,'' AS `ket_5`,`vm`.`nilai_awal` AS `nilai_awal`,`vm`.`nilai_akhir` AS `nilai_akhir`,`vm`.`id_detail` AS `id_detail`,`mk`.`id_komposisi` AS `id_warna`,`mk`.`nama` AS `nama_warna`,`mk`.`inisial` AS `inisial_warna`,`pbb`.`keterangan` AS `ket_proses` from ((`view_masuk_all` `vm` left join `ms_warnakomposisi` `mk` on((`vm`.`id_komposisi` = `mk`.`id_komposisi`))) left join `pro_barangmasuk_barang` `pbb` on((`vm`.`id_detail` = `pbb`.`id`))) union all select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,`vp`.`jumlah` AS `jumlah`,`vp`.`masuk` AS `masuk`,`vp`.`keluar` AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,`vp`.`id_satuan` AS `id_satuan`,`vp`.`nama_satuan` AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,`vp`.`tanggal_full` AS `tanggal_full`,(case when isnull(`pp`.`id_penjualan`) then concat(`ppr`.`no_retur`,`ppr`.`sufix_no_retur`) else concat(`pp`.`no_faktur`,`pp`.`sufix_no_faktur`) end) AS `ket_1`,(case when isnull(`pp`.`id_penjualan`) then `mp2`.`nama` else `mp`.`nama` end) AS `ket_2`,(case when isnull(`pp`.`id_penjualan`) then 'Retur Penjualan' else 'Penjualan' end) AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses` from ((((`view_penjualan` `vp` left join `pen_penjualan` `pp` on((`vp`.`id` = `pp`.`id_penjualan`))) left join `ms_pelanggan` `mp` on((`pp`.`id_pelanggan` = `mp`.`id_pelanggan`))) left join `pen_penjualan_retur` `ppr` on((`vp`.`id` = `ppr`.`id`))) left join `ms_pelanggan` `mp2` on((`ppr`.`id_pelanggan` = `mp2`.`id_pelanggan`))) union all select `vo`.`id` AS `id`,`vo`.`id_barang` AS `id_barang`,`vo`.`kode_barang` AS `kode_barang`,`vo`.`nama_barang` AS `nama_barang`,`vo`.`jumlah` AS `jumlah`,`vo`.`masuk` AS `masuk`,`vo`.`keluar` AS `keluar`,`vo`.`id_gudang` AS `id_gudang`,`vo`.`nama_gudang` AS `nama_gudang`,`vo`.`tanggal` AS `tanggal`,`vo`.`id_proses` AS `id_proses`,`vo`.`nama_proses` AS `nama_proses`,`vo`.`id_komposisi` AS `id_komposisi`,`vo`.`nama_komposisi` AS `nama_komposisi`,`vo`.`id_satuan` AS `id_satuan`,`vo`.`nama_satuan` AS `nama_satuan`,`vo`.`id_corak` AS `id_corak`,`vo`.`nama_corak` AS `nama_corak`,`vo`.`id_motif` AS `id_motif`,`vo`.`nama_motif` AS `nama_motif`,`vo`.`id_workorder` AS `id_workorder`,`vo`.`no_workorder` AS `no_workorder`,`vo`.`id_workorder_barang` AS `id_workorder_barang`,`vo`.`no_workorder_barang` AS `no_workorder_barang`,`vo`.`id_kualitas` AS `id_kualitas`,`vo`.`nama_kualitas` AS `nama_kualitas`,`vo`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vo`.`kualitas_dudul` AS `kualitas_dudul`,`vo`.`id_label` AS `id_label`,`vo`.`nama_label` AS `nama_label`,`vo`.`id_kemasan` AS `id_kemasan`,`vo`.`nama_kemasan` AS `nama_kemasan`,`vo`.`id_kemasansatuan` AS `id_kemasansatuan`,`vo`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vo`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vo`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vo`.`id_kemasanseratus` AS `id_kemasanseratus`,`vo`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vo`.`id_cap` AS `id_cap`,`vo`.`nama_cap` AS `nama_cap`,`vo`.`id_kualitas_proses` AS `id_kualitas_proses`,`vo`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vo`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vo`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vo`.`id_perubahansatuan` AS `id_perubahansatuan`,`vo`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vo`.`jumlah_rencana` AS `jumlah_rencana`,`vo`.`tanggal_full` AS `tanggal_full`,`io`.`keterangan` AS `ket_1`,`vo`.`nama_gudang` AS `ket_2`,'Stok Opname' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vo`.`id_komposisi`) or (`vo`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vo`.`id_komposisi`) or (`vo`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vo`.`id_komposisi`) or (`vo`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,'' AS `ket_proses` from ((`view_opname` `vo` join `inv_opname` `io` on((`vo`.`id` = `io`.`id_opname`))) left join `ms_warnakomposisi` `mk` on((`vo`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `vk`.`id` AS `id`,`vk`.`id_barang` AS `id_barang`,`vk`.`kode_barang` AS `kode_barang`,`vk`.`nama_barang` AS `nama_barang`,`vk`.`jumlah` AS `jumlah`,`vk`.`masuk` AS `masuk`,`vk`.`keluar` AS `keluar`,`vk`.`id_gudang` AS `id_gudang`,`vk`.`nama_gudang` AS `nama_gudang`,`vk`.`tanggal` AS `tanggal`,`vk`.`id_proses` AS `id_proses`,`vk`.`nama_proses` AS `nama_proses`,`vk`.`id_komposisi` AS `id_komposisi`,`vk`.`nama_komposisi` AS `nama_komposisi`,`vk`.`id_satuan` AS `id_satuan`,`vk`.`nama_satuan` AS `nama_satuan`,`vk`.`id_corak` AS `id_corak`,`vk`.`nama_corak` AS `nama_corak`,`vk`.`id_motif` AS `id_motif`,`vk`.`nama_motif` AS `nama_motif`,`vk`.`id_workorder` AS `id_workorder`,`vk`.`no_workorder` AS `no_workorder`,`vk`.`id_workorder_barang` AS `id_workorder_barang`,`vk`.`no_workorder_barang` AS `no_workorder_barang`,`vk`.`id_kualitas` AS `id_kualitas`,`vk`.`nama_kualitas` AS `nama_kualitas`,`vk`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vk`.`kualitas_dudul` AS `kualitas_dudul`,`vk`.`id_label` AS `id_label`,`vk`.`nama_label` AS `nama_label`,`vk`.`id_kemasan` AS `id_kemasan`,`vk`.`nama_kemasan` AS `nama_kemasan`,`vk`.`id_kemasansatuan` AS `id_kemasansatuan`,`vk`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vk`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vk`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vk`.`id_kemasanseratus` AS `id_kemasanseratus`,`vk`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vk`.`id_cap` AS `id_cap`,`vk`.`nama_cap` AS `nama_cap`,`vk`.`id_kualitas_proses` AS `id_kualitas_proses`,`vk`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vk`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vk`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vk`.`id_perubahansatuan` AS `id_perubahansatuan`,`vk`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vk`.`jumlah_rencana` AS `jumlah_rencana`,`vk`.`tanggal_full` AS `tanggal_full`,concat(`pbk`.`noAuto`,`pbk`.`noAuto_ext`) AS `ket_1`,(case when isnull(`mp`.`nama_pegawai`) then concat(`mr`.`nama`,'( Rekanan )') else concat(`mp`.`nama_pegawai`,'( Pegawai )') end) AS `ket_2`,'Bon Bahan' AS `ket_3`,`mpr`.`nama_proses` AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses` from ((((`view_keluarkemasan` `vk` join `pro_barangkeluar_kemasan` `pbk` on((`vk`.`id` = `pbk`.`id_barangkeluar_kemasan`))) left join `ms_pegawai` `mp` on((`pbk`.`id_pegawai` = `mp`.`id_pegawai`))) left join `ms_rekanan` `mr` on((`pbk`.`id_rekanan` = `mr`.`id_rekanan`))) left join `ms_proses` `mpr` on((`pbk`.`id_proses` = `mpr`.`id_proses`))) union all select `vm`.`id` AS `id`,`vm`.`id_barang` AS `id_barang`,`vm`.`kode_barang` AS `kode_barang`,`vm`.`nama_barang` AS `nama_barang`,`vm`.`jumlah` AS `jumlah`,`vm`.`masuk` AS `masuk`,`vm`.`keluar` AS `keluar`,`vm`.`id_gudang` AS `id_gudang`,`vm`.`nama_gudang` AS `nama_gudang`,`vm`.`tanggal` AS `tanggal`,`vm`.`id_proses` AS `id_proses`,`vm`.`nama_proses` AS `nama_proses`,`vm`.`id_komposisi` AS `id_komposisi`,`vm`.`nama_komposisi` AS `nama_komposisi`,`vm`.`id_satuan` AS `id_satuan`,`vm`.`nama_satuan` AS `nama_satuan`,`vm`.`id_corak` AS `id_corak`,`vm`.`nama_corak` AS `nama_corak`,`vm`.`id_motif` AS `id_motif`,`vm`.`nama_motif` AS `nama_motif`,`vm`.`id_workorder` AS `id_workorder`,`vm`.`no_workorder` AS `no_workorder`,`vm`.`id_workorder_barang` AS `id_workorder_barang`,`vm`.`no_workorder_barang` AS `no_workorder_barang`,`vm`.`id_kualitas` AS `id_kualitas`,`vm`.`nama_kualitas` AS `nama_kualitas`,`vm`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vm`.`kualitas_dudul` AS `kualitas_dudul`,`vm`.`id_label` AS `id_label`,`vm`.`nama_label` AS `nama_label`,`vm`.`id_kemasan` AS `id_kemasan`,`vm`.`nama_kemasan` AS `nama_kemasan`,`vm`.`id_kemasansatuan` AS `id_kemasansatuan`,`vm`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vm`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vm`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vm`.`id_kemasanseratus` AS `id_kemasanseratus`,`vm`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vm`.`id_cap` AS `id_cap`,`vm`.`nama_cap` AS `nama_cap`,`vm`.`id_kualitas_proses` AS `id_kualitas_proses`,`vm`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vm`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vm`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vm`.`id_perubahansatuan` AS `id_perubahansatuan`,`vm`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vm`.`jumlah_rencana` AS `jumlah_rencana`,`vm`.`tanggal_full` AS `tanggal_full`,concat(`pbm`.`noAuto`,`pbm`.`noAuto_ext`) AS `ket_1`,(case when isnull(`mp`.`nama_pegawai`) then concat(`mr`.`nama`,'( Rekanan )') else concat(`mp`.`nama_pegawai`,'( Pegawai )') end) AS `ket_2`,'Laporan Hasil' AS `ket_3`,`mpr`.`nama_proses` AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses` from (((((`view_masukkemasan` `vm` join `pro_barangmasuk_kemasan` `pbm` on((`vm`.`id` = `pbm`.`id_barangmasuk_kemasan`))) join `pro_barangkeluar_kemasan` `pbk` on((`pbm`.`id_barangkeluar_kemasan` = `pbk`.`id_barangkeluar_kemasan`))) left join `ms_pegawai` `mp` on((`pbk`.`id_pegawai` = `mp`.`id_pegawai`))) left join `ms_rekanan` `mr` on((`pbk`.`id_rekanan` = `mr`.`id_rekanan`))) left join `ms_proses` `mpr` on((`pbk`.`id_proses` = `mpr`.`id_proses`))) union all select `vke`.`id` AS `id`,`vke`.`id_barang` AS `id_barang`,`vke`.`kode_barang` AS `kode_barang`,`vke`.`nama_barang` AS `nama_barang`,`vke`.`jumlah` AS `jumlah`,`vke`.`masuk` AS `masuk`,`vke`.`keluar` AS `keluar`,`vke`.`id_gudang` AS `id_gudang`,`vke`.`nama_gudang` AS `nama_gudang`,`vke`.`tanggal` AS `tanggal`,`vke`.`id_proses` AS `id_proses`,`vke`.`nama_proses` AS `nama_proses`,`vke`.`id_komposisi` AS `id_komposisi`,`vke`.`nama_komposisi` AS `nama_komposisi`,`vke`.`id_satuan` AS `id_satuan`,`vke`.`nama_satuan` AS `nama_satuan`,`vke`.`id_corak` AS `id_corak`,`vke`.`nama_corak` AS `nama_corak`,`vke`.`id_motif` AS `id_motif`,`vke`.`nama_motif` AS `nama_motif`,`vke`.`id_workorder` AS `id_workorder`,`vke`.`no_workorder` AS `no_workorder`,`vke`.`id_workorder_barang` AS `id_workorder_barang`,`vke`.`no_workorder_barang` AS `no_workorder_barang`,`vke`.`id_kualitas` AS `id_kualitas`,`vke`.`nama_kualitas` AS `nama_kualitas`,`vke`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vke`.`nama_kualitas_dudul` AS `nama_kualitas_dudul`,`vke`.`id_label` AS `id_label`,`vke`.`nama_label` AS `nama_label`,`vke`.`id_kemasan` AS `id_kemasan`,`vke`.`nama_kemasan` AS `nama_kemasan`,`vke`.`id_kemasansatuan` AS `id_kemasansatuan`,`vke`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vke`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vke`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vke`.`id_kemasanseratus` AS `id_kemasanseratus`,`vke`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vke`.`id_cap` AS `id_cap`,`vke`.`nama_cap` AS `nama_cap`,`vke`.`id_kualitas_proses` AS `id_kualitas_proses`,`vke`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vke`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vke`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vke`.`id_perubahansatuan` AS `id_perubahansatuan`,`vke`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vke`.`jumlah_rencana` AS `jumlah_rencana`,`vke`.`tanggal_full` AS `tanggal_full`,'' AS `ket_1`,'' AS `ket_2`,'Pengembalian Barang' AS `ket_3`,`vke`.`nama_proses` AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,(case when (isnull(`vke`.`id_komposisi`) or (`vke`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`vke`.`id_komposisi`) or (`vke`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`vke`.`id_komposisi`) or (`vke`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,'' AS `ket_proses` from ((`view_kembali` `vke` join `pro_kembali` `pk` on((`vke`.`id` = `pk`.`id_kembali`))) left join `ms_warnakomposisi` `mk` on((`vke`.`id_komposisi` = `mk`.`id_komposisi`))) union all select `v`.`id` AS `id`,`v`.`id_barang` AS `id_barang`,`v`.`kode_barang` AS `kode_barang`,`v`.`nama_barang` AS `nama_barang`,`v`.`jumlah` AS `jumlah`,`v`.`masuk` AS `masuk`,`v`.`keluar` AS `keluar`,`v`.`id_gudang` AS `id_gudang`,`v`.`nama_gudang` AS `nama_gudang`,`v`.`tanggal` AS `tanggal`,`v`.`id_proses` AS `id_proses`,`v`.`nama_proses` AS `nama_proses`,`v`.`id_komposisi` AS `id_komposisi`,`v`.`nama_komposisi` AS `nama_komposisi`,`v`.`id_satuan` AS `id_satuan`,`v`.`nama_satuan` AS `nama_satuan`,`v`.`id_corak` AS `id_corak`,`v`.`nama_corak` AS `nama_corak`,`v`.`id_motif` AS `id_motif`,`v`.`nama_motif` AS `nama_motif`,`v`.`id_workorder` AS `id_workorder`,`v`.`no_workorder` AS `no_workorder`,`v`.`id_workorder_barang` AS `id_workorder_barang`,`v`.`no_workorder_barang` AS `no_workorder_barang`,`v`.`id_kualitas` AS `id_kualitas`,`v`.`nama_kualitas` AS `nama_kualitas`,`v`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`v`.`kualitas_dudul` AS `kualitas_dudul`,`v`.`id_label` AS `id_label`,`v`.`nama_label` AS `nama_label`,`v`.`id_kemasan` AS `id_kemasan`,`v`.`nama_kemasan` AS `nama_kemasan`,`v`.`id_kemasansatuan` AS `id_kemasansatuan`,`v`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`v`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`v`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`v`.`id_kemasanseratus` AS `id_kemasanseratus`,`v`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`v`.`id_cap` AS `id_cap`,`v`.`nama_cap` AS `nama_cap`,`v`.`id_kualitas_proses` AS `id_kualitas_proses`,`v`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`v`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`v`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`v`.`id_perubahansatuan` AS `id_perubahansatuan`,`v`.`nama_perubahan_satuan` AS `nama_perubahan_satuan`,`v`.`jumlah_rencana` AS `jumlah_rencana`,`v`.`tanggal_full` AS `tanggal_full`,`ip`.`keterangan` AS `ket_1`,'' AS `ket_2`,'Penggunaan Barang' AS `ket_3`,'' AS `ket_4`,'' AS `ket_5`,'' AS `nilai_awal`,'' AS `nilai_akhir`,'' AS `id_detail`,'' AS `id_warna`,'' AS `nama_warna`,'' AS `inisial_warna`,'' AS `ket_proses` from (`view_penggunaanbarang` `v` join `inv_pengeluaran` `ip` on((`v`.`id` = `ip`.`id_pengeluaran`)));

-- membuang struktur untuk view si_sarung.v_produksi
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `v_produksi`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v_produksi` AS select `a`.`id` AS `id`,`a`.`id_barang` AS `id_barang`,`a`.`kode_barang` AS `kode_barang`,`a`.`nama_barang` AS `nama_barang`,(`a`.`jumlah` * (`a`.`nilai_akhir` / `a`.`nilai_awal`)) AS `jumlah`,(`a`.`masuk` * (`a`.`nilai_akhir` / `a`.`nilai_awal`)) AS `masuk`,(`a`.`keluar` * (`a`.`nilai_akhir` / `a`.`nilai_awal`)) AS `keluar`,`a`.`id_gudang` AS `id_gudang`,`a`.`nama_gudang` AS `nama_gudang`,`a`.`tanggal` AS `tanggal`,`a`.`id_proses` AS `id_proses`,`a`.`nama_proses` AS `nama_proses`,`a`.`id_komposisi` AS `id_komposisi`,`a`.`nama_komposisi` AS `nama_komposisi`,`a`.`id_satuan` AS `id_satuan`,`a`.`nama_satuan` AS `nama_satuan`,`a`.`id_corak` AS `id_corak`,`a`.`nama_corak` AS `nama_corak`,`a`.`id_motif` AS `id_motif`,`a`.`nama_motif` AS `nama_motif`,`a`.`id_workorder` AS `id_workorder`,`a`.`no_workorder` AS `no_workorder`,`a`.`id_workorder_barang` AS `id_workorder_barang`,`a`.`no_workorder_barang` AS `no_workorder_barang`,`a`.`id_kualitas` AS `id_kualitas`,`a`.`nama_kualitas` AS `nama_kualitas`,`a`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`a`.`kualitas_dudul` AS `kualitas_dudul`,`a`.`id_label` AS `id_label`,`a`.`nama_label` AS `nama_label`,`a`.`id_kemasan` AS `id_kemasan`,`a`.`nama_kemasan` AS `nama_kemasan`,`a`.`id_kemasansatuan` AS `id_kemasansatuan`,`a`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`a`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`a`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`a`.`id_kemasanseratus` AS `id_kemasanseratus`,`a`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`a`.`id_cap` AS `id_cap`,`a`.`nama_cap` AS `nama_cap`,`a`.`id_kualitas_proses` AS `id_kualitas_proses`,`a`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`a`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`a`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`a`.`id_perubahansatuan` AS `id_perubahansatuan`,`a`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`a`.`jumlah_rencana` AS `jumlah_rencana`,`a`.`ket_1` AS `ket_1`,`a`.`ket_2` AS `ket_2`,`a`.`ket_3` AS `ket_3`,`a`.`ket_4` AS `ket_4`,`a`.`ket_5` AS `ket_5`,`a`.`nilai_awal` AS `nilai_awal`,`a`.`nilai_akhir` AS `nilai_akhir`,`a`.`id_detail` AS `id_detail`,`a`.`id_warna` AS `id_warna`,`a`.`nama_warna` AS `nama_warna`,`a`.`inisial_warna` AS `inisial_warna`,`a`.`ket_proses` AS `ket_proses`,`a`.`id_proses_sekarang` AS `id_proses_sekarang`,`a`.`nama_proses_sekarang` AS `nama_proses_sekarang`,`a`.`tanggal_full` AS `tanggal_full`,`mkb2`.`id_kb` AS `id_kategori`,`mkb2`.`nama` AS `nama_kategori`,`mkb`.`id_kb` AS `id_subkategori`,`mkb`.`nama` AS `nama_subkategori`,`mlp`.`id_lokasi` AS `id_lokasi`,`mlp`.`nama_lokasi` AS `nama_lokasi`,`a`.`id_pegawai` AS `id_pegawai`,`a`.`nama_pegawai` AS `nama_pegawai`,`a`.`id_rekanan` AS `id_rekanan`,`a`.`nama_rekanan` AS `nama_rekanan`,`a`.`id_mesin` AS `id_mesin`,`a`.`nama_mesin` AS `nama_mesin` from (((((`v_produksi_sub` `a` join `ms_gudang` `mg` on((`mg`.`id_gudang` = `a`.`id_gudang`))) join `ms_lokasi_produksi` `mlp` on((`mlp`.`id_lokasi` = `mg`.`id_lokasi`))) join `ms_barang` `mb` on((`mb`.`id` = `a`.`id_barang`))) join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`)));

-- membuang struktur untuk view si_sarung.v_produksi_kemasan
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `v_produksi_kemasan`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v_produksi_kemasan` AS select `a`.`id` AS `id`,`a`.`id_barang` AS `id_barang`,`a`.`kode_barang` AS `kode_barang`,`a`.`nama_barang` AS `nama_barang`,`a`.`jumlah` AS `jumlah`,`a`.`masuk` AS `masuk`,`a`.`keluar` AS `keluar`,`a`.`id_gudang` AS `id_gudang`,`a`.`nama_gudang` AS `nama_gudang`,`a`.`tanggal` AS `tanggal`,`a`.`id_proses` AS `id_proses`,`a`.`nama_proses` AS `nama_proses`,`a`.`id_komposisi` AS `id_komposisi`,`a`.`nama_komposisi` AS `nama_komposisi`,`a`.`id_satuan` AS `id_satuan`,`a`.`nama_satuan` AS `nama_satuan`,`a`.`id_corak` AS `id_corak`,`a`.`nama_corak` AS `nama_corak`,`a`.`id_motif` AS `id_motif`,`a`.`nama_motif` AS `nama_motif`,`a`.`id_workorder` AS `id_workorder`,`a`.`no_workorder` AS `no_workorder`,`a`.`id_workorder_barang` AS `id_workorder_barang`,`a`.`no_workorder_barang` AS `no_workorder_barang`,`a`.`id_kualitas` AS `id_kualitas`,`a`.`nama_kualitas` AS `nama_kualitas`,`a`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`a`.`kualitas_dudul` AS `kualitas_dudul`,`a`.`id_label` AS `id_label`,`a`.`nama_label` AS `nama_label`,`a`.`id_kemasan` AS `id_kemasan`,`a`.`nama_kemasan` AS `nama_kemasan`,`a`.`id_kemasansatuan` AS `id_kemasansatuan`,`a`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`a`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`a`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`a`.`id_kemasanseratus` AS `id_kemasanseratus`,`a`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`a`.`id_cap` AS `id_cap`,`a`.`nama_cap` AS `nama_cap`,`a`.`id_kualitas_proses` AS `id_kualitas_proses`,`a`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`a`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`a`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`a`.`id_perubahansatuan` AS `id_perubahansatuan`,`a`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`a`.`jumlah_rencana` AS `jumlah_rencana`,`a`.`ket_1` AS `ket_1`,`a`.`ket_2` AS `ket_2`,`a`.`ket_3` AS `ket_3`,`a`.`ket_4` AS `ket_4`,`a`.`ket_5` AS `ket_5`,`a`.`nilai_awal` AS `nilai_awal`,`a`.`nilai_akhir` AS `nilai_akhir`,`a`.`id_detail` AS `id_detail`,`a`.`id_warna` AS `id_warna`,`a`.`nama_warna` AS `nama_warna`,`a`.`inisial_warna` AS `inisial_warna`,`a`.`ket_proses` AS `ket_proses`,`a`.`id_proses_sekarang` AS `id_proses_sekarang`,`a`.`nama_proses_sekarang` AS `nama_proses_sekarang`,`a`.`tanggal_full` AS `tanggal_full`,`mkb2`.`id_kb` AS `id_kategori`,`mkb2`.`nama` AS `nama_kategori`,`mkb`.`id_kb` AS `id_subkategori`,`mkb`.`nama` AS `nama_subkategori`,`mlp`.`id_lokasi` AS `id_lokasi`,`mlp`.`nama_lokasi` AS `nama_lokasi`,`a`.`id_pegawai` AS `id_pegawai`,`a`.`nama_pegawai` AS `nama_pegawai`,`a`.`id_rekanan` AS `id_rekanan`,`a`.`nama_rekanan` AS `nama_rekanan` from (((((`v_produksi_kemasan_sub` `a` join `ms_gudang` `mg` on((`mg`.`id_gudang` = `a`.`id_gudang`))) join `ms_lokasi_produksi` `mlp` on((`mlp`.`id_lokasi` = `mg`.`id_lokasi`))) join `ms_barang` `mb` on((`mb`.`id` = `a`.`id_barang`))) join `ms_kategori_barang` `mkb` on((`mb`.`id_kb` = `mkb`.`id_kb`))) join `ms_kategori_barang` `mkb2` on((`mkb`.`induk_kb` = `mkb2`.`id_kb`)));

-- membuang struktur untuk view si_sarung.v_produksi_kemasan_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `v_produksi_kemasan_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v_produksi_kemasan_sub` AS select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,`vp`.`jum_barang` AS `jumlah`,`vp`.`masuk` AS `masuk`,`vp`.`keluar` AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,`vp`.`id_satuan` AS `id_satuan`,`vp`.`nama_satuan` AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,'' AS `ket_1`,'' AS `ket_2`,'Bon Bahan' AS `ket_3`,`mp`.`nama_proses` AS `ket_4`,'' AS `ket_5`,`vp`.`nilai_awal` AS `nilai_awal`,`vp`.`nilai_akhir` AS `nilai_akhir`,`vp`.`id_detail` AS `id_detail`,(case when (isnull(`pbb`.`id_komposisi`) or (`pbb`.`id_komposisi` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`pbb`.`id_komposisi`) or (`pbb`.`id_komposisi` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`pbb`.`id_komposisi`) or (`pbb`.`id_komposisi` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`pbb`.`keterangan` AS `ket_proses`,`vp`.`id_proses_sekarang` AS `id_proses_sekarang`,`vp`.`nama_proses_sekarang` AS `nama_proses_sekarang`,`vp`.`tanggal_full` AS `tanggal_full`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`id_pegawai` end) AS `id_pegawai`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`nama_pegawai` end) AS `nama_pegawai`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`id_rekanan` end) AS `id_rekanan`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`nama` end) AS `nama_rekanan` from ((((((`view_keluarkemasan_all` `vp` left join `pro_barangkeluar_kemasan_barang` `pbb` on((`vp`.`id_detail` = `pbb`.`id_barangkeluar_kb`))) join `pro_barangkeluar_kemasan` `pb` on((`pbb`.`id_barangkeluar_kemasan` = `pb`.`id_barangkeluar_kemasan`))) join `ms_proses` `mp` on((`pb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mk` on((`pbb`.`id_komposisi` = `mk`.`id_komposisi`))) left join `ms_pegawai` `mpg` on((`pb`.`id_pegawai` = `mpg`.`id_pegawai`))) left join `ms_rekanan` `mpr` on((`pb`.`id_rekanan` = `mpr`.`id_rekanan`))) union all select `vm`.`id` AS `id`,`vm`.`id_barang` AS `id_barang`,`vm`.`kode_barang` AS `kode_barang`,`vm`.`nama_barang` AS `nama_barang`,`vm`.`jum_barang` AS `jumlah`,`vm`.`masuk` AS `masuk`,`vm`.`keluar` AS `keluar`,`vm`.`id_gudang` AS `id_gudang`,`vm`.`nama_gudang` AS `nama_gudang`,`vm`.`tanggal` AS `tanggal`,`vm`.`id_proses` AS `id_proses`,`vm`.`nama_proses` AS `nama_proses`,`vm`.`id_komposisi` AS `id_komposisi`,`vm`.`nama_komposisi` AS `nama_komposisi`,`vm`.`id_satuan` AS `id_satuan`,`vm`.`nama_satuan` AS `nama_satuan`,`vm`.`id_corak` AS `id_corak`,`vm`.`nama_corak` AS `nama_corak`,`vm`.`id_motif` AS `id_motif`,`vm`.`nama_motif` AS `nama_motif`,`vm`.`id_workorder` AS `id_workorder`,`vm`.`no_workorder` AS `no_workorder`,`vm`.`id_workorder_barang` AS `id_workorder_barang`,`vm`.`no_workorder_barang` AS `no_workorder_barang`,`vm`.`id_kualitas` AS `id_kualitas`,`vm`.`nama_kualitas` AS `nama_kualitas`,`vm`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vm`.`kualitas_dudul` AS `kualitas_dudul`,`vm`.`id_label` AS `id_label`,`vm`.`nama_label` AS `nama_label`,`vm`.`id_kemasan` AS `id_kemasan`,`vm`.`nama_kemasan` AS `nama_kemasan`,`vm`.`id_kemasansatuan` AS `id_kemasansatuan`,`vm`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vm`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vm`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vm`.`id_kemasanseratus` AS `id_kemasanseratus`,`vm`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vm`.`id_cap` AS `id_cap`,`vm`.`nama_cap` AS `nama_cap`,`vm`.`id_kualitas_proses` AS `id_kualitas_proses`,`vm`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vm`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vm`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vm`.`id_perubahansatuan` AS `id_perubahansatuan`,`vm`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vm`.`jumlah_rencana` AS `jumlah_rencana`,'' AS `ket_1`,'' AS `ket_2`,'Laporan Hasil' AS `ket_3`,`vm`.`nama_proses` AS `ket_4`,'' AS `ket_5`,`vm`.`nilai_awal` AS `nilai_awal`,`vm`.`nilai_akhir` AS `nilai_akhir`,`vm`.`id_detail` AS `id_detail`,(case when isnull(`mk`.`id_komposisi`) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when isnull(`mk`.`nama`) then '' else `mk`.`nama` end) AS `nama_warna`,(case when isnull(`mk`.`inisial`) then '' else `mk`.`inisial` end) AS `inisial_warna`,`pbb`.`keterangan` AS `ket_proses`,`vm`.`id_proses_sekarang` AS `id_proses_sekarang`,`vm`.`nama_proses_sekarang` AS `nama_proses_sekarang`,`vm`.`tanggal_full` AS `tanggal_full`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`id_pegawai` end) AS `id_pegawai`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`nama_pegawai` end) AS `nama_pegawai`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`id_rekanan` end) AS `id_rekanan`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`nama` end) AS `nama_rekanan` from ((((((`view_masukkemasan_all` `vm` left join `ms_warnakomposisi` `mk` on((`vm`.`id_komposisi` = `mk`.`id_komposisi`))) left join `pro_barangmasuk_kemasan_barang` `pbb` on((`vm`.`id_detail` = `pbb`.`id_barangmasuk_kb`))) join `pro_barangmasuk_kemasan` `pbk` on((`vm`.`id` = `pbk`.`id_barangmasuk_kemasan`))) join `pro_barangkeluar_kemasan` `pbkel` on((`pbk`.`id_barangkeluar_kemasan` = `pbkel`.`id_barangkeluar_kemasan`))) left join `ms_pegawai` `mpg` on((`pbkel`.`id_pegawai` = `mpg`.`id_pegawai`))) left join `ms_rekanan` `mpr` on((`pbkel`.`id_rekanan` = `mpr`.`id_rekanan`)));

-- membuang struktur untuk view si_sarung.v_produksi_sub
-- Menghapus tabel sementara dan menciptakan struktur VIEW terakhir
DROP TABLE IF EXISTS `v_produksi_sub`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v_produksi_sub` AS select `vp`.`id` AS `id`,`vp`.`id_barang` AS `id_barang`,`vp`.`kode_barang` AS `kode_barang`,`vp`.`nama_barang` AS `nama_barang`,(case when (isnull(`pbh`.`hasil`) or ((`pbh`.`hasil` <= 0) and (`pbh`.`id_satuanhasil` = 0))) then `vp`.`jumlah` else `pbh`.`hasil` end) AS `jumlah`,(case when (isnull(`pbh`.`hasil`) or ((`pbh`.`hasil` <= 0) and (`pbh`.`id_satuanhasil` = 0))) then `vp`.`masuk` else 0 end) AS `masuk`,(case when (isnull(`pbh`.`hasil`) or ((`pbh`.`hasil` <= 0) and (`pbh`.`id_satuanhasil` = 0))) then `vp`.`keluar` else `pbh`.`hasil` end) AS `keluar`,`vp`.`id_gudang` AS `id_gudang`,`vp`.`nama_gudang` AS `nama_gudang`,`vp`.`tanggal` AS `tanggal`,`vp`.`id_proses` AS `id_proses`,`vp`.`nama_proses` AS `nama_proses`,`vp`.`id_komposisi` AS `id_komposisi`,`vp`.`nama_komposisi` AS `nama_komposisi`,(case when ((`vp`.`id_proses_sekarang` = '33') and (`mps`.`id_perubahansatuan` is not null)) then `ms_rubah`.`id_satuan` when isnull(`ms`.`id_satuan`) then `vp`.`id_satuan` else `ms`.`id_satuan` end) AS `id_satuan`,(case when ((`vp`.`id_proses_sekarang` = '33') and (`mps`.`id_perubahansatuan` is not null)) then `ms_rubah`.`nama_satuan` when isnull(`ms`.`id_satuan`) then `vp`.`nama_satuan` else `ms`.`nama_satuan` end) AS `nama_satuan`,`vp`.`id_corak` AS `id_corak`,`vp`.`nama_corak` AS `nama_corak`,`vp`.`id_motif` AS `id_motif`,`vp`.`nama_motif` AS `nama_motif`,`vp`.`id_workorder` AS `id_workorder`,`vp`.`no_workorder` AS `no_workorder`,`vp`.`id_workorder_barang` AS `id_workorder_barang`,`vp`.`no_workorder_barang` AS `no_workorder_barang`,`vp`.`id_kualitas` AS `id_kualitas`,`vp`.`nama_kualitas` AS `nama_kualitas`,`vp`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vp`.`kualitas_dudul` AS `kualitas_dudul`,`vp`.`id_label` AS `id_label`,`vp`.`nama_label` AS `nama_label`,`vp`.`id_kemasan` AS `id_kemasan`,`vp`.`nama_kemasan` AS `nama_kemasan`,`vp`.`id_kemasansatuan` AS `id_kemasansatuan`,`vp`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vp`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vp`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vp`.`id_kemasanseratus` AS `id_kemasanseratus`,`vp`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vp`.`id_cap` AS `id_cap`,`vp`.`nama_cap` AS `nama_cap`,`vp`.`id_kualitas_proses` AS `id_kualitas_proses`,`vp`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vp`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vp`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,`vp`.`id_perubahansatuan` AS `id_perubahansatuan`,`vp`.`nama_perubahansatuan` AS `nama_perubahansatuan`,`vp`.`jumlah_rencana` AS `jumlah_rencana`,'' AS `ket_1`,'' AS `ket_2`,'Bon Bahan' AS `ket_3`,`mp`.`nama_proses` AS `ket_4`,'' AS `ket_5`,(case when ((`vp`.`id_proses_sekarang` = '33') and (`mps`.`id_perubahansatuan` is not null)) then `mps`.`jumlah_satuanawal` else 1 end) AS `nilai_awal`,(case when ((`vp`.`id_proses_sekarang` = '33') and (`mps`.`id_perubahansatuan` is not null)) then `mps`.`jumlah_satuanperubahan` else 1 end) AS `nilai_akhir`,`vp`.`id_detail` AS `id_detail`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`nama` end) AS `nama_warna`,(case when (isnull(`pbb`.`warna`) or (`pbb`.`warna` = 0)) then '' else `mk`.`inisial` end) AS `inisial_warna`,`pbb`.`keterangan` AS `ket_proses`,`vp`.`id_proses_sekarang` AS `id_proses_sekarang`,`vp`.`nama_proses_sekarang` AS `nama_proses_sekarang`,`vp`.`tanggal_full` AS `tanggal_full`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`id_pegawai` end) AS `id_pegawai`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`nama_pegawai` end) AS `nama_pegawai`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`id_rekanan` end) AS `id_rekanan`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`nama` end) AS `nama_rekanan`,(case when isnull(`mm`.`id_mesin`) then '' else `mm`.`id_mesin` end) AS `id_mesin`,(case when isnull(`mm`.`id_mesin`) then '' else `mm`.`nama` end) AS `nama_mesin` from (((((((((((`view_keluar_all` `vp` left join `pro_barangkeluar_barang` `pbb` on((`vp`.`id_detail` = `pbb`.`id`))) join `pro_barangkeluar` `pb` on((`pbb`.`id_barangkeluar` = `pb`.`id_barangkeluar`))) join `ms_proses` `mp` on((`pb`.`id_proses` = `mp`.`id_proses`))) left join `ms_warnakomposisi` `mk` on((`pbb`.`warna` = `mk`.`id_komposisi`))) left join `pro_barangkeluar_hasil` `pbh` on(((`vp`.`id` = `pbh`.`id_barangkeluar`) and (`vp`.`id_detail` = `pbh`.`id_barangkeluar_barang`)))) left join `ms_satuan` `ms` on((`ms`.`id_satuan` = `pbh`.`id_satuanhasil`))) left join `ms_perubahansatuan` `mps` on(((`mps`.`id_satuanawal` = `vp`.`id_satuan`) and (`vp`.`id_motif` = `mps`.`id_motif`) and (`vp`.`id_corak` = `mps`.`id_motif_barang`) and (`pb`.`id_lokasi` = `mps`.`id_lokasi`) and (`vp`.`id_proses_sekarang` = `mps`.`id_proses`)))) left join `ms_satuan` `ms_rubah` on((`ms_rubah`.`id_satuan` = `mps`.`id_satuanperubahan`))) left join `ms_pegawai` `mpg` on((`pb`.`id_pegawai` = `mpg`.`id_pegawai`))) left join `ms_rekanan` `mpr` on((`pb`.`id_rekanan` = `mpr`.`id_rekanan`))) left join `ms_mesin` `mm` on((`pb`.`id_mesin` = `mm`.`id_mesin`))) union all select `vm`.`id` AS `id`,`vm`.`id_barang` AS `id_barang`,`vm`.`kode_barang` AS `kode_barang`,`vm`.`nama_barang` AS `nama_barang`,`vm`.`jum_barang` AS `jumlah`,`vm`.`jum_barang` AS `masuk`,0 AS `keluar`,`vm`.`id_gudang` AS `id_gudang`,`vm`.`nama_gudang` AS `nama_gudang`,`vm`.`tanggal` AS `tanggal`,`vm`.`id_proses` AS `id_proses`,`vm`.`nama_proses` AS `nama_proses`,`vm`.`id_komposisi` AS `id_komposisi`,`vm`.`nama_komposisi` AS `nama_komposisi`,(case when ((`mps`.`id_perubahansatuan` is not null) and (`vm`.`id_proses` = '33')) then `mps`.`id_satuanperubahan` when isnull(`vm`.`id_satuan`) then '' else `vm`.`id_satuan` end) AS `id_satuan`,(case when ((`mps`.`id_perubahansatuan` is not null) and (`vm`.`id_proses` = '33')) then `ms_rubah`.`nama_satuan` when isnull(`vm`.`id_satuan`) then '' else `vm`.`nama_satuan` end) AS `nama_satuan`,`vm`.`id_corak` AS `id_corak`,`vm`.`nama_corak` AS `nama_corak`,`vm`.`id_motif` AS `id_motif`,`vm`.`nama_motif` AS `nama_motif`,`vm`.`id_workorder` AS `id_workorder`,`vm`.`no_workorder` AS `no_workorder`,`vm`.`id_workorder_barang` AS `id_workorder_barang`,`vm`.`no_workorder_barang` AS `no_workorder_barang`,`vm`.`id_kualitas` AS `id_kualitas`,`vm`.`nama_kualitas` AS `nama_kualitas`,`vm`.`id_kualitas_dudul` AS `id_kualitas_dudul`,`vm`.`kualitas_dudul` AS `kualitas_dudul`,`vm`.`id_label` AS `id_label`,`vm`.`nama_label` AS `nama_label`,`vm`.`id_kemasan` AS `id_kemasan`,`vm`.`nama_kemasan` AS `nama_kemasan`,`vm`.`id_kemasansatuan` AS `id_kemasansatuan`,`vm`.`nama_kemasansatuan` AS `nama_kemasansatuan`,`vm`.`id_kemasansepuluh` AS `id_kemasansepuluh`,`vm`.`nama_kemasansepuluh` AS `nama_kemasansepuluh`,`vm`.`id_kemasanseratus` AS `id_kemasanseratus`,`vm`.`nama_kemasanseratus` AS `nama_kemasanseratus`,`vm`.`id_cap` AS `id_cap`,`vm`.`nama_cap` AS `nama_cap`,`vm`.`id_kualitas_proses` AS `id_kualitas_proses`,`vm`.`nama_kualitas_proses` AS `nama_kualitas_proses`,`vm`.`id_kualitas_periksa` AS `id_kualitas_periksa`,`vm`.`nama_kualitas_periksa` AS `nama_kualitas_periksa`,(case when (`vm`.`id_proses` = '33') then '' when isnull(`vm`.`id_perubahansatuan`) then '' else `vm`.`id_perubahansatuan` end) AS `id_perubahansatuan`,(case when (`vm`.`id_proses` = '33') then '' when isnull(`vm`.`id_perubahansatuan`) then '' else `vm`.`nama_perubahansatuan` end) AS `nama_perubahansatuan`,(case when (`vm`.`id_proses` = '33') then '' when (isnull(`vm`.`jumlah_rencana`) or (`vm`.`jumlah_rencana` = 0)) then '' else `vm`.`jumlah_rencana` end) AS `jumlah_rencana`,'' AS `ket_1`,'' AS `ket_2`,'Laporan Hasil' AS `ket_3`,`vm`.`nama_proses` AS `ket_4`,'' AS `ket_5`,(case when ((`vm`.`id_proses_sekarang` = '33') and (`mps`.`id_perubahansatuan` is not null)) then `mps`.`jumlah_satuanawal` else 1 end) AS `nilai_awal`,(case when ((`vm`.`id_proses_sekarang` = '33') and (`mps`.`id_perubahansatuan` is not null)) then `mps`.`jumlah_satuanperubahan` else 1 end) AS `nilai_akhir`,`vm`.`id_detail` AS `id_detail`,(case when isnull(`mk`.`id_komposisi`) then '' else `mk`.`id_komposisi` end) AS `id_warna`,(case when isnull(`mk`.`nama`) then '' else `mk`.`nama` end) AS `nama_warna`,(case when isnull(`mk`.`inisial`) then '' else `mk`.`inisial` end) AS `inisial_warna`,`pbb`.`keterangan` AS `ket_proses`,`vm`.`id_proses_sekarang` AS `id_proses_sekarang`,`vm`.`nama_proses_sekarang` AS `nama_proses_sekarang`,`vm`.`tanggal_full` AS `tanggal_full`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`id_pegawai` end) AS `id_pegawai`,(case when isnull(`mpg`.`id_pegawai`) then '' else `mpg`.`nama_pegawai` end) AS `nama_pegawai`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`id_rekanan` end) AS `id_rekanan`,(case when isnull(`mpr`.`id_rekanan`) then '' else `mpr`.`nama` end) AS `nama_rekanan`,(case when isnull(`mm`.`id_mesin`) then '' else `mm`.`id_mesin` end) AS `id_mesin`,(case when isnull(`mm`.`id_mesin`) then '' else `mm`.`nama` end) AS `nama_mesin` from (((((((((`view_masuk_all` `vm` left join `ms_warnakomposisi` `mk` on((`vm`.`id_komposisi` = `mk`.`id_komposisi`))) left join `pro_barangmasuk_barang` `pbb` on((`vm`.`id_detail` = `pbb`.`id`))) join `pro_barangmasuk` `pm` on((`pbb`.`id_barangmasuk` = `pm`.`id_barangmasuk`))) join `pro_barangkeluar` `pb` on((`pm`.`id_barangkeluar` = `pb`.`id_barangkeluar`))) left join `ms_perubahansatuan` `mps` on(((`mps`.`id_proses` = `vm`.`id_proses_sekarang`) and (`vm`.`id_motif` = `mps`.`id_motif`) and (`vm`.`id_corak` = `mps`.`id_motif_barang`) and (`pb`.`id_lokasi` = `mps`.`id_lokasi`) and (`vm`.`id_proses_sekarang` = `mps`.`id_proses`)))) left join `ms_satuan` `ms_rubah` on((`ms_rubah`.`id_satuan` = `mps`.`id_satuanperubahan`))) left join `ms_pegawai` `mpg` on((`pb`.`id_pegawai` = `mpg`.`id_pegawai`))) left join `ms_rekanan` `mpr` on((`pb`.`id_rekanan` = `mpr`.`id_rekanan`))) left join `ms_mesin` `mm` on((`pb`.`id_mesin` = `mm`.`id_mesin`)));

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
