@php use Carbon\Carbon; @endphp @php use HiEvents\Helper\Currency; @endphp @php use HiEvents\DomainObjects\Status\InvoiceStatus; @endphp @php /** @var \HiEvents\DomainObjects\EventDomainObject $event */ @endphp @php /** @var \HiEvents\DomainObjects\EventSettingDomainObject $eventSettings */ @endphp @php /** @var \HiEvents\DomainObjects\OrderDomainObject $order */ @endphp @php /** @var \HiEvents\DomainObjects\InvoiceDomainObject $invoice */ @endphp @php $isPaid = $invoice->getStatus() === InvoiceStatus::PAID->name; $isVoid = $invoice->getStatus() === InvoiceStatus::VOID->name; @endphp {{ $eventSettings->getInvoiceLabel() ?? __('Invoice') }} #{{ $invoice->getInvoiceNumber() }}

{{ $eventSettings->getInvoiceLabel() ?? __('Invoice') }}

{{ $event->getTitle() }}

{{ $eventSettings->getOrganizationName() }}
{!! $eventSettings->getOrganizationAddress() !!}
@if($eventSettings->getSupportEmail())
{{ $eventSettings->getSupportEmail() }}
@endif
@if(!$isPaid && $invoice->getDueDate()) @endif
{{ __('Invoice Number') }} #{{ $invoice->getInvoiceNumber() }} {{ __('Date Issued') }} {{ Carbon::parse($invoice->getIssueDate())->format('d/m/Y') }} {{ __('Due Date') }} {{ Carbon::parse($invoice->getDueDate())->format('d/m/Y') }} @if($isPaid) {{ __('Amount Paid') }} @else {{ __('Amount Due') }} @endif {{ Currency::format($order->getTotalGross(), $order->getCurrency()) }} {{ __('Status') }} @if($isPaid) {{ __('Paid') }} @elseif($isVoid) {{ __('Void') }} @else {{ __('Unpaid') }} @endif
{{ __('Billed To') }}
{{ $order->getFullName() }}
{{ $order->getEmail() }}
@if($order->getAddress())
{{ $order->getBillingAddressString() }}
@endif
@php $totalDiscount = 0; @endphp @foreach($invoice->getItems() as $orderItem) @php $itemDiscount = 0; if ($orderItem['price_before_discount']) { $itemDiscount = ($orderItem['price_before_discount'] - $orderItem['price']) * $orderItem['quantity']; $totalDiscount += $itemDiscount; } @endphp @endforeach
{{ __('Description') }} {{ __('Rate') }} {{ __('Qty') }} {{ __('Amount') }}
{{ $orderItem['item_name'] }} @if(!empty($orderItem['description']))
{{ $orderItem['description'] }}
@endif
@if($orderItem['price_before_discount'])
{{ Currency::format($orderItem['price_before_discount'], $order->getCurrency()) }}
{{ Currency::format($orderItem['price'], $order->getCurrency()) }}
@else {{ Currency::format($orderItem['price'], $order->getCurrency()) }} @endif
{{ $orderItem['quantity'] }} @if($orderItem['price_before_discount'])
{{ Currency::format($orderItem['price_before_discount'] * $orderItem['quantity'], $order->getCurrency()) }}
{{ Currency::format($orderItem['total_before_additions'], $order->getCurrency()) }}
@else {{ Currency::format($orderItem['total_before_additions'], $order->getCurrency()) }} @endif
@if($totalDiscount > 0) @endif @if($order->getHasTaxes()) @foreach($order->getTaxesAndFeesRollup()['taxes'] as $tax) @endforeach @endif @if($order->getHasFees()) @foreach($order->getTaxesAndFeesRollup()['fees'] as $fee) @endforeach @endif @if($isPaid) @endif
{{ __('Subtotal') }} {{ Currency::format($order->getTotalBeforeAdditions(), $order->getCurrency()) }}
{{ __('Total Discount') }} -{{ Currency::format($totalDiscount, $order->getCurrency()) }}
{{ $tax['name'] }} ({{ $tax['rate'] }}@if($tax['type'] === 'PERCENTAGE') % @else {{ $order->getCurrency() }} @endif) {{ Currency::format($tax['value'], $order->getCurrency()) }}
{{ __('Total Tax') }} {{ Currency::format($order->getTotalTax(), $order->getCurrency()) }}
{{ $fee['name'] }} ({{ $fee['rate'] }}@if($fee['type'] === 'PERCENTAGE') % @else {{ $order->getCurrency() }} @endif) {{ Currency::format($fee['value'], $order->getCurrency()) }}
{{ __('Total Service Fee') }} {{ Currency::format($order->getTotalFee(), $order->getCurrency()) }}
{{ __('Total') }} {{ Currency::format($order->getTotalGross(), $order->getCurrency()) }}
{{ __('Amount Paid') }} -{{ Currency::format($order->getTotalGross(), $order->getCurrency()) }}
{{ __('Balance Due') }} {{ Currency::format(0, $order->getCurrency()) }}
@if($eventSettings->getInvoiceNotes())
{!! $eventSettings->getInvoiceNotes() !!}
@endif