{{-- ===================================================== Etebarit - by Gisoo Web Solutions ------------------------------------------------------ Gisoo.net ------------------------------------------------------ Copyright (c) 2026 Gisoo Web Solutions ===================================================== This code is protected by copyright ===================================================== File: sales.blade.php ------------------------------------------------------ Use: The merchant's sale transactions: every ledger transaction tied to this shop's orders, each naming its order, method/type and reference. Optionally scoped to a single order. ===================================================== --}} @extends('layouts.merchant') @section('title', __('front.shop.txns.title')) @php use App\Support\Format; @endphp @section('breadcrumb') @endsection @section('page')

{{ __('front.shop.txns.title') }}

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

{{-- When scoped to a single order, a clearly-labelled banner + a way out. --}} @if ($scopedOrder)
{{ __('front.shop.txns.scoped') }} {{ $scopedOrder->code }}
{{ __('front.shop.txns.clear_scope') }}
@endif
{{-- Status filter + search --}}
@foreach (__('front.shop.txns.filters') as $key => $label) $status === $key, 'text-ink-muted hover:text-secondary-500' => $status !== $key, ])>{{ $label }} @endforeach
@if ($status !== 'all')@endif @if ($scopedOrder)@endif
@if ($transactions->isEmpty())
{{ $search !== '' || $status !== 'all' ? __('front.shop.txns.empty_search') : __('front.shop.txns.empty') }}
@else
@foreach ($transactions as $transaction) @php $incoming = $transaction->isIncoming(); @endphp @endforeach
{{ __('front.shop.txns.code') }} {{ __('front.shop.txns.order') }} {{ __('front.shop.txns.type') }} {{ __('front.shop.txns.reference') }} {{ __('front.shop.txns.amount') }} {{ __('front.shop.txns.time') }} {{ __('front.shop.txns.status') }}
@fa($transaction->code) @if ($transaction->order) {{ $transaction->order->code }} @else @endif {{ $transaction->external_reference ? Format::persianDigits($transaction->external_reference) : '—' }} $incoming && $transaction->isSuccessful(), 'text-secondary-500' => ! $incoming && $transaction->isSuccessful(), 'text-ink-faint' => ! $transaction->isSuccessful(), ])>{{ $incoming ? '+' : '−' }}@toman($transaction->amount) {{ __('front.shop.txns.toman') }} @jalaliDateTime($transaction->created_at)
{{ __('front.shop.txns.summary', [ 'from' => Format::persianDigits((string) $transactions->firstItem()), 'to' => Format::persianDigits((string) $transactions->lastItem()), 'total' => Format::persianDigits((string) $transactions->total()), ]) }}
{{ $transactions->links() }}
@endif
@endsection