@php $order = $data->order ?? $data; $shop = $order->shop; $logo_path = isset($shop->logoImage) ? Storage::path($shop->logoImage->path) : null; // $stamp_path = Storage::path($shop->stampImage->path); $payment_instructions = null; if (optional($order->paymentMethod)->type == \App\Models\PaymentMethod::TYPE_MANUAL) { if (vendor_get_paid_directly()) { $payment_method = $order->shop->config->manualPaymentMethods->where('id', $order->payment_method_id)->first(); $payment_instructions = optional($payment_method)->pivot->payment_instructions; } else { $payment_instructions = get_from_option_table('wallet_payment_instructions_' . $order->paymentMethod->code); } } @endphp
@lang('invoice.invoice')
@lang('invoice.invoice'): {{ $order->order_number }}
@lang('invoice.date'): {{ $order->created_at->format('d/m/y') }}
@lang('invoice.time'): {{ $order->created_at->format('h:i A') }}
@lang('invoice.from')
@if (isset($order->shop->name) && !empty($order->shop->name)) {{ $order->shop->name }}
@endif @if (isset($order->shop->address->address_line_1) && !empty($order->shop->address->address_line_1)) {{ $order->shop->address->address_line_1 }}
@endif @if (isset($order->shop->address->address_line_2) && !empty($order->shop->address->address_line_2)) {{ $order->shop->address->address_line_2 }}
@endif @if (isset($order->shop->address->city->name) && !empty($order->shop->address->city->name)) {{ $order->shop->address->city->name }}
@endif @if (isset($order->shop->address->state->name) && !empty($order->shop->address->state->name)) {{ $order->shop->address->state->name }}
@endif @if (isset($order->shop->address->country->name) && !empty($order->shop->address->country->name)) {{ $order->shop->address->country->name }}
@endif
@lang('invoice.to')
{{ $order->customer->name }}
{{ $order->customer->email }}
{{ $order->customer->phone }}
@php $total_price = 0; @endphp @foreach ($order->inventories as $item) @php $total_price += $item->pivot->unit_price * $item->pivot->quantity; @endphp @endforeach
@lang('app.description') @lang('app.quantity') @lang('app.price') @lang('app.total')
{{ $item->title }} {{ $item->pivot->quantity }} {{ get_formated_currency($item->pivot->unit_price, 2) }} {{ get_formated_currency($item->pivot->unit_price * $item->pivot->quantity, 2) }}
@lang('app.total') {{ get_formated_currency($total_price, 2) }}
@lang('app.tax') {{ get_formated_currency($order->taxes, 2) }}
@lang('app.shipping') {{ get_formated_currency($order->shipping, 2) }}
@lang('app.grand_total') {{ get_formated_currency($order->grand_total, 2) }}
@lang('invoice.payment_status'): {{ $order->paymentStatusName(true) }}
@lang('invoice.payment_method'):{{ $order->paymentMethod->name }}
@if (optional($order->paymentMethod)->type == \App\Models\PaymentMethod::TYPE_MANUAL) @if ($payment_instructions) @lang('invoice.payment_instruction'):
{!! $payment_instructions !!}
@endif @if (isset($payment_method) && optional($payment_method)->pivot->additional_details) @lang('invoice.additional_info')
{{ optional($payment_method)->pivot->additional_details }} @endif @else {{ $order->paymentMethod->instructions }} @endif