@extends('layouts.master') @section('page_title', 'View Details') @section('title', 'Supplier Details') @section('main_item', 'Supplier') @section('sub_item', 'View Details') @section('content')

Supplier Information

{{ $supplier->business_name }}

{{ $supplier->name }}

{{--
--}}

Address

{{ $supplier->landmark }}

{{--

{{ $supplier->city_id->name_en }}

--}} @if ($supplier->district_id != 0)

{{ $supplier->district->name_en }}

@endif

{{ $supplier->state }}

Mobile

{{ $supplier->mobile }}

{{ $supplier->mobile_2 }}

{{ $supplier->landline }}

Business Location

@php $location_ids = App\BusinessLocation::all(); @endphp @foreach ($location_ids as $location_id) @if ($location_id->id == $supplier->location_id) {{ $location_id->name }} @endif @endforeach

Total purchase

Rs. {{ number_format($purchase_payment, 2) }}

Total purchase Returns

Rs. {{ number_format($purchase_return_sum, 2) }}

Actual Purchase

Rs. {{ number_format($purchase_payment - $purchase_return_sum, 2) }}

{{--

Total Sale Due

Rs 0.00

--}}

All purchases related to this contact

@foreach ($supplier->grns as $grn) @endforeach
Date Ref No Supplier Status Total Amount Paid Amount Action
{{ explode(' ', $grn->grn_date)[0] }} {{ $grn->ref_no }} {{ $grn->supplier->business_name }} @if ($grn->payment_status == 'returened') Returend {{-- @elseif($sale->status == 'dispatched') Dispatched @elseif($sale->status == 'returned') Returned --}} @else Not Avaliable @endif {{ number_format($grn->grn_nettotal, 2) }} @if (!empty($grn->payment)) {{ number_format($grn->payment->paid_amount->sum(), 2) }} @else 0 @endif

Sales Return

{{-- --}} @foreach ($purchase_returns as $purchase_return) {{-- --}} {{-- --}} @endforeach
Return Date Reference NumberWaybill No Return Reason
{{ $purchase_return->grn_date }} {{ $purchase_return->ref_no }}{{$item->sale->waybill->waybill_no}} @if ($item->return_reason == 'delivery_issue') Delivery Issue @elseif ($item->return_reason == 'delivery_damage') Delivery Damage @else Other @endif
@endsection @section('scripts') @endsection