update
This commit is contained in:
@@ -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'],
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<label>Penerima</label>
|
||||
<select class="form-control" wire:model.live="penerimaId">
|
||||
@foreach($users as $u)
|
||||
<option value="{{ $u->id }}">{{ $u->nama }}</option>
|
||||
<option value="{{ $u->nama }}">{{ $u->nama }}</option>
|
||||
@endforeach
|
||||
@foreach($ruangans as $ruang)
|
||||
<option value="{{ $ruang->ruangan }}">{{ $ruang->ruangan }}</option>
|
||||
|
||||
Reference in New Issue
Block a user