@extends('layouts.vendor') @section('content') @php $note = DB::table('vendor_orders') ->where('order_number', $order->order_number) ->first(); @endphp

{{ $langg->lang601 }}

{{ $langg->lang588 }} : {{ sprintf("%'.08d", $order->id) }}
{{ $langg->lang589 }} : {{ date('d-M-Y',strtotime($order->created_at)) }}
{{ $langg->lang590 }} : {{ $order->order_number }}
@if($order->dp == 0) {{ $langg->lang602 }} : @if($order->shipping == "pickup") {{ $langg->lang603 }} @else {{ $langg->lang604 }} @endif
@endif {{ $langg->lang605 }} : {{$order->method}}
@if($order->dp == 0)

{{ $langg->lang606 }}

{{ $langg->lang557 }}: {{ $order->shipping_name == null ? $order->customer_name : $order->shipping_name}}
{{ $langg->lang560 }}: {{ $order->shipping_address == null ? $order->customer_address : $order->shipping_address }}
{{ $langg->lang562 }}: {{ $order->shipping_city == null ? $order->customer_city : $order->shipping_city }}
{{ $langg->lang561 }}: {{ $order->shipping_country == null ? $order->customer_country : $order->shipping_country }}
@endif

{{ $langg->lang587 }}

{{ $langg->lang557 }}: {{ $order->customer_name}}
{{ $langg->lang560 }}: {{ $order->customer_address }}
{{ $langg->lang562 }}: {{ $order->customer_city }}
{{ $langg->lang561 }}: {{ $order->customer_country }}
@php $subtotal = $gs->delivery_pay; $data = 0; $tax = 0; @endphp @if(isset($cart->items)) @foreach($cart->items as $product) @if($product['item']['user_id'] != 0) @if($product['item']['user_id'] == $user->id) @if($order->is_api) @else @endif @php if($order->is_api){ $subtotal += round($note->price * $order->currency_value, 2); }else{ $subtotal += round($product['price'] * $order->currency_value, 2); } @endphp @endif @endif @endforeach @endif @if(isset($cart['items'])) @foreach($cart['items'] as $prod) @php $subtotal += round($prod['price'] * $order->currency_value, 2); @endphp @endforeach @endif @if(Auth::user()->id == $order->vendor_shipping_id) @if($order->shipping_cost != 0) @php $price = round(($order->shipping_cost / $order->currency_value),2); @endphp @if(DB::table('shippings')->where('price','=',$price)->count() > 0) @endif @endif @endif @if(Auth::user()->id == $order->vendor_packing_id) @if($order->packing_cost != 0) @php $pprice = round(($order->packing_cost / $order->currency_value),2); @endphp @if(DB::table('packages')->where('price','=',$pprice)->count() > 0) @endif @endif @endif @if($order->tax != 0) @php $tax = ($subtotal / 100) * $order->tax; $subtotal = $subtotal + $tax; @endphp @endif
{{ $langg->lang591 }} {{ $langg->lang539 }} {{ $langg->lang600 }}
@if($product['item']['user_id'] != 0) @php $user = App\Models\User::find($product['item']['user_id']); @endphp @if(isset($user)) {{ $product['item']['name']}} @else {{$product['item']['name']}} @endif @else {{ $product['item']['name']}} @endif @if($product['size'])

{{ $langg->lang312 }} : {{str_replace('-',' ',$product['size'])}}

@endif {{-- Se corrige error de string a array en color --}} @if($product['color'])

{{ $langg->lang313 }} :

@endif @if($order->is_api)

{{ $langg->lang754 }} : {{$order->currency_sign}}{{ round($note->price / $note->qty * $order->currency_value , 2) }}

@else

{{ $langg->lang754 }} : {{$order->currency_sign}}{{ round($product['item']['price'] * $order->currency_value , 2) }}

@endif @if($order->is_api)

{{ $langg->lang595 }} : {{$note->qty}} {{ $product['item']['measure'] }}

@else

{{ $langg->lang595 }} : {{$product['qty']}} {{ $product['item']['measure'] }}

@endif @if(!empty($product['keys'])) @foreach( array_combine(explode(',', $product['keys']), explode(',', $product['values'])) as $key => $value)

{{ ucwords(str_replace('_', ' ', $key)) }} : {{ $value }}

@endforeach @endif
{{$order->currency_sign}}{{ round($note->price * $order->currency_value , 2) }}{{$order->currency_sign}}{{ round($order->pay_amount * $order->currency_value , 2) }}
{{__('Costo de Envío')}} ${{ $gs->delivery_pay}}
@if($prod['item']['user_id'] != 0) @php $user = App\Models\User::find($prod['item']['user_id']); @endphp @if(isset($user)) {{ $prod['item']['name']}} @else {{$prod['item']['name']}} @endif @else {{ $prod['item']['name']}} @endif @if($prod['size']) @php $clave = array_search(round($prod['price'] * $order->currency_value / $order->totalQty,2), $prod['item']['size_price']); @endphp @if(isset($clave))

{{ $langg->lang312 }} : {{$prod['item']['size'][$clave]}}

@else

{{ $langg->lang312 }} : {{str_replace('-',' ',$prod['size'])}}

@endif @endif {{-- Se corrige error de string a array en color --}} @if($prod['color'])

{{ $langg->lang313 }} :

@endif

{{ $langg->lang754 }} : {{$order->currency_sign}}{{ round($prod['item']['price'] * $order->currency_value , 2) }}

{{ $langg->lang595 }} : {{$prod['qty']}} {{ $prod['item']['measure'] }}

@if(!empty($prod['keys'])) @foreach( array_combine(explode(',', $prod['keys']), explode(',', $prod['values'])) as $key => $value)

{{ ucwords(str_replace('_', ' ', $key)) }} : {{ $value }}

@endforeach @endif
{{$order->currency_sign}}{{ round($prod['price'] * $order->currency_value , 2) }}
{{__('Costo de Envío')}} ${{ $gs->delivery_pay}}
{{ $langg->lang597 }} {{$order->currency_sign}}{{ round($subtotal, 2) }}
{{ DB::table('shippings')->where('price','=',$price)->first()->title }}({{$order->currency_sign}}) {{ round($order->shipping_cost , 2) }}
{{ DB::table('packages')->where('price','=',$pprice)->first()->title }}({{$order->currency_sign}}) {{ round($order->packing_cost , 2) }}
{{ $langg->lang599 }}({{$order->currency_sign}}){{round($tax, 2)}}
{{ $langg->lang600 }} {{$order->currency_sign}}{{ round(($subtotal + $data), 2) }}
@endsection