@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.active')}}: {{ $promotion->active == 1 ? __('texte.promotions_arr.show.yes') : __('texte.promotions_arr.show.no') }}
{{__('texte.promotions_arr.show.promotion_visibility')}}: @foreach($storages as $storage) {{strpos($promotion->promotion_visibility, ','.$storage->id.',') !== false ? $storage->name.',' : ''}} @endforeach
{{__('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')." ".__('texte.promotions_arr.show.to')." ".date_format(new DateTime($promotion->date_to), 'd.m.Y')) : __('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) {{strpos($key,$promotion->weekdays)!== false ? $val.',' : ''}} @endforeach
@endif
{{__('texte.promotions_arr.show.count_promotions')}}: {{ $promotion->max_count}}
{{__('texte.promotions_arr.show.promotion_type')}}: {{$promotion->promotion_type==1 ? __('texte.promotions_arr.show.bonus') : __('texte.promotions_arr.show.price_formation')}}
@if($promotion->promotion_type==1)
{{__('texte.promotions_arr.show.promotion_condition')}}: {{$promotion->condition_type==1 ? __('texte.promotions_arr.show.amount') : __('texte.promotions_arr.show.counts')}}
{{__('texte.promotions_arr.show.package_condition')}}: {{$promotion->condition_package==1 ? __('texte.promotions_arr.show.yes') : __('texte.promotions_arr.show.no')}}
{{__('texte.promotions_arr.show.condition_products')}}: @if($promotion->condition_type==1 && $promotion->condition_package==1) @foreach($promotion->condition_products as $condition_product)
{{$condition_product['name']}}
@endforeach
{{__('texte.promotions_arr.show.total_value')}} {{number_format($promotion->condition_products[0]['f']*1.2,5,'.','')}} {{__('texte.promotions_arr.show.bgn')}}
@else @foreach($promotion->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')}}: {{$promotion->bonus_package==1 ? __('texte.promotions_arr.show.yes') : __('texte.promotions_arr.show.no')}}
@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($promotion->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_id!=0)
{{__('texte.promotions_arr.show.category')}}: @foreach($categories as $category) @if($category->id==$promotion->category_id) {{$category->name}} @endif @endforeach
@endif @if($promotion->supplier_id!=0)
{{__('texte.promotions_arr.show.supplier')}}: @foreach($suppliers as $supplier) @if($supplier->id==$promotion->supplier_id) {{$supplier->name}} @endif @endforeach
@endif @if($promotion->package_id!=0)
{{__('texte.promotions_arr.show.package')}}: @foreach($packages as $package) @if($package->id==$promotion->package_id) {{$package->name}} @endif @endforeach
@endif @if($promotion->product_id!=0)
{{__('texte.promotions_arr.show.product')}}: @foreach($products as $product) @if($product->id==$promotion->product_id) {{$product->name}} @endif @endforeach
@endif
{{__('texte.promotions_arr.show.price')}}: {{__('texte.price_types_arr_human')[$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->promotion_description!!}
@foreach ($promotion->images as $image)
{{$image->title}}
@endforeach
@endsection