@extends('layouts.main') @section('title', 'Detail Penjualan') @section('content')
Detail Penjualan
#{{ $checkout->id }}
Tanggal Pemesanan {{ \Carbon\Carbon::parse($checkout->tanggal_pemesanan)->format('d-m-Y') }}
User {{ $checkout->user->name }}
Alamat {{ $checkout->alamat_pengiriman }}
Metode Pembayaran {{ ucfirst($checkout->metode_pembayaran) }}
Metode Pengiriman @if($checkout->metode_pengiriman == 'delivery') Delivery Toko @else Ambil di Toko @endif
Total Rp {{ number_format($checkout->total_harga, 0, ',', '.') }}
Detail Produk
@php $details = $checkout->produk_details; $subtotal = 0; @endphp @foreach ($details as $index => $detail) @php $totalItem = $detail['jumlah'] * $detail['harga']; $subtotal += $totalItem; @endphp @endforeach
No Produk Qty Harga Total
{{ $index + 1 }} {{ $detail['nama'] }} {{ $detail['jumlah'] }} Rp {{ number_format($detail['harga'], 0, ',', '.') }} Rp {{ number_format($totalItem, 0, ',', '.') }}
Total Rp {{ number_format($subtotal, 0, ',', '.') }}
@endsection