@extends('layouts.admin-simple') @section('title', $supplier->name) @section('breadcrumb') @endsection @section('page-title')

{{ $supplier->name }}

{{ $supplier->supplier_code }} • Supplier Details and Performance

@can('warehouse.suppliers.edit')
arrow_back Back
@endcan
@endsection @section('content')
business Supplier Information
@php $statusColors = [ 'active' => 'success', 'inactive' => 'secondary', 'suspended' => 'danger' ]; $statusColor = $statusColors[$supplier->status] ?? 'secondary'; @endphp {{ ucfirst($supplier->status) }} {{ $supplier->supplier_code }}
Contact Information
Contact Person:
{{ $supplier->contact_person ?: '-' }}
Email:
@if($supplier->email) {{ $supplier->email }} @else - @endif
Phone:
{{ $supplier->phone ?: '-' }}
Mobile:
{{ $supplier->mobile ?: '-' }}
@if($supplier->website)
Website:
{{ $supplier->website }}
@endif
Address

{{ $supplier->full_address ?: 'No address provided' }}

Financial Information
Payment Terms:
{{ $supplier->payment_terms ?: '-' }}
Credit Limit:
@if($supplier->credit_limit) {{ $supplier->currency }} {{ number_format($supplier->credit_limit, 2) }} @else - @endif
Currency:
{{ $supplier->currency }}
@if($supplier->tax_number)
Tax Number:
{{ $supplier->tax_number }}
@endif
@if($supplier->bank_name || $supplier->bank_account)
Banking Information
Bank Name:
{{ $supplier->bank_name ?: '-' }}
Account:
{{ $supplier->bank_account ?: '-' }}
@endif @if($supplier->notes)
Notes

{{ $supplier->notes }}

@endif
Created: {{ $supplier->created_at->format('M d, Y H:i') }} by {{ $supplier->createdBy?->name ?? 'System' }}
Last Updated: {{ $supplier->updated_at->format('M d, Y H:i') }}
trending_up Performance Overview

{{ $supplier->formatted_rating }}

@for($i = 1; $i <= 5; $i++) @if($i <= floor($supplier->rating)) star @else star_border @endif @endfor
Overall Rating
Performance Score {{ number_format($supplier->performance_score, 1) }}%
{{ $performanceData['total_orders'] ?? 0 }}
Orders
${{ number_format($performanceData['total_value'] ?? 0, 0) }}
Total Value
${{ number_format($performanceData['average_order_value'] ?? 0, 0) }}
Avg Order
@can('warehouse.suppliers.edit')
@endcan
@if(!empty($performanceData['rating_breakdown']))
assessment Performance Breakdown
@foreach($performanceData['rating_breakdown'] as $category => $score)

{{ number_format($score, 1) }}

{{ ucfirst($category) }}

@endforeach
@endif @if(!empty($performanceData['recent_activity']) && $performanceData['recent_activity']->count() > 0)
history Recent Activity
@foreach($performanceData['recent_activity'] as $activity)
Transaction #{{ $activity->id }}
{{ $activity->created_at->format('M d, Y H:i') }}
${{ number_format($activity->total_amount ?? 0, 2) }}
{{ $activity->status }}
@endforeach
@endif @endsection @section('modals') @endsection @push('scripts') @endpush