@extends('layouts.app') @section('title','Detail Pembelian') @section('page-title','Detail Pembelian') @section('content')
{{-- Header --}}

{{ $purchase->purchase_number }}

{{ $purchase->date->format('d F Y') }} — {{ $purchase->supplier?->name }}

@php $sc=['draft'=>'yellow','diterima'=>'green','dibatalkan'=>'red'][$purchase->status]??'gray' @endphp {{ $purchase->status_label }}
@if($purchase->status === 'draft')
@csrf
@csrf
@endif
{{-- Items --}}

Item Pembelian

@foreach($purchase->items as $item) @endforeach @if($purchase->discount > 0)@endif @if($purchase->tax > 0)@endif
Produk Qty Harga Beli Subtotal
{{ $item->product?->name }} {{ $item->quantity }} {{ $item->product?->unit }} Rp {{ number_format($item->unit_price,0,',','.') }} Rp {{ number_format($item->subtotal,0,',','.') }}
SubtotalRp {{ number_format($purchase->subtotal,0,',','.') }}
Diskon- Rp {{ number_format($purchase->discount,0,',','.') }}
PajakRp {{ number_format($purchase->tax,0,',','.') }}
TotalRp {{ number_format($purchase->total,0,',','.') }}
← Kembali
@endsection