@extends('layouts.app') @section('content')
{{__('texte.orders_arr.show.client')}}: {{ $order->object->client->name }}
{{__('texte.orders_arr.show.object')}}: {{ $order->object->name }}
{{__('texte.orders_arr.show.storage')}}: {{ $order->storage->name }}
{{__('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')}}: {{ $order->payment_type==0 ? __('texte.orders_arr.show.cash') : __('texte.orders_arr.show.bank_transfer') }}
{{__('texte.orders_arr.show.user')}}: {{ $order->user->name}}
{{__('texte.orders_arr.show.status')}}: {{ __('texte.order_status_arr')[$order->status]}}

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

@foreach($order_products->where('gift',0) as $index=>$order_product) @endforeach
{{strtoupper(__('texte.orders_arr.show.id'))}} {{__('texte.orders_arr.show.name')}} {{__('texte.orders_arr.show.measure')}} {{__('texte.orders_arr.show.quantity')}} {{__('texte.orders_arr.show.price')}} {{__('texte.orders_arr.show.discount')}} {{__('texte.orders_arr.show.single_price')}} {{__('texte.orders_arr.show.value')}}
{{$index+1}} {{$order_product->product_id}} {{$order_product->product_name}} {{$order_product->measure==1 ? $order_product->package_name : __('texte.orders_arr.show.count')}} {{$order_product->quantity_ordered / ($order_product->measure==1 ? $order_product->package_count : 1)}} {{__('texte.price_types_arr_human')[$order_product->price]}} {{$order_product->discount}} {{number_format(number_format($order_product->single_price*1.2,5,'.','') * ($order_product->measure==1 ? $order_product->package_count : 1), 5, '.', '')}} {{number_format($order_product->quantity_ordered*$order_product->single_price*1.2, 5, '.', '')}}
{{__('texte.orders_arr.show.total_amount')}}
@if(count($order_products->where('gift',1))>0)

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

@foreach($order_products->where('gift',1) as $bonus_product) @endforeach
{{strtoupper(__('texte.orders_arr.show.id'))}} {{__('texte.orders_arr.show.name')}} {{__('texte.orders_arr.show.measure')}} {{__('texte.orders_arr.show.quantity')}}
{{$bonus_product->product_id}} {{$bonus_product->product_name}} {{$order_product->measure==1 ? $order_product->package_name : __('texte.orders_arr.show.count')}} {{$bonus_product->quantity_ordered}}
@endif @if(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