@php $custom_labels = json_decode(session('business.custom_labels'), true); $contact_custom_fields = !empty($jobsheet_settings['contact_custom_fields']) ? $jobsheet_settings['contact_custom_fields'] : []; @endphp
@if(!empty(Session::get('business.logo'))) Logo @endif

{{$job_sheet->customer->business->name}}
{!!$job_sheet->businessLocation->name!!}
{!!$job_sheet->businessLocation->location_address!!} @if(!empty($job_sheet->businessLocation->mobile))
@lang('business.mobile'): {{$job_sheet->businessLocation->mobile}}, @endif @if(!empty($job_sheet->businessLocation->alternate_number)) @lang('invoice.show_alternate_number'): {{$job_sheet->businessLocation->alternate_number}}, @endif @if(!empty($job_sheet->businessLocation->email))
@lang('business.email'): {{$job_sheet->businessLocation->email}}, @endif @if(!empty($job_sheet->businessLocation->website)) @lang('lang_v1.website'): {{$job_sheet->businessLocation->website}} @endif

@lang('receipt.date'): @lang('repair::lang.service_type'): @lang('repair::lang.job_sheet_no'): @lang('lang_v1.due_date'):
{{@format_datetime($job_sheet->created_at)}} @lang('repair::lang.'.$job_sheet->service_type) {{$job_sheet->job_sheet_no}} @if(!empty($job_sheet->delivery_date)){{@format_datetime($job_sheet->delivery_date)}}@endif
@if(!empty($jobsheet_settings['show_customer'])) @endif
@if(!empty($jobsheet_settings['customer_label'])) @endif
{{$jobsheet_settings['customer_label']}}:

{!! $job_sheet->customer->contact_address !!} @if(!empty($jobsheet_settings['show_client_id']))
{{$jobsheet_settings['client_id_label'] ?? ''}}: {{$job_sheet->customer->contact_id}} @endif @if(!empty($contact->email))
@lang('business.email'): {{$job_sheet->customer->email}} @endif
@lang('contact.mobile'): {{$job_sheet->customer->mobile}} @if(!empty($contact->tax_number))
{{$jobsheet_settings['client_tax_label'] ?? ''}}: {{$job_sheet->customer->tax_number}} @endif @if(in_array('custom_field1', $contact_custom_fields))
{{ $custom_labels['contact']['custom_field_1'] ?? __('lang_v1.contact_custom_field1') }}: {{$job_sheet->customer->custom_field1}} @endif @if(in_array('custom_field2', $contact_custom_fields))
{{ $custom_labels['contact']['custom_field_2'] ?? __('lang_v1.contact_custom_field2') }}: {{$job_sheet->customer->custom_field2}} @endif @if(in_array('custom_field3', $contact_custom_fields))
{{ $custom_labels['contact']['custom_field_3'] ?? __('lang_v1.contact_custom_field3') }}: {{$job_sheet->customer->custom_field3}} @endif @if(in_array('custom_field4', $contact_custom_fields))
{{ $custom_labels['contact']['custom_field_4'] ?? __('lang_v1.contact_custom_field4') }}: {{$job_sheet->customer->custom_field4}} @endif

@lang('product.brand'): {{$job_sheet->brand?->name}} @lang('repair::lang.device'): {{$job_sheet->device?->name}}
@lang('repair::lang.device_model'): {{$job_sheet->deviceModel?->name}} @lang('lang_v1.password'): {{$job_sheet->security_pwd}}
@lang('repair::lang.serial_no'): {{$job_sheet->serial_no}}
@lang('repair::lang.security_pattern_code'): {{$job_sheet->security_pattern}}
@lang('sale.invoice_no'): @if($job_sheet->invoices->count() > 0) @foreach($job_sheet->invoices as $invoice) {{$invoice->invoice_no}} @if (!$loop->last) {{', '}} @endif @endforeach @endif @lang('repair::lang.estimated_cost'): @format_currency($job_sheet->estimated_cost) @lang('sale.status'): {{$job_sheet->status?->name}}
@lang('repair::lang.pre_repair_checklist'):
@php $checklists = []; if (!empty($job_sheet->deviceModel) && !empty($job_sheet->deviceModel->repair_checklist)) { $checklists = explode('|', $job_sheet->deviceModel->repair_checklist); } if(!empty($repair_settings['default_repair_checklist'])) { $checklists = array_merge(explode('|', $repair_settings['default_repair_checklist']), $checklists); } @endphp @if(!empty($checklists))
@foreach($checklists as $check) @php if(!isset($job_sheet->checklist[$check])) { continue; } @endphp
@if($job_sheet->checklist[$check] == 'yes')
@elseif($job_sheet->checklist[$check] == 'no')
@elseif($job_sheet->checklist[$check] == 'not_applicable')
 
@endif
{{$check}}
@endforeach
@endif
@lang('repair::lang.comment_by_ss'): {{$job_sheet->comment_by_ss}}
@lang('repair::lang.product_configuration'): @php $product_configuration = json_decode($job_sheet->product_configuration, true); @endphp @if(!empty($product_configuration)) @foreach($product_configuration as $product_conf) {{$product_conf['value']}} @if(!$loop->last) {{','}} @endif @endforeach @endif
@lang('repair::lang.condition_of_product'): @php $product_condition = json_decode($job_sheet->product_condition, true); @endphp @if(!empty($product_condition)) @foreach($product_condition as $product_cond) {{$product_cond['value']}} @if(!$loop->last) {{','}} @endif @endforeach @endif
@lang('repair::lang.problem_reported_by_customer'): @php $defects = json_decode($job_sheet->defects, true); @endphp @if(!empty($defects)) @foreach($defects as $product_defect) {{$product_defect['value']}} @if(!$loop->last) {{','}} @endif @endforeach @endif
@if(!empty($job_sheet->custom_field_1))
{{$repair_settings['job_sheet_custom_field_1'] ?? __('lang_v1.custom_field', ['number' => 1])}}: {{$job_sheet->custom_field_1}}
@endif @if(!empty($job_sheet->custom_field_2))
{{$repair_settings['job_sheet_custom_field_2'] ?? __('lang_v1.custom_field', ['number' => 2])}}: {{$job_sheet->custom_field_2}}
@endif @if(!empty($job_sheet->custom_field_3))
{{$repair_settings['job_sheet_custom_field_3'] ?? __('lang_v1.custom_field', ['number' => 3])}}: {{$job_sheet->custom_field_3}}
@endif @if(!empty($job_sheet->custom_field_4))
{{$repair_settings['job_sheet_custom_field_4'] ?? __('lang_v1.custom_field', ['number' => 4])}}: {{$job_sheet->custom_field_4}}
@endif @if(!empty($job_sheet->custom_field_5))
{{$repair_settings['job_sheet_custom_field_5'] ?? __('lang_v1.custom_field', ['number' => 5])}}: {{$job_sheet->custom_field_5}}
@endif
@lang('repair::lang.parts_used'): @if(!empty($parts)) @foreach($parts as $part) @endforeach
{{$part['variation_name']}}:   {{$part['quantity']}} {{$part['unit']}}
@endif
@lang("lang_v1.terms_conditions"): @if(!empty($repair_settings['repair_tc_condition'])) {!!$repair_settings['repair_tc_condition']!!} @endif
@lang('repair::lang.customer_signature'): @lang('repair::lang.authorized_signature'): @lang('repair::lang.technician'): {{$job_sheet->technician?->user_full_name}}
✂ ------------------------------------------------------------------------------------------------------
@lang('repair::lang.job_sheet_no'):
{{$job_sheet->job_sheet_no}}
@lang('repair::lang.device_model'): {{$job_sheet->deviceModel?->name}}   @lang('lang_v1.password'): {{$job_sheet->security_pwd}}
@lang('repair::lang.serial_no'): {{$job_sheet->serial_no}}
@lang('repair::lang.security_pattern_code'): {{$job_sheet->security_pattern}}
@lang('lang_v1.due_date'):
@if(!empty($job_sheet->delivery_date)){{@format_datetime($job_sheet->delivery_date)}}@endif
@lang('repair::lang.problem_reported_by_customer'):
@php $defects = json_decode($job_sheet->defects, true); @endphp @if(!empty($defects)) @foreach($defects as $product_defect) {{$product_defect['value']}} @if(!$loop->last) {{','}} @endif @endforeach @endif