#INVOICE
Phone : {{ \App\Models\BusinessSetting::where(['key' => 'phone'])->first()->value }}
Email : {{ \App\Models\BusinessSetting::where(['key' => 'email_address'])->first()->value }}
Address : {{ \App\Models\BusinessSetting::where(['key' => 'address'])->first()->value }}
@if ($order->customer)
Order ID : {{ $order['id'] }}
Customer Name : {{ $order->customer['f_name'] . ' ' . $order->customer['l_name'] }}
Phone : {{ $order->customer['phone'] }}
Delivery Address : {{ $order->deliveryAddress ? $order->deliveryAddress['address'] : '' }}
@endif
Customer Name : {{ $order->customer['f_name'] . ' ' . $order->customer['l_name'] }}
Phone : {{ $order->customer['phone'] }}
Delivery Address : {{ $order->deliveryAddress ? $order->deliveryAddress['address'] : '' }}
@endif
Order details {{ $order->details->count() }}
Order Note : {{ $order['order_note'] }}
Payment Method : {{ str_replace('_', ' ', $order['payment_method']) }}
@if ($order['transaction_reference'] == null) Reference Code : @else Reference Code : {{ $order['transaction_reference'] }} @endif
Order Type : {{ str_replace('_', ' ', $order['order_type']) }}
@php($sub_total = 0)
@php($total_tax = 0)
@php($total_dis_on_pro = 0)
@php($add_ons_cost = 0)
@foreach ($order->details as $detail)
@if ($detail->product)
@php($add_on_qtys = json_decode($detail['add_on_qtys'], true))
@php($sub_total += $amount)
@php($total_tax += $detail['tax_amount'] * $detail['quantity'])
@endif @endforeach
{{ $detail->product['name'] }}
@if (count(json_decode($detail['variation'], true)) > 0) Variation : @foreach (json_decode($detail['variation'], true)[0] as $key1 => $variation)
@if (count(json_decode($detail['variation'], true)) > 0) Variation : @foreach (json_decode($detail['variation'], true)[0] as $key1 => $variation)
{{ $key1 }} :
{{ $variation }}
@endforeach
@endif
@foreach (json_decode($detail['add_on_ids'], true) as $key2 => $id)
@php($addon = \App\Model\AddOn::find($id))
@if ($key2 == 0)
Addons :
@endif
@if ($add_on_qtys == null)
@php($add_on_qty = 1)
@else
@php($add_on_qty = $add_on_qtys[$key2])
@endif
{{ $addon['name'] }} :
{{ $add_on_qty }} x {{ $addon['price'] }}
{{ \App\CentralLogics\Helpers::currency_symbol() }}
@php($add_ons_cost += $addon['price'] * $add_on_qty)
@endforeach
@if ($detail['discount_on_product'] != 0)
@endif
{{ \App\CentralLogics\Helpers::variation_price(
json_decode($detail['product_details'], true),
$detail['variation'],
) .
' ' .
\App\CentralLogics\Helpers::currency_symbol() }}
@endif
{{ $detail['price'] - $detail['discount_on_product'] . ' ' . \App\CentralLogics\Helpers::currency_symbol() }}
{{ $detail['quantity'] }}
@php($amount = ($detail['price'] - $detail['discount_on_product']) * $detail['quantity'])
{{ $amount . ' ' . \App\CentralLogics\Helpers::currency_symbol() }}
@endif @endforeach
- Items Price:
- {{ $sub_total . ' ' . \App\CentralLogics\Helpers::currency_symbol() }}
- Tax / VAT:
- {{ $total_tax . ' ' . \App\CentralLogics\Helpers::currency_symbol() }}
- Addon Cost:
-
{{ $add_ons_cost . ' ' . \App\CentralLogics\Helpers::currency_symbol() }}
- Subtotal:
- {{ $sub_total + $total_tax + $add_ons_cost . ' ' . \App\CentralLogics\Helpers::currency_symbol() }}
- Coupon Discount:
- - {{ $order['coupon_discount_amount'] . ' ' . \App\CentralLogics\Helpers::currency_symbol() }}
- Delivery Fee:
-
@if ($order['order_type'] == 'take_away')
@php($del_c = 0)
@else
@php($del_c = $order['delivery_charge'])
@endif
{{ $del_c . ' ' . \App\CentralLogics\Helpers::currency_symbol() }}
- Total:
- {{ $sub_total + $del_c + $total_tax + $add_ons_cost - $order['coupon_discount_amount'] . ' ' . \App\CentralLogics\Helpers::currency_symbol() }}