@extends('vendor.layouts.app') @section('page_title', __('View :x', ['x' => __('Invoice')])) @section('css') @endsection @section('content')
{{-- Notification --}}
{{ __('Order Details') }}
{{ __('Reference') }}
#{{ $order->reference }}

{{ __('Payment Status') }}

{{ $order->payment_status }}
@if(optional($order->paymentMethod)->gateway != null)

{{ __('Payment Method') }} : {{ paymentRenamed(optional($order->paymentMethod)->gateway) }}

@endif @if($order->paid > 0 && !empty(optional($order->transaction)->transaction_date)) @endif

{{ __('General') }}

{{ __('Status') }}

{{ $order->orderStatus->name }}

{{ __('Order Date') }}

{{ $order->order_date }}

{{ __('Customers') }}

{{ optional($order->user)->name ?? __('Guest') }}
@php $shippingAddress = $order->getShippingAddress(); $billingAddress = $order->getBillingAddress(); @endphp

{{ __('Billing Address') }}

{{ __('Name') }}: {{ $billingAddress->first_name }} {{ $billingAddress->last_name }}

{{ __('Email') }}: {{ $billingAddress->email }}

{{ __('Phone') }}: {{ $billingAddress->phone }}

{{ __('Address') }}: {{ $billingAddress->address_1 }} {{ !empty($billingAddress->address_2) ? ", " . $billingAddress->address_2 : '' }}, {{ $billingAddress->city }}

{{ __('Postcode') . "/" . __('ZIP') }}: {{ $billingAddress->zip }}

{{ __('State') }}: {{ $billingAddress->state }}

{{ __('Country') }}: {{ $billingAddress->country }}

{{ __('Shipping Address') }}

{{ __('Name') }}: {{ $shippingAddress->first_name . " " . $shippingAddress->last_name }}

{{ __('Address') }}: {{ $shippingAddress->address_1 }} {{ !empty($shippingAddress->address_2) ? ", " . $shippingAddress->address_2 : '' }}, {{ $shippingAddress->city }}

{{ __('Postcode') . "/" . __('ZIP') }}: {{ $shippingAddress->zip }}

{{ __('State') }}: {{ $shippingAddress->state }}

{{ __('Country') }}: {{ $shippingAddress->country }}

@if(isActive('Shop')) @php $shop = true; @endphp @endif @php $subTotal = 0; $shippingCharge = 0; $tax = 0; $discountAmount = $order->vendorCouponDiscount(); @endphp @foreach ($order->vendorOrderProduct($vendorId, $order->id) as $details) @if(isset($details->shop->name) && isActive('Shop')) @elseif(isset($details->vendor->name)) @endif @php if (isActive('Refund')) { $orderDeliverId = $details->orderStatus->where('order_by', $details->orderStatus->max('order_by'))->first()->id; } $opName = ''; if ($details->payloads != null) { $option = (array)json_decode($details->payloads); $itemCount = count($option); $i = 0; foreach ($option as $key => $value) { $opName .= $key . ': ' . $value . (++$i == $itemCount ? '' : ', '); } } $subTotal += $details->price * $details->quantity; $shippingCharge += $details->shipping_charge; $tax += $details->tax_charge; $productInfo = $orderAction->getProductInfo($details); @endphp @php $totalRefund = $details->refunds()->where('status','Accepted')->sum('quantity_sent') @endphp @endforeach
{{__('')}} {{ __('Products') }} {{ __('SKU') }} {{ __('Status') }} {{ __('Cost') }} {{ __('Qty') }} {{ __('Total') }}
{{ $details->shop->name }}
{{ $details->vendor->name }}
{{ trimWords(optional($details->product)->sku, 10) }} @if ($totalRefund != $details->quantity) @if($details->is_delivery == 1) {{ __('Completed') }} @else @php $orderStatusIds = $orderStatus->pluck('id')->toArray(); $isPresent = in_array($details->order_status_id, $orderStatusIds); $flag = true; @endphp @endif @else {{ __('Refunded') }} @endif {{ formatCurrencyAmount($details->price) }} x {{ floor(formatCurrencyAmount($details->quantity)) }} {{ formatNumber($details->price * $details->quantity, optional($order->currency)->symbol) }}
@if($discountAmount > 0) @endif
{{ __('Sub Total') }} : {{ formatNumber($subTotal, optional($order->currency)->symbol) }}
{{ __('Shipping') }} {{ !is_null($order->shipping_title) ? "( ". $order->shipping_title . " )" : null }} : {{ formatNumber($shippingCharge, optional($order->currency)->symbol) }}
{{ __('Tax') }} : {{ formatNumber($tax, optional($order->currency)->symbol) }}
{{ __('Discount') }} : {{ formatNumber($discountAmount, optional($order->currency)->symbol) }}

{{ __('Grand Total') }} :

{{ formatNumber($subTotal + $shippingCharge + $tax - $discountAmount, optional($order->currency)->symbol) }}
{{ __('Downloadable Product Permission') }}

@php $downloadData = $order->download_data; @endphp @if(is_array($downloadData) && !empty($downloadData)) @foreach ($order->download_data as $key => $data) @if($data['is_accessible'] == 1 && auth()->user()->vendor()->vendor_id == $data['vendor_id'])
{{ __('Download limit') }}
{{ __('Download expiry') }}
{{ __('Customer download link') }}
{{ __('Access') }}
{{ __('Downloaded') }}
{{ __(':x Times', ['x' => $data['download_times']]) }}
@endif @endforeach @endif
{{ __('Order') }} {{ __('Actions') }}
@php $orderDeliverId = $details->orderStatus->where('order_by', $details->orderStatus->max('order_by'))->first()->id; $deliveryDate = $order->deliveryDate($order->id, $orderDeliverId); @endphp @if(!empty($deliveryDate))
{{ __('Delivery Time') }}
{{ __('Delivery date') }}

{{ $deliveryDate }}

@endif @if(count($orderStatusHistories) > 0)
{{ __('Status history') }}
@foreach ($orderStatusHistories->groupBy('product_id') as $product_id => $histories)
{{ trimWords($histories->first()->lineItem->product_name, 25) }}
@foreach ($histories as $history)
{{ __('Order status changed to :x by :y', ['x' => optional($history->orderStatus)->name, 'y' => optional($history->user)->name ?? __('Automatic')]) }} .
{{ $history->format_created_at }}
@endforeach
@endforeach
@endif
{{ __('Note history') }}
@if(count($orderNotes) > 0) @foreach ($orderNotes as $history)
{{ $history->note }}
{{ $history->format_created_at }}
@endforeach @endif
{{ __('Note') }}
{{ __('Create PDF') }}
{{ __('Track Code') }}

{{ __('Track code') }}: {{ isset($order->getMeta()['track_code']) ? $order->getMeta()['track_code'] : __('Unavailable') }}

@endsection @section('js') @endsection