@extends('layouts.app') @section('link') @endsection @section('content')

{{__('texte.promotions_arr.edit.change_promotion')}}

{{ method_field('PATCH') }} {{ csrf_field() }}
@if ($errors->has('title')) {{ $errors->first('title') }} @endif
@if ($errors->has('descirption')) {{ $errors->first('description') }} @endif
@if ($errors->has('active')) {{ $errors->first('active') }} @endif
@foreach ($storages as $storage)
@endforeach
@if ($errors->has('promotion_validity')) {{ $errors->first('promotion_validity') }} @endif
@if ($errors->has('date_from')) {{ $errors->first('date_from') }} @endif
@if ($errors->has('date_to')) {{ $errors->first('date_to') }} @endif
@if ($errors->has('repeatability_from')) {{ $errors->first('repeatability_from') }} @endif @if ($errors->has('date_to')) {{ $errors->first('repeatability_to') }} @endif
@foreach (__('texte.weekdays_arr') as $key => $val)
@endforeach @if ($errors->has('validity')) {{ $errors->first('weekdays') }} @endif
@if ($errors->has('max_count')) {{ $errors->first('max_count') }} @endif
@if ($errors->has('promotion_type')) {{ $errors->first('promotion_type') }} @endif
@if ($errors->has('type')) {{ $errors->first('condition_type') }} @endif
@if ($errors->has('type')) {{ $errors->first('condition_package') }} @endif
@if ($errors->has('condition_category')) {{ $errors->first('condition_category') }} @endif
@if ($errors->has('condition_supplier')) {{ $errors->first('condition_supplier') }} @endif
@if(is_array($promotion->condition_products) && count($promotion->condition_products)>0)
@if($promotion->condition_type==1) @if($promotion->condition_package==1) @foreach($promotion->condition_products as $condition_product) @endforeach @else @foreach($promotion->condition_products as $condition_product) @endforeach @endif @else @foreach($promotion->condition_products as $condition_product) @endforeach @endif
{{$condition_product['name']}}
{{__('texte.promotions_arr.edit.package_amount')}}
{{$promotion->condition_type==1 ? 'Сума' : 'Брой'}} {{$condition_product['name']}}
{{$promotion->condition_type==1 ? __('texte.promotions_arr.edit.amount') : __('texte.promotions_arr.edit.count') }} {{$condition_product['name']}}
@endif
@if ($errors->has('type')) {{ $errors->first('bonus_type') }} @endif
bonus_type==1 || $promotion->bonus_type==2 ? "hidden" : ""}}>
@if ($errors->has('bonus_package')) {{ $errors->first('bonus_package') }} @endif
@if ($errors->has('bonus_category')) {{ $errors->first('bonus_category') }} @endif
@if ($errors->has('bonus_supplier')) {{ $errors->first('bonus_supplier') }} @endif
@if(is_array($promotion->bonus_products) && count($promotion->bonus_products)>0)
@if($promotion->bonus_type==1 || $promotion->bonus_type==2) @foreach($promotion->bonus_products as $bonus_product) @endforeach @else @foreach($promotion->bonus_products as $bonus_product) @endforeach @endif
{{$bonus_product['name']}}
{{Lang::get('texte.promotion_bonuses_arr')[$promotion->bonus_type]}} {{$bonus_product['name']}}
@endif
bonus_type!=1 && $promotion->bonus_type!=2 ? "hidden" : ""}}>
@if ($errors->has('bonus_discount')) {{ $errors->first('bonus_discount') }} @endif
@if ($errors->has('category')) {{ $errors->first('category_id') }} @endif
@if ($errors->has('supplier')) {{ $errors->first('supplier_id') }} @endif
@if ($errors->has('price')) {{ $errors->first('price') }} @endif
@if ($errors->has('discount')) {{ $errors->first('discount') }} @endif
@if ($errors->has('condition')) {{ $errors->first('condition') }} @endif
@if ($errors->has('cond_period')) {{ $errors->first('cond_period') }} @endif
@if ($errors->has('cond_discount')) {{ $errors->first('cond_discount') }} @endif
@endsection