@extends('layouts.admin') @section('title', $company->name) @section('header-back') Back @endsection @section('header-title', $company->name) @section('content')
{{ strtoupper(substr($company->name, 0, 2)) }}

{{ $company->contact_person }}

{{ ucfirst($company->status) }}

{{ $company->mobile }} • {{ $company->email ?: 'No company email' }}

Company since {{ $company->created_at->format('d M Y') }}

Edit company

Vehicle rates

{{ $company->pricingAgreements->count() }} configured

Agreement status

{{ $company->agreement_end_date?->isPast() ? 'Expired' : 'Current' }}

Tax / GST number

{{ $company->tax_number ?: 'Not provided' }}

Billing profile

Invoice and tax information

@foreach ([['Invoice email', $company->preferred_invoice_email ?: 'Not provided'], ['Company email', $company->email ?: 'Not provided'], ['Tax / GST number', $company->tax_number ?: 'Not provided']] as [$label, $value])
{{ $label }}
{{ $value }}
@endforeach
Billing address
{{ $company->billing_address }}

Agreement and notes

Agreement period

{{ $company->agreement_start_date?->format('d M Y') ?: 'Not set' }} to {{ $company->agreement_end_date?->format('d M Y') ?: 'Open ended' }}

Notes

{{ $company->notes ?: 'No notes have been added.' }}

Vehicle pricing agreements

Contracted rates loaded into quotations and bookings

{{ $company->pricingAgreements->count() }} rates
@foreach ($company->pricingAgreements as $rate)

{{ $rate->vehicle_type }}

{{ $rate->pricing_type === 'per_day' ? 'Per day' : 'Per kilometre' }}

₹{{ number_format((float) ($rate->pricing_type === 'per_day' ? $rate->fixed_amount_per_day : $rate->rate_per_km), 2) }} / {{ $rate->pricing_type === 'per_day' ? 'day' : 'km' }}

@if ($rate->pricing_type === 'per_day')

Included KM/day

{{ $rate->included_km_per_day ?? 0 }} km

Extra KM rate

₹{{ number_format((float) $rate->extra_km_rate, 2) }}

@else

Minimum KM/day

{{ $rate->minimum_km_per_day ?? 0 }} km

@endif

Waiting charge

₹{{ number_format((float) $rate->waiting_charge, 2) }}

Tax

{{ number_format((float) $rate->tax_percentage, 2) }}%

Toll / Parking

{{ $rate->toll_treatment }} / {{ $rate->parking_treatment }}

@endforeach
@endsection