@extends('layouts.admin-simple') @section('title', $supplier->name) @section('page-title', $supplier->name) @section('page-subtitle', 'Supplier Details and Performance') @section('breadcrumb') @endsection @section('page-actions')
@can('warehouse.suppliers.edit') Edit Supplier @endcan
@endsection @section('content')

Supplier Information

{{ 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) @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 Number
{{ $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') }}

Performance Overview

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

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)

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 @push('scripts') @endpush