@extends(!auth()->user()->hasRole('Търговски представител') && !auth()->user()->hasRole('Външен търговски представител') ? 'layouts.app' : 'layouts.app_mobile') @section('link') @endsection @section('style') @endsection @section('content')
@include('shared.messages')

{{__('texte.orders_arr.show.show_order')}}

@if($order->status==1) {{__('texte.orders_arr.show.approve_order')}} @endif @permission('order-route-edit') @if(auth()->user()->id==1) @endif @endpermission @if($object->data->overdue_amount>0)

Обекта има просрочени задължения в размер на {{number_format($object->data->overdue_amount,2)}} лв.

@endif
{{__('texte.orders_arr.show.object')}}: {{ $order->name }}
{{__('texte.orders_arr.show.storage')}}: {{ $order->storage_name }}
{{__('texte.orders_arr.show.type')}}: {{Lang::get('texte.order_type_arr')[$order->type]}}
{{__('texte.orders_arr.show.urgent')}}: {{Lang::get('texte.replies_arr')[$order->urgent]}}
{{__('texte.orders_arr.show.delivery_date')}}: {{date("d.m.Y",strtotime($order->delivery_date))}}
{{__('texte.orders_arr.show.payment_date')}}: {{date("d.m.Y",strtotime($order->payment_date))}}
{{__('texte.orders_arr.show.payment')}}: {{Lang::get('texte.payment_types_arr')[$order->payment_type]}}
{{__('texte.orders_arr.show.source')}}: {!!Lang::get('texte.source_type_arr')[$order->source]!!}
{{__('texte.orders_arr.show.user')}}: {{ $order->user->name }}
{{__('texte.orders_arr.show.status')}}: {{ Lang::get('texte.status_type_arr')[$order->status] }}
@if($order->note!='' || $order->obect->user->note!='')
{{__('texte.orders_arr.show.note')}}: @if($order->note!='') {{ $order->note}}
@endif {{ $order->obect->user->note}}
@endif @if($order->authorised_id!=0)
{{__('texte.orders_arr.show.authorised_by')}}: {{ $order->authorised_user->name}}
@endif

{{__('texte.orders_arr.show.products')}}

@if(!auth()->user()->hasRole('Началник склад')) @if(!auth()->user()->hasRole('Търговски представител') && !!auth()->user()->hasRole('Външен търговски представител')) @endif @endif @foreach($order_products as $index=>$order_product) @if(!auth()->user()->hasRole('Началник склад')) @if(!auth()->user()->hasRole('Търговски представител') && !!auth()->user()->hasRole('Външен търговски представител')) @endif @endif @endforeach
{{strtoupper(__('texte.orders_arr.show.id'))}} {{__('texte.orders_arr.show.name')}} {{__('texte.orders_arr.show.unit_measure')}} {{__('texte.orders_arr.show.ordered_qty')}} {{__('texte.orders_arr.show.prepared_qty')}}{{__('texte.orders_arr.show.price')}} {{__('texte.orders_arr.show.discount')}} {{__('texte.orders_arr.show.single_price')}} {{__('texte.orders_arr.show.super_discount')}}{{__('texte.orders_arr.show.auth_user')}}{{__('texte.orders_arr.show.end_price')}} {{__('texte.orders_arr.show.total_end_price')}}
{{$index+1}} {{$order_product->product}} {{$order_product->name}} {{$order_product->package_name}} {{$order_product->quantity_ordered / ($order_product->package ==1 ? 1 : $order_product->package_count)}} {{$order_product->quantity_processed / ($order_product->package ==1 ? 1 : $order_product->package_count)}}{{Lang::get('texte.full_price_arr')[$order_product->price]}} {{$order_product->discount}} {{number_format(number_format($order_product->single_price*1.2,5,'.','') * ($order_product->package ==1 ? 1 : $order_product->package_count), 5, '.', '')}} {{$order_product->single_price!=0 ? number_format($order_product->super_discount*1.2*($order_product->package ==1 ? 1 : $order_product->package_count),5).' ('.number_format($order_product->super_discount*100/$order_product->single_price,5).'%)' : '0.00000 (0.00000%)'}}{{$order_product->user_name}}{{number_format(number_format($order_product->single_price*1.2,5,'.','') * ($order_product->package ==1 ? 1 : $order_product->package_count) - number_format($order_product->super_discount*1.2*($order_product->package ==1 ? 1 : $order_product->package_count),5), 5, '.', '')}} {{number_format($order_product->quantity_ordered*(number_format($order_product->single_price*1.2,5,'.','') - number_format($order_product->super_discount*1.2,5)), 5, '.', '')}}
@if(!auth()->user()->hasRole('Началник склад'))
{{__('texte.orders_arr.show.end_amount')}}

{{__('texte.orders_arr.show.discounts_amount')}}

{{__('texte.orders_arr.show.transport_amount')}}

{{__('texte.orders_arr.show.total_amount')}}
@endif
@if(count($bonus_products)>0)

{{__('texte.orders_arr.show.gifts')}}

@foreach($bonus_products as $bonus_product) @endforeach
{{strtoupper(__('texte.orders_arr.show.id'))}} {{__('texte.orders_arr.show.name')}} {{__('texte.orders_arr.show.unit_measure')}} {{__('texte.orders_arr.show.quantity')}}
{{$bonus_product->product}} {{$bonus_product->name}} {{$bonus_product->package_name}} {{$bonus_product->quantity_ordered/($bonus_product->package==1 ? 1 : $bonus_product->produkt->package_count)}}
@endif @if(!auth()->user()->hasRole('Началник склад') && count($order->applied_promotions_descriptions)>0)

{{__('texte.orders_arr.show.applied_promotions')}}

@foreach($order->applied_promotions_descriptions as $key=>$applied_promotion) @endforeach
{{__('texte.orders_arr.show.number')}} {{strtoupper(__('texte.orders_arr.show.id'))}} {{__('texte.orders_arr.show.name')}} {{__('texte.orders_arr.show.condition')}} {{__('texte.orders_arr.show.bonus')}}
{{$key+1}} {{$applied_promotion->id}} {{$applied_promotion->title}} {!!$applied_promotion->promotion_description['promotion_condition']!!} {!!$applied_promotion->promotion_description['promotion_bonus']!!}
@endif
@endsection