@extends('layouts.store') @section('body')
@include("partials.store.profile-menu")
@foreach ($orders->sortDesc() as $order) @if (isset(json_decode($order->attributes)->user->fname))
Print Order : {{ $order->code }} Order Date: {{ $order->created_at }}
Delivery to

{{ json_decode($order->attributes)->user->fname }} {{ json_decode($order->attributes)->user->lname }}
Phone: {{ json_decode($order->attributes)->user->phone }} Email: {{ json_decode($order->attributes)->user->email }}
Location: {{ json_decode($order->attributes)->user->address }}
{{ json_decode($order->attributes)->user->city }} {{-- {{ json_decode($order->attributes)->user->country }} --}}

Payment
@if (json_decode($order->attributes)->payment->va_number) {{ json_decode($order->attributes)->payment->va_number }} ({{ json_decode($order->attributes)->user->channel }}) @elseif (json_decode($order->attributes)->payment->url) @else @endif

{{-- Subtotal: $356
Shipping fee: $56
--}} Total: Rp {{ number_format(json_decode($order->attributes)->payment->amount) }}
Open

@foreach ($order->products as $product) @endforeach

{{ $product->name }}

Rp {{ number_format($product->price_range) }}
@endif @endforeach
@endsection