@extends('layouts.layoutMaster') @section('title', __('Supplier Details')) @section('vendor-style') @vite([ 'resources/assets/vendor/libs/sweetalert2/sweetalert2.scss', 'resources/assets/vendor/libs/flatpickr/flatpickr.scss', ]) @endsection @section('vendor-script') @vite([ 'resources/assets/vendor/libs/sweetalert2/sweetalert2.js', 'resources/assets/vendor/libs/flatpickr/flatpickr.js', ]) @endsection @section('page-script') @vite([ 'Modules/SystemCore/resources/assets/js/entity-management.js', ]) @endsection @section('content')
{{ strtoupper(substr($supplier->name, 0, 2)) }}
{{ $supplier->name }}
{{ $supplier->supplier_code }}
  • {{ __('Company:') }} {{ $supplier->company_name ?? '-' }}
  • {{ __('Status:') }} {{ $supplier->status->label() }}
  • {{ __('Email:') }} {{ $supplier->email ?? '-' }}
  • {{ __('Phone:') }} {{ $supplier->phone ?? '-' }}
  • {{ __('Mobile:') }} {{ $supplier->mobile ?? '-' }}
  • {{ __('Website:') }} {{ $supplier->website ?? '-' }}
  • {{ __('Tax ID:') }} {{ $supplier->tax_id ?? '-' }}
  • {{ __('VAT Number:') }} {{ $supplier->vat_number ?? '-' }}
  • {{ __('Payment Terms:') }} {{ $supplier->paymentTerm?->name ?? '-' }}
  • {{ __('Credit Limit:') }} {{ number_format($supplier->credit_limit, 2) }}
@if($supplier->notes)
{{ __('Notes') }}

{{ $supplier->notes }}

@endif
{{ $stats['total_orders'] }}
{{ __('Total Orders') }}
{{ number_format($stats['total_spent'], 2) }}
{{ __('Total Spent') }}
{{ $stats['pending_orders'] }}
{{ __('Pending Orders') }}
{{ $stats['completed_orders'] }}
{{ __('Completed Orders') }}
{{-- Addresses Section --}} @include('systemcore::partials.entity._addresses_card', [ 'entityType' => 'supplier', 'entityId' => $supplier->id, 'addresses' => $supplier->addresses, 'canEdit' => true ]) {{-- Contacts Section --}} @include('systemcore::partials.entity._contacts_card', [ 'entityType' => 'supplier', 'entityId' => $supplier->id, 'contacts' => $supplier->contacts, 'canEdit' => true ]) {{-- Documents Section --}} @include('systemcore::suppliers._documents_card', [ 'supplier' => $supplier, 'documents' => $supplier->documents, 'canEdit' => true ])
{{ __('Recent Purchase Orders') }}
@if($stats['total_orders'] > 0) {{ __('View All') }} @endif
@if($supplier->purchaseOrders->count() > 0)
@foreach($supplier->purchaseOrders as $order) @endforeach
{{ __('Order Number') }} {{ __('Date') }} {{ __('Status') }} {{ __('Total') }} {{ __('Actions') }}
{{ $order->order_number }} {{ $order->order_date->format('Y-m-d') }} {{ $order->status->label() }} {{ number_format($order->total_amount, 2) }}
@else

{{ __('No purchase orders found') }}

@endif
@endsection