@extends('layouts.app') @section('title', 'Yetkazib beruvchi tafsilotlari') @section('content')
Yetkazib beruvchi tafsilotlari
@if (auth()->user()->isAdmin() || auth()->user()->id == $supplier->user_id) Tahrirlash @endif
@if (session('success')) @endif @if (session('error')) @endif

Nomi: {{ $supplier->name }}

Telefon: @if ($supplier->phone) {{ $supplier->phone }} @else N/A @endif

Qarz holati: @if ($supplier->debt_balance == 0) Qarz yo‘q @elseif ($supplier->debt_balance > 0) {{ number_format($supplier->debt_balance, 2, '.', ' ') }} so‘m @else {{ number_format(abs($supplier->debt_balance), 2, '.', ' ') }} so‘m @endif

Biriktirilgan: {{ $supplier->user->name ?? 'N/A' }}

Yaratilgan sana: {{ $supplier->created_at->format('d.m.Y H:i') }}

Yangilangan sana: {{ $supplier->updated_at->format('d.m.Y H:i') }}

@if ($operations->isNotEmpty())
Amaliyotlar tarixi
@foreach ($operations as $operation)
Icon
@if ($operation->source_table == 'transactions') {{ $operation->type == 'product_return' ? 'Mahsulot qaytarish' : 'Xarajat' }} @else {{ $operation->type == 'payment_to_supplier' ? 'Yetkazib beruvchiga to‘lov' : 'Mahsulot kirimi' }} @endif @if ($operation->source_table == 'payments' && $operation->is_cancelled) Bekor qilindi @endif
{{ number_format(abs($operation->amount), 2, '.', ' ') }} so‘m
{{ $operation->created_at->format('d.m.Y H:i') }} @if ($operation->user) | {{ $operation->user->name }} @endif
@if (!empty($images) && is_array($images)) @foreach ($images as $index => $image) @endforeach @endif @endforeach
{{ $operations->links('pagination::bootstrap-5') }}
@else
Hozircha amaliyotlar yo‘q
@endif Orqaga
@endsection