@if (($invoice->project && $invoice->project->client && $invoice->project->client->clientDetails)
&& ($invoice->project->client->name || $invoice->project->client->email || $invoice->project->client->mobile || $invoice->project->client->clientDetails->company_name || $invoice->project->client->clientDetails->address )
&& ($invoiceSetting->show_client_name == 'yes' || $invoiceSetting->show_client_email == 'yes' || $invoiceSetting->show_client_phone == 'yes' || $invoiceSetting->show_client_company_name == 'yes' || $invoiceSetting->show_client_company_address == 'yes'))
@lang("modules.invoices.billedTo"):
@if ( $invoice->project->client->name && $invoiceSetting->show_client_name == 'yes')
{{ ucwords($invoice->project->client->name) }}
@endif
@if ($invoice->project->client->email && $invoiceSetting->show_client_email == 'yes')
{{ $invoice->project->client->email }}
@endif
@if ($invoice->project->client->mobile && $invoiceSetting->show_client_phone == 'yes')
{{ $invoice->project->client->mobile }}
@endif
@if ($invoice->project->client->clientDetails->company_name && $invoiceSetting->show_client_company_name == 'yes')
{{ ucwords($invoice->project->client->clientDetails->company_name) }}
@endif
@if ($invoice->project->client->clientDetails->address && $invoiceSetting->show_client_company_address == 'yes')
@lang('app.address')
{!! nl2br($invoice->project->clientDetails->address) !!}
@endif
@if ($invoice->show_shipping_address === 'yes')
@lang('app.shippingAddress') :
{!! nl2br($invoice->project->clientDetails->shipping_address) !!}
@endif
@if($invoiceSetting->show_gst == 'yes' && !is_null($invoice->project->client->clientDetails->gst_number))
@lang('app.gstIn'): {{ $invoice->project->client->clientDetails->gst_number }}
@endif
@elseif(($invoice->client && $invoice->clientDetails)
&& ($invoice->client->name || $invoice->client->email || $invoice->client->mobile || $invoice->clientDetails->company_name || $invoice->clientDetails->address )
&& ($invoiceSetting->show_client_name == 'yes' || $invoiceSetting->show_client_email == 'yes' || $invoiceSetting->show_client_phone == 'yes' || $invoiceSetting->show_client_company_name == 'yes' || $invoiceSetting->show_client_company_address == 'yes'))
@lang("modules.invoices.billedTo"):
@if ($invoice->client->name && $invoiceSetting->show_client_name == 'yes')
{{ ucwords($invoice->client->name) }}
@endif
@if ($invoice->client->email && $invoiceSetting->show_client_email == 'yes')
{{ $invoice->client->email }}
@endif
@if ($invoice->client->mobile && $invoiceSetting->show_client_phone == 'yes')
{{ $invoice->client->mobile }}
@endif
@if ($invoice->clientDetails->company_name && $invoiceSetting->show_client_company_name == 'yes')
{{ ucwords($invoice->clientDetails->company_name) }}
@endif
@if ($invoice->clientDetails->address && $invoiceSetting->show_client_company_address == 'yes')
@lang('app.address') :
{!! nl2br($invoice->clientDetails->address) !!}
@endif
@if ($invoice->show_shipping_address === 'yes')
@lang('app.shippingAddress') :
{!! nl2br($invoice->clientDetails->shipping_address) !!}
@endif
@if($invoiceSetting->show_gst == 'yes' && !is_null($invoice->clientDetails->gst_number))
@lang('app.gstIn'): {{ $invoice->clientDetails->gst_number }}
@endif
@endif
@if((is_null($invoice->project) && $invoice->estimate && $invoice->estimate->client && $invoice->estimate->client->clientDetails)
&& ($invoiceSetting->show_client_name == 'yes' || $invoiceSetting->show_client_email == 'yes' || $invoiceSetting->show_client_phone == 'yes' || $invoiceSetting->show_client_company_name == 'yes' || $invoiceSetting->show_client_company_address == 'yes'))
@lang("modules.invoices.billedTo"):
@if ($invoice->estimate->client->name && $invoiceSetting->show_client_name == 'yes')
{{ ucwords($invoice->estimate->client->name) }}
@endif
@if ($invoice->estimate->client->email && $invoiceSetting->show_client_email == 'yes')
{{ $invoice->estimate->client->email }}
@endif
@if ($invoice->estimate->client->mobile && $invoiceSetting->show_client_phone == 'yes')
{{ $invoice->estimate->client->mobile }}
@endif
@if ($invoice->estimate->client->clientDetails->company_name && $invoiceSetting->show_client_company_name == 'yes')
{{ ucwords($invoice->estimate->client->clientDetails->company_name) }}
@endif
@if ($invoice->estimate->client->clientDetails->address && $invoiceSetting->show_client_company_address == 'yes')
@lang('app.address') :
{!! nl2br($invoice->estimate->client->clientDetails->address) !!}
@endif
@if ($invoice->show_shipping_address === 'yes')
@lang('app.shippingAddress') :
{!! nl2br($invoice->estimate->client->clientDetails->shipping_address) !!}
@endif
@if($invoiceSetting->show_gst == 'yes' && !is_null($invoice->estimate->client->clientDetails->gst_number))
@lang('app.gstIn'): {{ $invoice->estimate->client->clientDetails->gst_number }}
@endif
@endif