@php $currency = $order->currency; $companyId = (setting('multihub') OR $order->company_id > 0) ? $order->company_id : setting('default_company_id', $order->module); $company = \App\Models\Company::find($companyId); $custom_fields = $order->custom_data; $items = $order->orderItems; $discounts = FALSE; $show_vat = FALSE; foreach($items as $item){ if($item->discount > 0) $discounts = TRUE; if($item->vat > 0) $show_vat = TRUE; } @endphp

Invoice #{{$order->id}}

from
{{$company->name}}
{{$company->address->street}}
{{$company->address->zip}}, {{$company->address->city}}, {{$company->address->county}}
{{$company->address->country}}
Email: {{$company->email}}
@if($company->phone != '') Phone: {{$company->phone}}
@endif @if($company->vat_num != '') TAX VAT Number: {{$company->vat_num}}
@endif
@if($order->billing_address)
to (billing address)
{{ucfirst($order->billing_address->first_name).' '.ucfirst($order->billing_address->last_name)}}
{{$order->billing_address->street}}
{{$order->billing_address->zip}}, {{$order->billing_address->city}}, {{$order->billing_address->county}}
{{$order->billing_address->country}}
Email: {{$order->billing_address->email}}
Phone: {{$order->billing_address->phone}}
@endif @if($order->shipping_address)
to (shipping address)
{{ucfirst($order->shipping_address->first_name).' '.ucfirst($order->shipping_address->last_name)}}
{{$order->shipping_address->street}}
{{$order->shipping_address->zip}}, {{$order->shipping_address->city}}, {{$order->shipping_address->county}}
{{$order->shipping_address->country}}
Email: {{$order->shipping_address->email}}
Phone: {{$order->shipping_address->phone}}
@endif
Invoice #{{$order->id}}
@if(isset($custom_fields->reviewed) && $custom_fields->reviewed === 'pending')
{{__('payments.pending_approval')}}

{{__('payments.pending_order_desc')}}

@endif
{{date('d/m/Y H:i',$order->created_at->timestamp)}}
@if($discounts) @endif @if($show_vat) @endif @php $i = 1; $total_price = 0; $products = $items; @endphp @foreach($products as $product) @php $custom_data = $product->custom_data; @endphp @if($product->name != "Shipping") @else @endif @if($currency->symbol_position == 'before') @if($discounts) @php $discount = $product->discount > 0 ? '- '.$currency->symbol.number_format($product->discount,2,".",",") : 'N/A'; @endphp @endif @if($show_vat) @endif @else @endif @php $total_price += $product->price * $product->quantity; @endphp @php $i++; @endphp @endforeach
# ITEM QUANTITY PRICEDISCOUNTVATTOTAL
{{$i}} {{$product->name}} @php if($order->module !== 'meeting_rooms' && !empty($custom_fields)){ if(isset($custom_data->type) && $custom_data->type === 'addon'){ }else { if (isset($custom_fields->description)) { echo '
' . strip_tags($custom_fields->description) . ''; } } } if($order->module === 'meeting_rooms' && isset($custom_data->description)){ echo $custom_data->description; } @endphp
{{$product->name}}
{{$product->quantity}}{{$currency->symbol}} {{number_format($product->price,2,".",",")}} {{$discount}} {{$currency->symbol}} {{number_format($product->vat,2,".",",")}} ({{$custom_data->vat_rate ?? '0'}}%){{$currency->symbol}} {{$subtotal = number_format(($product->quantity * $product->price),2,".",",")}}{{number_format($product->price,2,".",",")}} {{$currency->symbol}} {{$subtotal = number_format(($product->quantity * $product->price),2,".",",")}} {{$currency->symbol}}
@if($order->total == 0) {{__('payments.invoice_free_charge')}} @endif
@if($company->add_info)
{{$company->add_info}}
@endif
@php $order_details = $order->custom_data; @endphp @if(isset($order_details->total)) @if($currency->symbol_position == 'before')

SUBTOTAL : {{$currency->symbol}} {{number_format($total_price,2,".",",")}}

@else

TOTAL: {{number_format($total_price,2,".",",")}} {{$currency->symbol}}

@endif @if(isset($order_details->total_discount) && $discounts)

Discounts:- {{$currency->symbol}} {{number_format($order_details->total_discount,2,".",",")}}

@endif @if(isset($order_details->vat_amount) && $order_details->vat_amount > 0)

VAT: {{$currency->symbol}} {{number_format($order_details->vat_amount,2,".",",")}}

@endif @if(isset($order_details->total))

TOTAL: {{$currency->symbol}} {{number_format($order_details->total,2,".",",")}}

@endif @else @if($currency->symbol_position == 'before')

TOTAL : {{$currency->symbol}} {{number_format($total_price,2,".",",")}}

@else

TOTAL: {{number_format($total_price,2,".",",")}} {{$currency->symbol}}

@endif @endif
* {{__('payments.invoice_order_status')}}: {{ucfirst($order->status)}}
* {{__('payments.invoice_cheques')}} [{{$company->name}}]
@if($order->payment_method == 'cash') * {{__('payments.invoice_payment_method')}} : {{strtoupper($order->payment_method)}}
* {{__('payments.invoice_due_date')}}: {{$company->add_info}}
@else * {{__('payments.invoice_payment_method')}} : {{ucwords(str_replace('_',' ',$order->payment_method))}}
@endif @if(isset($order_details->installments) && $order_details->installments !== 'none') @php $installment_text = ucwords($order_details->installments); if($order_details->installments === 'monthly') $installment_text = __('per_month'); if($order_details->installments === '6months') $installment_text = __('per_6month'); @endphp * {{__('payments.invoice_payment_opt')}}: {{$installment_text}}
@endif @if(isset($order_details->recurring)) @php $recurring = $order_details->recurring ? __('payments.recurring') : __('payments.one-time'); @endphp * {{sprintf(__('payments.recurring_sub_info'), $recurring)}}.
@endif @if(!empty($order->trans_id)) * {{__('payments.invoice_tx_id')}}: {{$order->trans_id}}
@endif * {{__('payments.invoice_qa')}} [ {{$company->phone}}, {{$company->email}}]