@extends('layouts.backend.index') @section('title', $label) @section('content')
@csrf
@php $old = old('items', []); $total = 0; $subtotal = 0; $ppn = 0; @endphp @if (empty($old)) @else @foreach ($old['id'] as $index => $i) @php $qty = empty($old['qty'][$index]) ? 0 : str_replace('.', '', $old['qty'][$index]); $price = empty($old['price'][$index]) ? 0 : str_replace('.', '', $old['price'][$index]); $total_item = $qty * $price; $subtotal += $total_item; @endphp @endforeach @endif
Nama Item Kategori Jumlah Harga Satuan Total #
@if ($index > 0) @endif
ADD

Sub Total : Rp {{ number_format($subtotal, 0, '', '.') }}
PPN : Rp {{ number_format($ppn, 0, '', '.') }}

Total : Rp {{ number_format($total, 0, '', '.') }}
@endsection @push('styles') @endpush @push('scripts') @endpush