diff --git a/app/Http/Controllers/M_assetController.php b/app/Http/Controllers/M_assetController.php index 2f35a23..401c2a1 100644 --- a/app/Http/Controllers/M_assetController.php +++ b/app/Http/Controllers/M_assetController.php @@ -64,7 +64,7 @@ class M_assetController extends Controller // Mendapatkan produk terbaru $latestAsset = \App\Models\m_asset::latest()->first(); // Mendapatkan tahun saat ini - $currentYear = date("Y"); + $currentYear = date("Y-m-d"); // Menghitung nomor urut untuk kode barang if ($latestAsset == null) { // Kode pertama @@ -75,7 +75,7 @@ class M_assetController extends Controller $nomorUrut = intval($lastCode) + 1; } // Menggabungkan semua komponen kode barang - $seri = 'AST' . $currentYear . str_pad($nomorUrut, STR_PAD_LEFT); + $seri = 'AST' . $currentYear .'-'. str_pad($nomorUrut, STR_PAD_LEFT); // Validasi input $request->validate([ 'name' => 'required', diff --git a/resources/views/addons/SettingPlatform/manajement_asset.blade.php b/resources/views/addons/SettingPlatform/manajement_asset.blade.php index 63366c4..5c6f491 100644 --- a/resources/views/addons/SettingPlatform/manajement_asset.blade.php +++ b/resources/views/addons/SettingPlatform/manajement_asset.blade.php @@ -51,11 +51,11 @@