@extends('layouts.layouts_dashboard') @section('title', 'Detail Bahan') @section('content')

Detail Bahan

{{ $bahan->nama_bahan }}
{{ $bahan->satuan }}
Rp {{ number_format($bahan->hpp, 0, ',', '.') }}
@if($bahan->stok == 0) Habis @elseif($bahan->stok < 10) Rendah ({{ $bahan->stok }}) @else {{ $bahan->stok }} @endif
@if($bahan->vendor)
{{ $bahan->vendor->name }}
@endif
@if($bahan->wholesalePrices && $bahan->wholesalePrices->count() > 0)

Harga Grosir

@foreach($bahan->wholesalePrices()->orderBy('min_quantity', 'asc')->get() as $price) @endforeach
Min Quantity Max Quantity Harga
{{ $price->min_quantity }} {{ $price->max_quantity ?? 'Unlimited' }} Rp {{ number_format($price->harga, 0, ',', '.') }}
@else

Tidak ada harga grosir untuk bahan ini

Harga bahan akan menggunakan HPP standar untuk semua kuantitas.
@endif
@endsection