@if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->id)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->customers_email_address)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->customers_telephone)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->alternate_mobile)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->primary_address)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->same_as_primary_address) && $result['opportunities']->same_as_primary_address == 'Yes') @elseif(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->other_address)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->lead_source)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->source_of_call)) @endif @if(count((array) $result['opportunities']['managed_by'])>0 && !empty($result['opportunities']['managed_by']->first_name)) @endif @if(count((array) $result['opportunities']['bdr'])>0 && !empty($result['opportunities']['bdr']->first_name)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->verification_time)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->card_charged_with_gateway)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->transaction_id)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->opportunities_status)) @endif @if(count((array) $result['opportunities'])>0 && !empty($result['opportunities']->created_at)) @endif @if(count((array) $result['opportunities']['products'])>0 && !empty($result['opportunities']['products']->name)) @endif @if(count((array) $result['opportunities']['services_plan'])>0 && !empty($result['opportunities']['services_plan']->name)) @endif @if(count((array) $result['opportunities']['comments_data'])>0) @endif
Customer Name: {{$result['opportunities']->customers_firstname}} {{$result['opportunities']->customers_lastname}}
Email Address: {{$result['opportunities']->customers_email_address}}
Telephone: {{$result['opportunities']->customers_telephone}}
Alternate Mobile: {{$result['opportunities']->alternate_mobile}}
Billing Address:

Address Line1: {{$result['opportunities']->primary_address}},

@if(!empty($result['opportunities']->primary_address2))

Address Line2: {{$result['opportunities']->primary_address2}},

@endif {{$result['opportunities']->p_city}}, @if(!empty($result['opportunities']->p_manual_province_name)>0) {{$result['opportunities']->p_manual_province_name}} @endif @if(count((array) $result['opportunities']['billing_state'])>0) {{$result['opportunities']['billing_state']->zone_name}}, @endif @if(!empty($result['opportunities']->p_postal_code)) {{$result['opportunities']->p_postal_code}}, @endif @if(!empty($result['opportunities']->p_manual_country_name)>0) {{$result['opportunities']->p_manual_country_name}} @endif @if(count((array) $result['opportunities']['billing_country'])>0) {{$result['opportunities']['billing_country']->countries_name}} @endif
Shipping Address: Same as billing address
Shipping Address:

Address Line1: {{$result['opportunities']->other_address}},

@if(!empty($result['opportunities']->other_address2))

Address Line2: {{$result['opportunities']->other_address2}},

@endif {{$result['opportunities']->o_city}}, @if(!empty($result['opportunities']->o_manual_province_name)>0) {{$result['opportunities']->o_manual_province_name}} @endif @if(count((array) $result['opportunities']['shipping_state'])>0) {{$result['opportunities']['shipping_state']->zone_name}}, @endif @if(!empty($result['opportunities']->o_postal_code)) {{$result['opportunities']->o_postal_code}}, @endif @if(!empty($result['opportunities']->o_manual_country_name)>0) {{$result['opportunities']->o_manual_country_name}} @endif @if(count((array) $result['opportunities']['shipping_state'])>0) {{$result['opportunities']['shipping_state']->countries_name}} @endif
Lead Source: {{$result['opportunities']->lead_source}}
Referred by: {{$result['opportunities']->source_of_call}}
Assigned by: {{$result['opportunities']['managed_by']->first_name}} {{$result['opportunities']['managed_by']->last_name}}
BDR: {{$result['opportunities']['bdr']->first_name}} {{$result['opportunities']['bdr']->last_name}}
Verification Time: {{date('d-m-Y H:i:s', strtotime($result['opportunities']->verification_time))}}
Payment gateway: {{$result['opportunities']->card_charged_with_gateway}}
Transaction ID: {{$result['opportunities']->transaction_id}}
Status: {{$result['opportunities']->opportunities_status}}
Created date: {{date('d-m-Y H:i:s', strtotime($result['opportunities']->created_at))}}
Product: {{$result['opportunities']['products']->name}}
Services plan: {{$result['opportunities']['services_plan']->name}} @if(!empty($result['opportunities']['services_plan']->model_number)) with {{$result['opportunities']['services_plan']->model_number}} @endif @if(!empty($result['opportunities']['services_plan']->existing_customer)) {{$result['opportunities']['services_plan']->existing_customer}} @endif with ${{$result['opportunities']['services_plan']->price}} {{$result['opportunities']['services_plan']->packages_currency}}
Description: @foreach ($result['opportunities']['comments_data'] as $cmVal) @if(!empty($cmVal->description))
{{$cmVal['managed_by']->first_name}} {{$cmVal['managed_by']->last_name}} updated on {{date('d-m-Y H:i:s', strtotime($cmVal->created_at))}}@if(!empty($cmVal->talk_time)), Call Time: {{$cmVal->talk_time}} @endif
{!!nl2br($cmVal->description)!!}
@endif @endforeach