@extends('layouts.app') @section('title', $supplier->name) @section('content')
← {{ __('Back') }}

{{ $supplier->name }}

{{ __('Contact') }}
{{ $supplier->contact_name ?? '—' }}
{{ __('Phone') }}
{{ $supplier->phone ?? '—' }}
{{ __('Email') }}
{{ $supplier->email ?? '—' }}
{{ __('Address') }}
{{ $supplier->address ?? '—' }}
{{ __('Tax number') }}
{{ $supplier->tax_number ?? '—' }}
{{ __('Products') }}
{{ $supplier->products_count }}

{{ __('Total purchased') }}

{{ money($totals['purchased']) }}

{{ __('Paid') }}

{{ money($totals['paid']) }}

{{ __('Outstanding') }}

{{ money($totals['outstanding']) }}

{{ __('Recent purchases') }}

@forelse ($purchases as $purchase) @empty @endforelse
{{ __('Reference') }}{{ __('Date') }} {{ __('Total') }}{{ __('Payment') }}
{{ $purchase->reference }} {{ $purchase->created_at->format('d/m/Y') }} {{ money($purchase->total) }} {{ __(ucfirst($purchase->payment_status)) }}
{{ __('No purchases.') }}
{{ $purchases->links() }}

{{ __('Payments') }}

@forelse ($payments as $payment) @empty @endforelse
{{ __('Reference') }}{{ __('Amount') }} {{ __('Due') }}{{ __('Status') }}
{{ $payment->reference }} {{ money($payment->amount) }} {{ $payment->due_date?->format('d/m/Y') ?? '—' }} {{ __(ucfirst($payment->status)) }}
{{ __('No payments.') }}
@endsection