@extends('layouts/contentLayoutMaster') @section('title', 'Supplier Details') @section('vendor-style') {{-- vendor css files --}} @endsection @section('page-style') @endsection @section('content')
@php use App\Models\Bank; use App\Models\District; use App\Models\Tehsil; use App\Models\CollectionPoint; use App\Models\AreaOffice; $bank = Bank::find($supplier->bank_id); $getDistrict=District::find($supplier->district_id); $getTehsil=Tehsil::find($supplier->tehsil_id); $segment1 = request()->segment(1); @endphp

Supplier Details

Code

{{$supplier->code ?? ' '}}

Name

{{$supplier->name ?? ''}}


Father Name

{{$supplier->father_name ?? ''}}

Business Name

{{ $supplier->business_name ?? ''}}


Source Type

{{$supplier->supplier_type->name ?? ''}}

@if(!$supplier->plant_id)

Area Office

@php $setAoName=''; if ($supplier->area_office !== null) { $ao = AreaOffice::find($supplier->area_office); $setAoName= $ao ? $ao->ao_name : 'N/A'; } elseif (is_null($supplier->area_office) && is_null($supplier->cp_ids) && $supplier->mcc !== null) { $mcc = CollectionPoint::find($supplier->mcc[0]); $setAoName= $mcc && $mcc->area_office ? $mcc->area_office->ao_name : 'N/A'; } elseif (is_null($supplier->area_office) && is_null($supplier->mcc) && $supplier->cp_ids !== null) { $cp = CollectionPoint::find($supplier->cp_ids[0]); $setAoName= $cp && $cp->area_office ? $cp->area_office->ao_name : ($cp && $cp->plant ? $cp->plant->name : 'N/A'); } else { $setAoName= 'N/A'; } @endphp

{{$setAoName}}

@else

Plant

{{$supplier->plants->name}}

@endif

CNIC

{{$supplier->cnic ?? ''}}

NTN

{{ $supplier->ntn ?? '' }}


Contact

{{$supplier->contact ?? ''}}

WhatsApp

{{$supplier->whatsapp ?? ''}}


District

{{$getDistrict->name ?? ''}}

Tehsil

{{$getTehsil->name ?? ''}}


Latitude

{{ $supplier->latitude ?? '' }}

Longitude

{{$supplier->longitude ?? ''}}


Location / Address

{{$supplier->address ?? ''}}

Bank Account Details

Account Title

{{$supplier->bank_account_title ?? ''}}

Bank

{{$bank->name ?? ''}}


Branch Code

{{$supplier->bank_branch_code ?? ''}}

IBAN

{{$supplier->bank_account_no ?? ''}}


Branch Address

{{$supplier->bank_address ?? ''}}

Next Of Kin Details

Name

{{ $supplier->next_of_kin_name ?? '' }}

Father Name

{{$supplier->next_of_kin_father_name ?? ''}}


CNIC

{{$supplier->next_of_kin_cnic ?? ''}}

Contact

{{$supplier->next_of_kin_contact ?? ''}}


Relation With Supplier

{{$supplier->relation ?? ''}}

Agreement Details

No

Ref

Rent

From

To

W.E.F

Status

@isset($supplier->agreements) @forelse($supplier->agreements as $key=>$agreement)

{{ ++$key }}

{{ @$agreement['refrence_no'] }}

{{ @$agreement['rent'] }}

{{@$agreement['from'] }}

{{ @$agreement['to'] }}

{{ @$agreement['wef'] }}

{{ isset($agreement['status']) && $agreement['status'] == 1 ? 'ACTIVE' : 'IN-ACTIVE' }}


@empty No data found @endforelse @endisset

Collection Points Details

No

Collection Point

Status

@if ($supplier->cp_ids) @foreach ($supplier->cp_ids as $key => $data) @php $cp = $data ? App\Helpers\Helper::getCpById( $data, ) : ''; $i = 0; @endphp @if ($cp)

{{ ++$key }}

{{ $cp->name }}

{{ isset($cp->status) && $cp->status == 1 ? 'ACTIVE' : 'IN-ACTIVE' }}


@endif @endforeach @else No data found @endif

Additional Information Details

FF-1

{{ $supplier->ff_1 ?? '' }}

FF-2

{{$supplier->ff_2 ?? ''}}


FF-3

{{$supplier->ff_3 ?? ''}}


Other Details

Total Production

{{ $supplier->total_milk_production ?? '' }}

Available For Sale

{{$supplier->milk_available_for_sale ?? ''}}


Current Price

{{$supplier->price_per_litre ?? ''}}

Currently Supplying To

{{$supplier->currently_supplying_to ?? ''}}


Milking

{{$supplier->milking_animals ?? ''}}

Dry

{{$supplier->dry_animals ?? ''}}


Total

{{$supplier->no_of_animals ?? ''}}

Heifers

{{$supplier->heifers ?? ''}}


Young Stock

{{$supplier->young_stock ?? ''}}

Vacination & Deworming

{{$supplier->have_vaccinated == 1 ? 'Yes' : 'No'}}


Dimensions Of Shed

{{ $supplier->shed_dimension_width && $supplier->shed_dimension_height ? $supplier->shed_dimension_width . '*' . $supplier->shed_dimension_height : '' }}

Direction

{{$supplier->direction_of_shed ?? ''}}


Open Area (Square Meter)

{{$supplier->open_area ?? ''}}

No Of Water Troughs

{{$supplier->water_trough ?? ''}}

@endsection @section('vendor-script') @endsection @section('page-script') {{-- --}} @endsection