@if(isset($daily_route))
@elseif(auth()->user()->hasRole('Търговски представител'))
@if(isset($daily_route))
@if(count($route_objects)>0)
@foreach($route_objects as $route_object)
{{__('texte.representatives_arr.routes.daily_route.make_order')}}
{{__('texte.representatives_arr.routes.daily_route.promotions')}}
{{__('texte.representatives_arr.routes.daily_route.edit_object')}}
{{__('texte.representatives_arr.routes.daily_route.due_amount')}}: 0.00000 {{__('texte.representatives_arr.routes.daily_route.bgn')}}.
{{__('texte.representatives_arr.routes.daily_route.orders_amount')}}: 0.00000 {{__('texte.representatives_arr.routes.daily_route.bgn')}}.
{{__('texte.representatives_arr.routes.daily_route.due_wrappage')}}: 0.00000 {{__('texte.representatives_arr.routes.daily_route.bgn')}}.
{{__('texte.representatives_arr.routes.daily_route.credit_limit')}}: 0.00000 {{__('texte.representatives_arr.routes.daily_route.bgn')}}.
{{__('texte.representatives_arr.routes.daily_route.overdue_amount')}}: 0.00000 {{__('texte.representatives_arr.routes.daily_route.bgn')}}.
{{__('texte.representatives_arr.routes.daily_route.min_order_amount')}}: 0.00000 {{__('texte.representatives_arr.routes.daily_route.bgn')}}.
{{__('texte.representatives_arr.routes.daily_route.free_delivery_amount')}}: 0.00000 {{__('texte.representatives_arr.routes.daily_route.bgn')}}.
{{__('texte.representatives_arr.routes.daily_route.contragent')}}: {{$route_object->obect->contragent->company_name ?? $route_object->obect->contragent->user->name}}
{{__('texte.representatives_arr.routes.daily_route.object')}}: {{$route_object->obect->user->name}}
{{__('texte.representatives_arr.routes.daily_route.object_type')}}: {{$route_object->obect->subtype->type->name}}, {{$route_object->obect->subtype->name}}
{{__('texte.representatives_arr.routes.daily_route.location')}}: {{$route_object->obect->location->area->name}}, {{$route_object->obect->location->name}}
{{__('texte.representatives_arr.routes.daily_route.region')}}: {{$route_object->obect->subregion->region->name}}, {{$route_object->obect->subregion->name}}
{{__('texte.representatives_arr.routes.daily_route.address')}}: {{$route_object->obect->delivery_address}}
{{__('texte.representatives_arr.routes.daily_route.email')}}: {{$route_object->obect->user->email}}
{{__('texte.representatives_arr.routes.daily_route.phone')}}: {{$route_object->obect->user->mobile}}
{{__('texte.representatives_arr.routes.daily_route.contact_person')}}: {{$route_object->obect->contact_person}}
{{__('texte.representatives_arr.routes.daily_route.payment')}}: {{$route_object->obect->payment_type==0 ? __('texte.representatives_arr.routes.daily_route.cash') : __('texte.representatives_arr.routes.daily_route.bank_payment')}}
@foreach ($filters as $filter)
@if ($filter->type == 2 && $filter->options->isNotEmpty())
{{$filter->title}}:
@foreach($filter->options as $option)
{{isset(json_decode($route_object->obect->filters, true)[$filter->name]) && in_array($option->id, json_decode($route_object->obect->filters,true)[$filter->name]) ? $option->title.', ' : ''}}
@endforeach
@endif
@if ($filter->type == 1 && $filter->options->isNotEmpty())
{{$filter->title}}:
@foreach ($filter->options as $option)
@if ($option->active)
{{(isset(json_decode($route_object->obect->filters,true)[$filter->name]) && $option->id == json_decode($route_object->obect->filters, true)[$filter->name]) ? $option->title : ''}}
@endif
@endforeach
@endif
@if ($filter->type == 0)
{{$filter->title}}:
{{json_decode($route_object->obect->filters, true)[$filter->name] ?? ''}}
@endif
@endforeach
@endforeach
@else
@endif
@endif