@extends('layouts.admin') @section('title', trans('admin.customer_show_title', ['name' => $customer->name])) @section('header_title', trans('admin.customer_show_header', ['name' => $customer->name])) @section('content')
{{ trans('admin.back_to_customers') }}

{{ $customer->name }}

@if($customer->vat_number) {{ trans('admin.vat_label') }} {{ $customer->vat_number }} @else {{ trans('admin.individual_not_registered') }} @endif
{{ trans('admin.parent_company_col') }}: @if($customer->tenant) {{ $customer->tenant->name }} @else - @endif
@if($customer->cr_number)
{{ trans('admin.cr_label') }} {{ $customer->cr_number }}
@endif @if($customer->phone)
{{ trans('admin.phone_label') }} {{ $customer->phone }}
@endif @if($customer->email)
{{ trans('admin.email_label') }} {{ $customer->email }}
@endif
{{ trans('admin.city_col') }}: {{ $customer->address_city ?? '-' }}
@csrf @method('DELETE')
{{ trans('admin.customer_invoices_heading', ['count' => $customer->invoices_count]) }} {{ trans('admin.last_20_invoices') }}
@forelse($customer->invoices as $inv) @empty @endforelse
{{ trans('admin.invoice_number_col') }} {{ trans('admin.total_amount_col') }} {{ trans('admin.tax_col') }} {{ trans('admin.zatca_status_col') }} {{ trans('admin.issued_at_col') }} {{ trans('admin.action') }}
{{ $inv->invoice_number }} {{ number_format($inv->total, 2) }} ﷼ {{ number_format($inv->vat_amount, 2) }} ﷼ @if($inv->status->value === 'cleared') {{ trans('admin.cleared_status') }} @elseif($inv->status->value === 'reported') {{ trans('admin.reported_status') }} @else {{ $inv->status->label() }} @endif {{ $inv->issued_at ? $inv->issued_at->format('Y-m-d H:i') : $inv->created_at->format('Y-m-d H:i') }} {{ trans('admin.view_action') }}
{{ trans('admin.no_customer_invoices') }}
{{ trans('admin.customer_quotes_heading', ['count' => $customer->quotations_count]) }} {{ trans('admin.last_20_quotes') }}
@forelse($customer->quotations as $q) @empty @endforelse
{{ trans('admin.quotes_title') }} {{ trans('admin.total_amount_col') }} {{ trans('admin.status_col') }} {{ trans('admin.valid_until_col') }} {{ trans('admin.action') }}
{{ $q->quote_number }} {{ number_format($q->total, 2) }} ﷼ {{ ucfirst($q->status) }} {{ $q->valid_until ? $q->valid_until->format('Y-m-d') : '-' }} {{ trans('admin.view_action') }}
{{ trans('admin.no_customer_quotes') }}
@endsection