@extends('layouts.vendor') @section('content')

@lang('Order Invoice')

@lang('Genius Shop')

@lang('Print Order')
@php $price = $order ->vendororders() ->where('user_id', '=', $user->id) ->sum('price'); if ($order->is_shipping == 1) { $vendor_shipping = json_decode($order->vendor_shipping_id); $user_id = auth()->id(); // shipping cost $shipping_id = $vendor_shipping->$user_id; $shipping = App\Models\Shipping::findOrFail($shipping_id); if ($shipping) { $price = $price + round($shipping->price * $order->currency_value, 2); } // packaging cost $vendor_packing_id = json_decode($order->vendor_packing_id); $packing_id = $vendor_packing_id->$user_id; $packaging = App\Models\Package::findOrFail($packing_id); if ($packaging) { $price = $price + round($packaging->price * $order->currency_value, 2); } } @endphp
@lang('Order Details')
  • @lang('Invoice Number :') {{ $order->order_number }}
  • @lang('Order Date :') {{ date('d-M-Y H:i:s a', strtotime($order->created_at)) }}
  • @if (isset($shipping))
  • @lang('Shipping Method :') {{ $shipping->title }} | {{ \PriceHelper::showOrderCurrencyPrice($shipping->price * $order->currency_value, $order->currency_sign) }}
  • @endif @if (isset($packaging))
  • @lang('Packaging Method :') {{ $packaging->title }} | {{ \PriceHelper::showOrderCurrencyPrice($packaging->price * $order->currency_value, $order->currency_sign) }}
  • @endif
  • @lang('Payment Method :') {{ $order->method }}
  • @lang('Transaction ID :') {{ $order->txnid ?? '--' }}
  • @lang('Payment Status :') @if ($order->payment_status == 'Pending') @lang('Unpaid') @else @lang('Paid') @endif
@lang('Billing Address')
  • {{ $order->customer_name }}
  • @if ($order->customer_address)
  • {{ $order->customer_address }}
  • @endif
  • {{ $order->customer_phone }}
  • {{ $order->customer_email }}
@if ($order->dp == 0)
@lang('Shipping Address')
    @if ($order->shipping == 'pickup')
  • @lang('Pickup Location :') {{ $order->pickup_location }}
  • @else
  • {{ $order->shipping_name == null ? $order->customer_name : $order->shipping_name }}
  • @if ($order->shipping_address != null || $order->customer_address != null )
  • {{ $order->shipping_address == null ? $order->customer_address : $order->shipping_address }}
  • @endif
  • {{ $order->shipping_phone == null ? $order->customer_phone : $order->shipping_phone }}
  • {{ $order->shipping_email == null ? $order->customer_email : $order->shipping_email }}
  • @endif
@endif

@lang('Products Ordered')

@php $subtotal = 0; $data = 0; $tax = 0; @endphp @foreach ($cart['items'] as $key => $product) @if ($product['item']['user_id'] != 0) @if ($product['item']['user_id'] == $user->id) @php $subtotal += round($product['price'] * $order->currency_value, 2); @endphp @endif @endif @endforeach
@lang('Product Title') @lang('Details') @lang('Total Price')
@if ($product['item']['user_id'] != 0) @php $user = App\Models\User::find($product['item']['user_id']); @endphp @if (isset($user)) {{ mb_strlen($product['item']['name'], 'UTF-8') > 30 ? mb_substr($product['item']['name'], 0, 30, 'UTF-8') . '...' : $product['item']['name'] }} @else {{ mb_strlen($product['item']['name'], 'UTF-8') > 30 ? mb_substr($product['item']['name'], 0, 30, 'UTF-8') . '...' : $product['item']['name'] }} @endif @endif @if ($product['license'] != '') {{ __('View License') }} @endif
@if ($product['size'])
@lang('Size :') {{ str_replace('-', '', $product['size']) }}
@endif @if ($product['color'])
{{ __('Color') }} :
@endif
@lang('Price :') {{ \PriceHelper::showOrderCurrencyPrice($product['item_price'] * $order->currency_value, $order->currency_sign) }}
@lang('Qty :') {{ $product['qty'] }} {{ $product['item']['measure'] }}
@if (!empty($product['keys'])) @foreach (array_combine(explode(',', $product['keys']), explode(',', $product['values'])) as $key => $value)
{{ ucwords(str_replace('_', ' ', $key)) }} : {{ $value }}
@endforeach @endif
{{ \PriceHelper::showOrderCurrencyPrice($product['price'] * $order->currency_value, $order->currency_sign) }} {{ $product['discount'] == 0 ? '' : '(' . $product['discount'] . '% ' . __('Off') . ')' }}
@endsection