{{-- ===================================================== Etebarit - by Gisoo Web Solutions ------------------------------------------------------ Gisoo.net ------------------------------------------------------ Copyright (c) 2026 Gisoo Web Solutions ===================================================== This code is protected by copyright ===================================================== File: index.blade.php ------------------------------------------------------ Use: The buyer's gateway orders. An order shows its id, its shop and the transactions that paid it - never what was bought. ===================================================== --}} @extends('layouts.user') @section('title', __('front.orders.title')) @section('breadcrumb') @endsection @section('page')

{{ __('front.orders.title') }}

{{ __('front.orders.subtitle') }}

@foreach (__('front.orders.filters') as $key => $label) $status === $key, 'text-ink-muted hover:text-primary-600' => $status !== $key, ])>{{ $label }} @endforeach
@if ($status !== 'all') @endif
@forelse ($orders as $order) @php $parts = $order->transactions ->where('shop_id', '!=', null) ->where('user_id', '!=', null) ->map(fn ($transaction) => [ 'label' => $transaction->primaryEntry()?->reasonLabel('front.credit.reasons') ?? __('front.credit.reasons.other'), 'code' => \App\Support\Format::persianDigits($transaction->code), 'amount' => ($transaction->isIncoming() ? '+' : '−').\App\Support\Format::tomanFa($transaction->amount), 'incoming' => $transaction->isIncoming(), ])->values(); $payload = [ 'title' => $order->code, 'shop' => $order->shop->name, 'merchantOrder' => $order->isLinkPayment() ? $order->merchantReference() : ($order->merchant_order_id ?: null), 'merchantOrderLtr' => ! $order->isLinkPayment(), 'description' => $order->isLinkPayment() ? ($order->description ?: __('front.orders.no_description')) : null, 'amount' => \App\Support\Format::tomanFa($order->amount), 'date' => \App\Support\Format::jalaliDateTimeFa($order->paid_at ?? $order->created_at), 'status' => __("front.orders.statuses.{$order->status}"), 'successful' => $order->isPaid(), 'parts' => $parts, ]; @endphp @empty @endforelse
{{ __('front.orders.columns.code') }} {{ __('front.orders.columns.shop') }} {{ __('front.orders.columns.amount') }} {{ __('front.orders.columns.method') }} {{ __('front.orders.columns.date') }} {{ __('front.orders.columns.status') }} {{ __('front.orders.columns.details') }}
{{ $order->code }} {{ $order->shop->name }} @toman($order->amount) {{ __('front.orders.toman') }} {{ $parts->isEmpty() ? __('front.orders.transaction_count_none') : __('front.orders.transaction_count', ['count' => \App\Support\Format::persianDigits((string) $parts->count())]) }} @jalaliDateTime($order->created_at) $order->isPaid(), 'bg-[#fff5e6] text-amber-600' => $order->isPending(), 'bg-secondary-50 text-secondary-500' => ! $order->isPaid() && ! $order->isPending(), ])>{{ __("front.orders.statuses.{$order->status}") }} {{ __('front.orders.details') }}
{{ __('front.orders.empty') }}
@if ($orders->hasPages())
{{ $orders->links() }}
@endif {{-- ===== Order detail ===== --}}
@endsection