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

{{__('texte.orders_arr.create_combined.create_order')}}

{{ csrf_field() }} @permission('order-form-storage-read')
@if ($errors->has('storage')) {{ $errors->first('storage') }} @endif
@endpermission @permission('order-form-source-read')
@foreach(Lang::get('texte.source_type_arr') as $key => $value) @endforeach @if ($errors->has('source')) {{ $errors->first('source') }} @endif
@endpermission @permission('order-form-contragent-read')
@if ($errors->has('client')) {{ $errors->first('client') }} @endif
@endpermission @permission('order-form-object-read')
@if ($errors->has('object')) {{ $errors->first('object') }} @endif
@endpermission
{{__('texte.orders_arr.create.contacts')}}
Телефон:{{$order->obect->user->phone}}
Мобилен телефон:{{$order->obect->user->mobile}}
и-мейл:{{$order->obect->user->email}}
{{$order->obect->user->note}}
@if($order->obect->spokesman_id!=null && $order->obect->spokesman_id!=0) {{__('texte.orders_arr.edit.sales_representative')}}
{{$order->obect->spokesman->name}}
{{$order->obect->spokesman->mobile}}
{{$order->obect->spokesman->email}} @endif
@permission('order-form-payment_type-read')
@if ($errors->has('payment_type')) {{ $errors->first('payment_type') }} @endif
@endpermission @permission('order-form-delivery_date-read')
@if ($errors->has('delivery_date')) {{ $errors->first('delivery_date') }} @endif
@endpermission @permission('order-form-payment_date-read')
@if ($errors->has('payment_date')) {{ $errors->first('payment_date') }} @endif
@endpermission @permission('order-form-type-read')
@if ($errors->has('type')) {{ $errors->first('type') }} @endif
@endpermission @permission('order-form-urgent-read')
urgent)==1 ? 'checked' : ''}} /> @if ($errors->has('urgent')) {{ $errors->first('urgent') }} @endif
@endpermission @permission('order-form-note-read')
@if ($errors->has('note')) {{ $errors->first('note') }} @endif
@endpermission @permission('order-form-due_amount-read')
@endpermission @permission('order-form-due_wrappage-read')
@endpermission @permission('order-form-credit_limit-read')
@endpermission @permission('order-form-overdue_amount-read')
@endpermission
@foreach($orders as $current_order)
{{__('texte.orders_arr.create_combined.order')}} {{__('texte.orders_arr.create_combined.delivery_date')}} {{__('texte.orders_arr.create_combined.urgent')}} {{__('texte.orders_arr.create_combined.source')}} {{__('texte.orders_arr.create_combined.user')}} {{__('texte.orders_arr.create_combined.actions')}}
{{$current_order->id}} {{date_format(new DateTime($current_order->delivery_date), 'd.m.Y')}} {{Lang::get('texte.replies_arr')[$current_order->urgent]}} {!!Lang::get('texte.source_type_arr')[$current_order->source]!!} {{$current_order->user->name}} @if($current_order->source<4) {{__('texte.orders_arr.create_combined.change')}} @endif {{__('texte.orders_arr.create_combined.turn_off')}} {{__('texte.orders_arr.create_combined.delete')}}
{{__('texte.orders_arr.create_combined.selected_products')}}
@foreach($current_order->order_products as $order_product) @endif @endforeach
{{strtoupper(__('texte.orders_arr.create_combined.id'))}} {{__('texte.orders_arr.create_combined.name')}} {{__('texte.orders_arr.create_combined.unit_measure')}} {{__('texte.orders_arr.create_combined.quantity')}} {{__('texte.orders_arr.create_combined.price')}} {{__('texte.orders_arr.create_combined.value_1')}} {{__('texte.orders_arr.create_combined.discount')}} {{__('texte.orders_arr.create_combined.single_price')}} {{__('texte.orders_arr.create_combined.super_discount')}} {{__('texte.orders_arr.create_combined.end_price')}}
{{$order_product->product}} {{$order_product->name}} {{$order_product->package_name}} {{$order_product->quantity_ordered / ($order_product->package ==1 ? 1 : $order_product->package_count) }} {{Lang::get('texte.full_price_arr')[$order_product->price]}} @if($order_product->price!=5 && $order_product->price!=6) {{number_format(($order_product->price==1 ? $order_product->price_supply : ($order_product->price==2 ? $order_product->price_recommend : $order_product->price_base))*1.2*($order_product->package ==1 ? 1 : $order_product->package_count),5)}}{{$order_product->discount}} {{number_format($order_product->single_price*1.2*($order_product->package ==1 ? 1 : $order_product->package_count), 5, '.', '')}} {{number_format($order_product->super_discount*1.2*($order_product->package ==1 ? 1 : $order_product->package_count),5).($order_product->single_price!=0 ? ' ('.number_format($order_product->super_discount*100/$order_product->single_price,5).'%)' : '(-----)')}} {{number_format(($order_product->quantity_ordered / ($order_product->package ==1 ? 1 : $order_product->package_count))*(number_format($order_product->single_price*($order_product->package ==1 ? 1 : $order_product->package_count)*1.2,5)-number_format($order_product->super_discount*1.2*($order_product->package ==1 ? 1 : $order_product->package_count),5)), 5, '.', '')}}
{{__('texte.orders_arr.create_combined.total_amount')}}

{{__('texte.orders_arr.create_combined.total_discounts')}}

{{__('texte.orders_arr.create_combined.final_amount')}}
@if(count($current_order->bonus_products)>0)
{{__('texte.orders_arr.create_combined.bonuses')}}
@foreach($current_order->bonus_products as $bonus_product) @endforeach
{{strtoupper(__('texte.orders_arr.create_combined.id'))}} {{__('texte.orders_arr.create_combined.name')}} {{__('texte.orders_arr.create_combined.unit_measure')}} {{__('texte.orders_arr.create_combined.quantity')}}
{{$bonus_product->product}} {{$bonus_product->name}} {{$bonus_product->package_name}} {{$bonus_product->quantity_ordered}}
@endif
@if(count($current_order->applied_promotions_descriptions)>0)
{{__('texte.orders_arr.create_combined.applied_promotions')}}
@foreach($current_order->applied_promotions_descriptions as $key=>$applied_promotion) @endforeach
{{__('texte.orders_arr.create_combined.number')}} {{strtoupper(__('texte.orders_arr.create_combined.id'))}} {{__('texte.orders_arr.create_combined.name')}} {{__('texte.orders_arr.create_combined.condition')}} {{__('texte.orders_arr.create_combined.bonus')}}
{{$key+1}} {{$applied_promotion->id}} {{$applied_promotion->title}} {!!$applied_promotion->promotion_description['promotion_condition']!!} {!!$applied_promotion->promotion_description['promotion_bonus']!!}
@endif
@endforeach
{{__('texte.orders_arr.create_combined.combined_orders_total_amount')}}

{{__('texte.orders_arr.create_combined.combined_orders_total_discounts')}}

{{__('texte.orders_arr.create_combined.combined_orders_final_amount')}}
@if(min(array_column($orders,'quantities_reserved')) > 0)

{{__('texte.orders_arr.create_combined.add_products')}}

@permission('order-form-product-read')
@if ($errors->has('product')) {{ $errors->first('product') }} @endif
{{__('texte.orders_arr.create_combined.search_product_window')}}
{{__('texte.orders_arr.create_combined.filter_products_window')}}
@endpermission @endif


{{__('texte.orders_arr.create_combined.total_amount')}}

{{__('texte.orders_arr.create_combined.total_discounts')}}

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

{{__('texte.orders_arr.create_combined.final_amount')}}
@if(min(array_column($orders,'quantities_reserved')) > 0) @endif @if(min(array_column($orders,'quantities_reserved')) > 0) @endif
@endsection