@extends('admin.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') }}

{{ __('Order Date') }}

{{ __('Status') }}

@if($order->is_delivery == 1) {{ __('Completed') }} @else @endif

{{ __('Customers') }}

@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 @foreach ($orderDetails as $details) @if (!is_null($details[0]->vendor_id)) @endif @foreach ($details as $detail) @php if (isActive('Refund')) { $orderDeliverId = \App\Models\Order::getFinalOrderStatus(); } $opName = ''; if ($detail->payloads != null) { $option = (array)json_decode($detail->payloads); $itemCount = count($option); $i = 0; foreach ($option as $key => $value) { $opName .= $key . ': ' . $value . (++$i == $itemCount ? '' : ', '); } } $productInfo = $orderAction->getProductInfo($detail); @endphp @php $totalRefund = $detail->refunds()->where('status','Accepted')->sum('quantity_sent') @endphp @if ($detail->isRefundable() && preference('order_refund')) @endif @endforeach @endforeach
{{__('')}} {{ __('Products') }} {{ __('SKU') }} {{ __('Status') }} {{ __('Cost') }} {{ __('Qty') }} {{ __('Total') }} {{ __('Refund') }}
{{ optional($details[0]->vendor)->name }}
{{ trimWords(optional($detail->product)->sku, 10) }} @if ($totalRefund != $detail->quantity) @if($detail->is_delivery == 1) {{ __('Completed') }} @else @endif @else {{ __('Refunded') }} @endif {{ formatCurrencyAmount($detail->price) }} x {{ floor(formatCurrencyAmount($detail->quantity)) }} {{ formatNumber($detail->price * $detail->quantity, optional($order->currency)->symbol) }} @if ($detail->is_delivery == 1 && $totalRefund != $detail->quantity) quantity - $totalRefund }}>{{ __('Apply') }} @endif
@if($order->other_discount_amount > 0 && isActive('Coupon')) @endif
{{ __('Sub Total') }} : {{ formatNumber(($order->total + $order->other_discount_amount) - ($order->shipping_charge + $order->tax_charge), optional($order->currency)->symbol) }}
{{ __('Shipping') }} {{ !is_null($order->shipping_title) ? "( ". $order->shipping_title . " )" : null }} : {{ formatNumber($order->shipping_charge, optional($order->currency)->symbol) }}
{{ __('Tax') }} : {{ formatNumber($order->tax_charge, optional($order->currency)->symbol) }}
{{ __('Discount') }} : {{ formatNumber($order->other_discount_amount, optional($order->currency)->symbol) }}

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

{{ formatNumber($order->total, 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)
{{ __('Download limit') }}
{{ __('Download expiry') }}
{{ __('Customer download link') }}
{{ __('Access') }}
{{ __('Downloaded') }}
{{ __(':x Times', ['x' => $data['download_times']]) }}
@endif @endforeach @endif
{{ __('Order') }} {{ __('Actions') }}
@php $orderDeliverId = \App\Models\Order::getFinalOrderStatus(); $deliveryDate = $order->deliveryDate($order->id, $orderDeliverId); @endphp @if(!empty($deliveryDate))
{{ __('Delivery Time') }}
{{ __('Delivery date') }}
@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