@extends('layouts.app') @section('content')
@include('shared.messages')

{{__('texte.promotions_arr.show.show_promotion')}}

{{__('texte.promotions_arr.show.name')}}: {{ $promotion->title }}
{{__('texte.promotions_arr.show.description')}}: {{ $promotion->description }}
{{__('texte.promotions_arr.show.url')}}: {{ $promotion->url }}
{{__('texte.promotions_arr.show.open_in')}}: {{ $promotion->target==1 ? __('texte.promotions_arr.show.same_window') : __('texte.promotions_arr.show.new_window') }}
{{__('texte.promotions_arr.show.active')}}: {{ $promotion->active == 1 ? __('texte.promotions_arr.show.yes') : __('texte.promotions_arr.show.no') }}
{{__('texte.promotions_arr.show.promotion_visibility')}}: @foreach($storages as $storage) {{in_array($storage->id,$promotion->promotion_visibility) ? $storage->name.',' : ''}} @endforeach {{in_array('repr',$promotion->promotion_visibility) ? __('texte.promotions_arr.show.representative').',' : ''}} {{in_array('ext_repr',$promotion->promotion_visibility) ? __('texte.promotions_arr.show.ext_representative').',' : ''}} {{in_array('clients',$promotion->promotion_visibility) ? __('texte.promotions_arr.show.clients').',' : ''}}
{{__('texte.promotions_arr.show.promotion_validity')}}: {{ $promotion->promotion_validity==1 ? (__('texte.promotions_arr.show.from')." ".date_format(new DateTime($promotion->date_from), 'd.m.Y H:i')." ".__('texte.promotions_arr.show.hrs_to')." ".date_format(new DateTime($promotion->date_to), 'd.m.Y H:i'.__('texte.promotions_arr.show.hrs'))): __('texte.promotions_arr.show.quantity_over').$promotion->promo_number.__('texte.promotions_arr.show.count')}}
{{__('texte.promotions_arr.show.repeatability')}}: {{ $promotion->repeatability==0 ? __('texte.promotions_arr.show.no') : ($promotion->repeatability==1 ? __('texte.promotions_arr.show.daily') : __('texte.promotions_arr.show.weekly'))}}
@if($promotion->repeatability==1)
{{__('texte.promotions_arr.show.every_day')}}: {{ __('texte.promotions_arr.show.from').' '.date('G:i',strtotime($promotion->repeatability_from)).__('texte.promotions_arr.show.to').date('G:i',strtotime($promotion->repeatability_to))}}
@endif @if($promotion->repeatability==2)
{{__('texte.promotions_arr.show.every_days')}}: @foreach(Lang::get('texte.weekdays_arr') as $key => $val) {{in_array($key,$promotion->weekdays)!== false ? $val.',' : ''}} @endforeach
@endif
{{__('texte.promotions_arr.show.count_promotions')}}: {{ $promotion->max_count}}
{{__('texte.promotions_arr.show.promotion_type')}}: {{Lang::get('texte.promotion_types_arr')[$promotion->promotion_type]}}
@if($promotion->promotion_type==1)
{{__('texte.promotions_arr.show.promotion_condition')}}: {{Lang::get('texte.promotion_conditions_arr')[$promotion->condition_type]}}
{{__('texte.promotions_arr.show.package_condition')}}: {{Lang::get('texte.replies_arr')[$promotion->condition_package]}}
{{__('texte.promotions_arr.show.condition_products')}}: @if($promotion->condition_type==1 && $promotion->condition_package==1) @foreach($condition_products as $condition_product)
{{$condition_product['name']}}
@endforeach
{{__('texte.promotions_arr.show.total_value')}} {{number_format($condition_products[0]['f']*1.2,5,'.','')}} {{__('texte.promotions_arr.show.bgn')}}
@else @foreach($condition_products as $condition_product)
{{$condition_product['name']}}{{$promotion->condition_type==1 ? (__('texte.promotions_arr.show.value_of')." ".number_format($condition_product['f']*1.2,5,'.','').__('texte.promotions_arr.show.bgn')) : (' - '.$condition_product['f'].__('texte.promotions_arr.show.count'))}}
@endforeach @endif
{{__('texte.promotions_arr.show.bonus_condition')}}: {{Lang::get('texte.promotion_bonuses_arr')[$promotion->bonus_type]}}
@if($promotion->bonus_type!=1 && $promotion->bonus_type!=2)
{{__('texte.promotions_arr.show.package_bonus')}}: {{Lang::get('texte.replies_arr')[$promotion->bonus_package]}}
@endif @if($promotion->bonus_type==1 || $promotion->bonus_type==2)
{{__('texte.promotions_arr.show.discount')}}: {{$promotion->bonus_type==1 ? ($promotion->bonus_discount.' %') : (number_format($promotion->bonus_discount*1.2,5,'.','').__('texte.promotions_arr.show.bgn'))}}
@else
{{__('texte.promotions_arr.show.bonus_products')}}: @foreach($bonus_products as $bonus_product)
{{$bonus_product['name'].' - '.($promotion->bonus_type==3 ? (number_format($bonus_product['f']*1.2,5,'.','').__('texte.promotions_arr.show.bgn_fixed_price')) : $bonus_product['f'].($promotion->bonus_type==4 ? __('texte.promotions_arr.show.count_gift') : __('texte.promotions_arr.show.percent_discount')))}}
@endforeach
@endif @else @if($promotion->category!=0)
{{__('texte.promotions_arr.show.category')}}: @foreach($categories as $category) @if($category->id==$promotion->category) {{$category->name}} @endif @endforeach
@endif @if($promotion->producer!=0)
{{__('texte.promotions_arr.show.producer')}}: @foreach($producers as $producer) @if($producer->id==$promotion->producer) {{$producer->name}} @endif @endforeach
@if($promotion->mark!=0)
{{__('texte.promotions_arr.show.mark')}}: @foreach($marks as $mark) @if($mark->id==$promotion->mark) {{$mark->name}} @endif @endforeach
@endif @endif @if($promotion->package!=0)
{{__('texte.promotions_arr.show.package')}}: @foreach($packages as $package) @if($package->id==$promotion->package) {{$package->name}} @endif @endforeach
@endif @if($promotion->material!=0)
{{__('texte.promotions_arr.show.material')}}: @foreach($materials as $material) @if($material->id==$promotion->material) {{$material->name}} @endif @endforeach
@endif @if($promotion->price_product!=0)
{{__('texte.promotions_arr.show.product')}}: @foreach($products as $product) @if($product->id==$promotion->price_product) {{$product->name}} @endif @endforeach
@endif
{{__('texte.promotions_arr.show.price')}}: {{Lang::get('texte.price_arr')[$promotion->price]}}
{{$promotion->price==4 ? __('texte.promotions_arr.show.fixed_price') : __('texte.promotions_arr.show.discount').':'}} {{$promotion->price==4 ? (number_format($promotion->fixed_price*1.2,5,'.','')) : ($promotion->discount.'%')}}
@if(isset($promotion->condition))
{{__('texte.promotions_arr.show.condition')}}: {{__('texte.promotions_arr.show.reaching').number_format($promotion->condition*1.2,5,'.','').__('texte.promotions_arr.show.bgn_last').$promotion->cond_period.__('texte.promotions_arr.show.days').($promotion->price==4 ? (__('texte.promotions_arr.show.fixed_price_becomes').number_format($promotion->cond_fixed_price*1.2,5,'.','').__('texte.promotions_arr.show.bgn')) : (__('texte.promotions_arr.show.discount_becomes').$promotion->cond_discount.' %'))}}
@endif @endif
{{__('texte.promotions_arr.show.promotion')}}: {!!$promotion_description!!}
@foreach ($promotion->images as $image)
{{$image->title}}
@endforeach
@endsection