@php use App\Models\ParameterDetail; use App\Models\Inventory; @endphp @extends('layouts.backend.index') @section('title', $label) @section('content')
@php $old = old('items', []); $old_item = json_decode($purchase->items, true); $total = 0; @endphp @foreach ($old_item as $index => $i) @php $inventory = Inventory::select('id', 'id_item') ->with([ 'item' => function($query) { $query->select('id', 'id_category', 'name', 'uom') ->with([ 'uomData' => function ($query) { $query->select('id', 'name'); }, 'category' => function ($query) { $query->select('id', 'name'); }, ]); } ]) ->whereId($i['id']) ->withTrashed() ->first(); $price = $i['price']; $qty = $i['qty']; $total_item = $price * $qty; $total += $total_item; @endphp @endforeach
Nama Item Jenis Jumlah Harga Satuan Total

Sub Total : Rp {{ number_format($purchase->subtotal, 0, '', '.') }}
PPN ({{$purchase->ppn_percent}}%) : Rp {{ number_format($purchase->ppn, 0, '', '.') }}

Total : Rp {{ number_format($purchase->total, 0, '', '.') }}
@isset($purchase->payment_date)
@endisset @isset($purchase->payment_cash)
@endisset @isset($purchase->payment_account)
@endisset
@isset($purchase->payment_bank_number)
@endisset @isset($purchase->payment_receiver)
@endisset @isset($purchase->payment_amount)
@endisset
@endsection @push('styles') @endpush @push('scripts') @endpush