@extends('layouts.app') @section('title', 'Barang - MCU Klinik Mustika') @section('breadcrumb')

Barang

@endsection @section('content')
Tambah Barang
@include('partials.tables.filters', [ 'paginator' => $drugs, 'tableFilters' => ['sort', 'direction', 'date_from', 'date_to', 'status', 'flow_type'] ]) @forelse ($drugs as $drug) @empty @endforelse
No. @include('partials.tables.sort_link', ['column' => 'sku', 'label' => 'Kode Barang']) @include('partials.tables.sort_link', ['column' => 'name', 'label' => 'Nama Barang']) Kategori Pabrik Satuan / Harga Jual @include('partials.tables.sort_link', ['column' => 'last_purchase_price', 'label' => 'Harga Beli Terakhir']) @include('partials.tables.sort_link', ['column' => 'min_stock', 'label' => 'Stok Minimum']) Status Aksi
{{ $drugs->firstItem() + $loop->index }} {{ $drug->sku ?: ($drug->barcode ?: '-') }}
{{ $drug->name }}
{{ $drug->generic_name ?: '-' }}
{{ $drug->category->name }} {{ $drug->manufacturer?->name ?? '-' }} @forelse ($drug->locationPrices->unique(fn($price) => $price->location_id . ':' . $price->drug_unit_id) as $price)
{{ $price->unit->abbreviation ?: $price->unit->name }} Rp {{ number_format((float) $price->unit_price, 0, ',', '.') }}
@empty
{{ $drug->unit->abbreviation ?: $drug->unit->name }} Rp {{ number_format((float) $drug->selling_price, 0, ',', '.') }}
@endforelse
@if ($drug->last_purchase_price !== null)
Rp {{ number_format((float) $drug->last_purchase_price, 0, ',', '.') }}
{{ $drug->last_purchase_received_at?->format('d/m/Y H:i') }}
@else - @endif
{{ $drug->min_stock }} {{ $drug->is_active ? 'Aktif' : 'Tidak Aktif' }}
@csrf @method ('DELETE')
Tidak ada data yang cocok dengan pencarian.
{{ $drugs->links('partials.tables.pagination') }}
@include('pharmacy.partials.delete-confirmation') @endsection