From 35d8211a65ce9da0e8d4f9085e77c10ed384865f Mon Sep 17 00:00:00 2001 From: Dwi Swandhana Date: Thu, 7 May 2026 19:29:23 +0700 Subject: [PATCH] update --- htdocs/app/Livewire/GudangPos.php | 11 ++++------- htdocs/resources/views/livewire/gudang-pos.blade.php | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/htdocs/app/Livewire/GudangPos.php b/htdocs/app/Livewire/GudangPos.php index 094315b4..4632d079 100644 --- a/htdocs/app/Livewire/GudangPos.php +++ b/htdocs/app/Livewire/GudangPos.php @@ -18,7 +18,7 @@ class GudangPos extends Component use WithPagination; public string $tanggal = ''; - public ?int $penerimaId = null; + public ?string $penerimaId = null; public string $scan = ''; public string $selectedKode = ''; @@ -36,7 +36,7 @@ class GudangPos extends Component public function mount(): void { $this->tanggal = date('Y-m-d'); - $this->penerimaId = User::orderBy('nama', 'ASC')->value('id'); + $this->penerimaId = User::orderBy('nama', 'ASC')->value('nama'); } public function updatingSearch(): void @@ -201,10 +201,7 @@ class GudangPos extends Component return; } - $penerima = User::select('id', 'nama')->find($this->penerimaId); - if (!$penerima) { - $penerima = $penerimaId; - } + $penerima = $this->penerimaId; $service = app(SimbhpStockService::class); @@ -264,7 +261,7 @@ class GudangPos extends Component 'tanggal' => (int) $date->format('d'), 'bulan' => (int) $date->format('m'), 'tahun' => (int) $date->format('Y'), - 'deskripsi' => 'Diterima oleh ' . ($penerima->nama ?? $penerimaId), + 'deskripsi' => 'Diterima oleh ' . ($penerima ?? $penerimaId), 'pemasukan' => null, 'pengeluaran' => (int) $row['qty'], 'qty_base' => (int) $row['qty_base'], diff --git a/htdocs/resources/views/livewire/gudang-pos.blade.php b/htdocs/resources/views/livewire/gudang-pos.blade.php index e42db3d2..50e68499 100644 --- a/htdocs/resources/views/livewire/gudang-pos.blade.php +++ b/htdocs/resources/views/livewire/gudang-pos.blade.php @@ -88,7 +88,7 @@