@extends('layouts.app') @section('title', __('contact.view_contact')) @section('content')

{{ __('contact.view_contact') }}

@if($contact->type == 'both') @lang( 'contact.contact_info', ['contact' => __('contact.contact') ]) @else @lang( 'contact.contact_info', ['contact' => ucfirst($contact->type) ]) @endif

{{ $contact->name }}

@lang('business.address')

@if($contact->landmark) {{ $contact->landmark }} @endif {{ ', ' . $contact->city }} @if($contact->state) {{ ', ' . $contact->state }} @endif
@if($contact->country) {{ $contact->country }} @endif

@if($contact->supplier_business_name) @lang('business.business_name')

{{ $contact->supplier_business_name }}

@endif
@lang('contact.mobile')

{{ $contact->mobile }}

@if($contact->landline) @lang('contact.landline')

{{ $contact->landline }}

@endif @if($contact->alternate_number) @lang('contact.alternate_contact_number')

{{ $contact->alternate_number }}

@endif @if(!empty($contact->custom_field1)) @lang('lang_v1.custom_field', ['number' => 1])

{{ $contact->custom_field1 }}

@endif @if(!empty($contact->custom_field2)) @lang('lang_v1.custom_field', ['number' => 2])

{{ $contact->custom_field2 }}

@endif @if(!empty($contact->custom_field3)) @lang('lang_v1.custom_field', ['number' => 3])

{{ $contact->custom_field3 }}

@endif @if(!empty($contact->custom_field4)) @lang('lang_v1.custom_field', ['number' => 4])

{{ $contact->custom_field4 }}

@endif
@if( $contact->type != 'customer')
@lang('contact.tax_no')

{{ $contact->tax_number }}

@if($contact->pay_term_type) @lang('contact.pay_term_period')

{{ ucfirst($contact->pay_term_type) }}

@endif @if($contact->pay_term_number) @lang('contact.pay_term')

{{ $contact->pay_term_number }}

@endif
@endif
@if( $contact->type == 'supplier' || $contact->type == 'both') @lang('report.total_purchase')

{{ $contact->total_purchase }}

@lang('contact.total_purchase_paid')

{{ $contact->purchase_paid }}

@lang('contact.total_purchase_due')

{{ $contact->total_purchase - $contact->purchase_paid }}

@endif @if( $contact->type == 'customer' || $contact->type == 'both') @lang('report.total_sell')

{{ $contact->total_invoice }}

@lang('contact.total_sale_paid')

{{ $contact->invoice_received }}

@lang('contact.total_sale_due')

{{ $contact->total_invoice - $contact->invoice_received }}

@endif @if(!empty($contact->opening_balance) && $contact->opening_balance != '0.00') @lang('lang_v1.opening_balance')

{{ $contact->opening_balance }}

@lang('lang_v1.opening_balance_due')

{{ $contact->opening_balance - $contact->opening_balance_paid }}

@endif
@if( $contact->type == 'supplier' || $contact->type == 'both')
@if(($contact->total_purchase - $contact->purchase_paid) > 0) @lang("contact.pay_due_amount") @endif
@endif
@if( in_array($contact->type, ['supplier', 'both']) )

@lang( 'contact.all_purchases_linked_to_this_contact')

Date Ref No. Supplier Purchase Status Payment Status Grand Total @lang('purchase.payment_due')    Action
@component('components.widget', ['class' => 'box-primary', 'title' => __('lang_v1.all_purchase_returns')]) @can('purchase.view')
@include('purchase_return.partials.purchase_return_list') @endcan @endcomponent @endif @if( in_array($contact->type, ['customer', 'both']) )

@lang( 'contact.all_sells_linked_to_this_contact')

@lang('messages.date') @lang('sale.invoice_no') @lang('sale.customer_name') @lang('sale.payment_status') @lang('sale.total_amount') @lang('sale.total_paid') @lang('sale.total_remaining') @lang('messages.action')
@component('components.widget', ['class' => 'box-primary', 'title' => __('lang_v1.sell_return')]) @can('sell.view')
@include('sell_return.partials.sell_return_list') @endcan @endcomponent @endif @if(auth()->user()->can('purchase.payments') || auth()->user()->can('sell.payments')) @component('components.widget', ['class' => 'box-primary', 'title' => __('lang_v1.opening_balance_payments')])
@lang('purchase.ref_no') @lang('lang_v1.paid_on') @lang('sale.amount') @lang('lang_v1.payment_method') @lang('messages.action')
@endcomponent @endif
@stop @section('javascript') @endsection