diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php index 1d6c8b99..1db630a1 100644 --- a/app/Helpers/Helper.php +++ b/app/Helpers/Helper.php @@ -273,10 +273,10 @@ public static function nomor($tanggal, $jenis_naskah_id, $unit_kerja_id = null, { $replaces = []; $tahun = self::getYearFromDate($tanggal); - $replaces[''] = $tahun; + $replaces[''] = $tahun; $jenis_naskah = JenisNaskah::cache()->get('all')->where('id', $jenis_naskah_id)->first(); $kode_naskah = KodeNaskah::cache()->get('all')->where('id', $jenis_naskah->kode_naskah_id)->first(); - if ($unit_kerja_id !== null) { + if ($unit_kerja_id !== null) { $unit_kerja = UnitKerja::cache()->get('all')->where('id', $unit_kerja_id)->first(); $replaces[''] = $unit_kerja->kode; } @@ -300,14 +300,14 @@ public static function nomor($tanggal, $jenis_naskah_id, $unit_kerja_id = null, $segmen = NaskahKeluar::where('tahun', $tahun)->where('kode_naskah_id', $kode_naskah->id)->where('no_urut', $no_urut)->max('segmen') + 1; $replaces[''] = $no_urut.'.'.$segmen; } - $format = $jenis_naskah->format ?? $kode_naskah->format; + $format = $jenis_naskah->format ?? $kode_naskah->format; $nomor = strtr($format, $replaces); return [ 'nomor' => $nomor, 'no_urut' => $no_urut, 'segmen' => $segmen, - 'kode_naskah_id' => $kode_naskah->id + 'kode_naskah_id' => $kode_naskah->id, ]; } diff --git a/database/migrations/2024_09_14_155302_create_derajat_surats_table.php b/database/migrations/2024_09_14_155302_create_derajat_surats_table.php index a7883794..56882ae6 100644 --- a/database/migrations/2024_09_14_155302_create_derajat_surats_table.php +++ b/database/migrations/2024_09_14_155302_create_derajat_surats_table.php @@ -13,8 +13,8 @@ public function up(): void { Schema::create('derajat_surats', function (Blueprint $table) { $table->id(); - $table->string('kode',10)->nullable(); - $table->string('derajat',20)->nullable(); + $table->string('kode', 10)->nullable(); + $table->string('derajat', 20)->nullable(); $table->timestamps(); }); }