{{-- ===================================================== Etebarit - by Gisoo Web Solutions ------------------------------------------------------ Gisoo.net ------------------------------------------------------ Copyright (c) 2026 Gisoo Web Solutions ===================================================== This code is protected by copyright ===================================================== File: order-detail.blade.php ------------------------------------------------------ Use: A single order for the merchant: the buyer, the money split, the timeline and every transaction the order was settled with. Merchant-only figures (fee/share) shown to the shop owner, never to a regular user. ===================================================== --}} @extends('layouts.merchant') @section('title', __('front.shop.order_detail.title', ['code' => $order->code])) @php use App\Support\Format; $paid = $order->status === \App\Models\Order::STATUS_PAID; @endphp @section('breadcrumb') @endsection @section('page')

{{ $order->code }}

$paid, 'bg-[#fff5e6] text-amber-600' => $order->status === \App\Models\Order::STATUS_PENDING, 'bg-secondary-50 text-secondary-500' => in_array($order->status, [\App\Models\Order::STATUS_FAILED, \App\Models\Order::STATUS_EXPIRED], true), ])>{{ __('front.shop.sales.statuses.'.$order->status) }}

{{ __('front.shop.order_detail.subtitle') }}

{{ __('front.shop.order_detail.all_transactions') }}
{{-- Buyer --}}

{{ __('front.shop.order_detail.buyer') }}

@if ($order->user)
{{ mb_substr($order->user->first_name, 0, 1).'.'.mb_substr($order->user->last_name, 0, 1) }}
{{ $order->user->fullName() }}
@fa($order->user->mobile)
@else

{{ __('front.shop.order_detail.no_buyer') }}

@endif
{{-- Money + timeline --}}

{{ __('front.shop.order_detail.summary') }}

@if ($order->isLinkPayment()) {{-- The buyer's note (link payments only), before the total. --}}
{{ __('front.shop.order_detail.description') }} {{ $order->description ?: __('front.shop.order_detail.no_description') }}
{{ __('front.shop.order_detail.amount') }}@toman($order->amount) {{ __('front.shop.txns.toman') }}
@else
{{ __('front.shop.order_detail.amount') }}@toman($order->amount) {{ __('front.shop.txns.toman') }}
@endif
{{ __('front.shop.order_detail.share') }}@if ($paid)@toman((int) $order->shop_share) {{ __('front.shop.txns.toman') }}@else@endif
{{ __('front.shop.order_detail.fee') }}@if ($paid)@toman((int) $order->merchant_fee) {{ __('front.shop.txns.toman') }}@else@endif
{{ __('front.shop.order_detail.reference') }} @if ($order->reference_id) @fa($order->reference_id) @else {{ __('front.shop.order_detail.reference_pending') }} @endif
{{ __('front.shop.order_detail.merchant_order_id') }} @if ($order->isLinkPayment()) {{ $order->merchantReference() }} @else {{ $order->merchant_order_id ? Format::persianDigits($order->merchant_order_id) : '—' }} @endif
{{ __('front.shop.order_detail.created') }}@jalaliDateTime($order->created_at)
@if ($order->paid_at)
{{ __('front.shop.order_detail.paid_at') }}@jalaliDateTime($order->paid_at)
@endif
{{-- Transactions of this order --}}

{{ __('front.shop.order_detail.transactions') }}

@if ($transactions->isEmpty())
{{ __('front.shop.order_detail.no_transactions') }}
@else
@foreach ($transactions as $transaction) @php $incoming = $transaction->isIncoming(); @endphp @endforeach
{{ __('front.shop.txns.code') }} {{ __('front.shop.txns.type') }} {{ __('front.shop.txns.reference') }} {{ __('front.shop.txns.amount') }} {{ __('front.shop.txns.time') }} {{ __('front.shop.txns.status') }}
@fa($transaction->code) {{ $transaction->external_reference ? Format::persianDigits($transaction->external_reference) : '—' }} $incoming && $transaction->isSuccessful(), 'text-secondary-500' => ! $incoming && $transaction->isSuccessful(), 'text-ink-faint' => ! $transaction->isSuccessful(), ]) dir="ltr">{{ $incoming ? '+' : '−' }}@toman($transaction->amount) {{ __('front.shop.txns.toman') }} @jalaliDateTime($transaction->created_at)
@endif
@endsection