@extends('layouts.app') @section('title', 'Buyer Details') @section('page-title', $buyer->business_name) @section('content')

{{ $buyer->business_name }}

{{ $buyer->buyer_code }}

{{ ucfirst($buyer->status) }} @can('update', $buyer) Edit @endcan
Total Orders
{{ $stats['total_orders'] }}
Completed Orders
{{ $stats['completed_orders'] }}
Total Order Value
₹{{ number_format($stats['total_order_value'], 2) }}
Active Requirements
{{ $stats['active_requirements'] }}

Buyer Information

Contact Details

Contact Person
{{ $buyer->contact_person }}
@if($buyer->email) @endif @if($buyer->whatsapp_number) @endif

Business Details

Business Type
{{ ucfirst($buyer->business_type) }}
@if($buyer->gst_number)
GST Number
{{ $buyer->gst_number }}
@endif @if($buyer->credit_limit)
Credit Limit
₹{{ number_format($buyer->credit_limit, 2) }}
@endif @if($buyer->assignedAgent)
Assigned Agent
{{ $buyer->assignedAgent->name }}
@endif

Address

{{ $buyer->address }}
{{ $buyer->city }}, {{ $buyer->state }} - {{ $buyer->pincode }}

@if($buyer->payment_terms)

Payment Terms

{{ $buyer->payment_terms }}

@endif @if($buyer->notes)

Notes

{{ $buyer->notes }}

@endif

Quick Actions

View Orders View Requirements @if($buyer->whatsapp_number) WhatsApp @endif @if($buyer->phone) Call @endif
@can('update', $buyer)

Agent Assignment

@csrf
@endcan

Recent Orders

View all
@if($recentOrders->count() > 0)
@foreach($recentOrders as $order)

{{ $order->order_number }}

{{ $order->created_at->format('M d, Y') }}

₹{{ number_format($order->total_amount, 2) }}

{{ ucfirst($order->status) }}
@endforeach
@else

No orders found.

@endif

Recent Requirements

View all
@if($recentRequirements->count() > 0)
@foreach($recentRequirements as $requirement)

{{ $requirement->title }}

{{ $requirement->created_at->format('M d, Y') }}

{{ ucfirst($requirement->status) }}
@endforeach
@else

No requirements found.

@endif
@endsection