{{-- ===================================================== 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 admin wallets overview: every wallet with its owner, cash and installment-credit balances. Each row opens that owner's transactions. ===================================================== --}} @extends('layouts.admin') @section('title', __('admin.wallets.title')) @section('breadcrumb') @endsection @php use App\Models\WalletEntry; @endphp @section('page')

{{ __('admin.wallets.title') }}

{{ __('admin.wallets.subtitle') }}

{{ __('admin.wallets.info') }} {{-- Filters --}}
@forelse ($wallets as $wallet) @php $b = $balances[$wallet->id] ?? []; $pending = null; if ($wallet->is_central) { $kind = 'central'; $owner = __('admin.wallets.central_owner'); $link = route('admin.central.index'); $primary = $centralNet; } elseif ($wallet->shop_id) { $kind = 'shop'; $owner = $wallet->shop?->name ?? '—'; $link = route('admin.transactions.index', ['shop' => $wallet->shop_id]); $primary = (int) ($b[WalletEntry::BUCKET_MAIN] ?? 0); $pending = (int) ($pendingSettlements[$wallet->shop_id] ?? 0); } else { $kind = 'user'; $owner = $wallet->user?->fullName() ?? '—'; $link = route('admin.transactions.index', ['user' => $wallet->user_id]); $primary = (int) ($b[WalletEntry::BUCKET_CASH] ?? 0); } $credit = $kind === 'user' ? (int) ($b[WalletEntry::BUCKET_INSTALLMENT] ?? 0) : null; $chip = ['user' => 'bg-[#efeafb] text-primary-600', 'shop' => 'bg-secondary-50 text-secondary-500', 'central' => 'bg-[#e7f7ee] text-green-600'][$kind]; @endphp @empty @endforelse
{{ __('admin.wallets.id') }} {{ __('admin.wallets.type') }} {{ __('admin.wallets.owner') }} {{ __('admin.wallets.cash') }} {{ __('admin.wallets.credit') }} {{ __('admin.wallets.pending_settlement') }}
#@fa($wallet->id) {{ __('admin.wallets.types.'.$kind) }} {{ $owner }} $kind === 'central' && $primary < 0])>@toman($primary)@if ($kind === 'central')({{ __('admin.wallets.net') }})@endif @if ($credit !== null)@toman($credit)@else @endif @if ($pending)@toman($pending)@else @endif {{ __('admin.wallets.view_tx') }}
{{ __('admin.wallets.empty') }}
@if ($wallets->hasPages())
{{ $wallets->links() }}
@endif @endsection