@extends('layouts.app') @section('stitle', __('messages.Orders')) @section('title', __('messages.Orders')) @section('content')
@if (session()->get('title') == 'success') @elseif (session()->get('title') == 'error') @endif
@if (Auth::user()->business->getReceipt) @if (Auth::user()->business->getReceipt->is_logo_used == 1 && Auth::user()->business->getReceipt->logo != null)
No Company Logo found From Account Settings
@endif @endif

{{ Auth::user()->business->business_name }}

{{ Auth::user()->business->address }}

{{ Auth::user()->business->city }} - {{ Auth::user()->business->country }}

{{ __('messages.VATNumber') }}: {{ Auth::user()->business->vat_number }}

OR#: {{ $order->reference ?? '-' }}

{{ __('messages.Destination') }}:

{{ $order->branch->name ?? '-' }}

{{ __('messages.device_created_at') }}:

{{ $order->device_created_at }}

{{ __('messages.sync_at') }}:

{{ convertFromUTC($order->created_at, Auth::user()->business_id) }}

{{-- testing
--}} @if ($order->qr_code != null) {!! QrCode::size(100)->generate($order->qr_code) !!} @else - @endif

{{ __('messages.CustomersDetail') }}:

{{ __('messages.name') }}: {{ $order->customer_name ?: 'Walking Customer' }}

{{ __('messages.PHONE') }}: {{ $order->customer_phone_number ?? '-' }}

{{ __('messages.section') }}: {{ $order->section_name ?? '-' }}

{{ __('messages.table') }}: {{ $order->section_table_name ?? '-' }}

{{ __('messages.order_persons') }}: {{ $order->order_person ?? '-' }}

{{ __('messages.OrderType') }}: {{ $order->orderType->name ?? '-' }}

{{ __('messages.PaymentDetails') }}:
{{ __('messages.Cachier') }}: {{ $order->user->name ?? '-' }}
Total {{ $order->payment_method_name ?? '-' }}: {{ number_format($order->total, 2) }} {{ Auth::user()->business->currency->symbol }}
@foreach ($orderProducts as $orProduct) {{-- // discount not applicable on product for now it is on order // --}} @endforeach
{{ __('messages.Item') }} {{ __('messages.QTY') }} {{ __('messages.Price') }} {{ __('messages.VAT%') }} {{ __('messages.discount') }} {{ __('messages.SubTotal') }} ({{ Auth::user()->business->currency->symbol }}) {{ __('messages.VATAmount') }} ({{ Auth::user()->business->currency->symbol }}) {{ __('messages.Total') }} ({{ Auth::user()->business->currency->symbol }})
{{ $orProduct->name }}
@if ($orProduct->getOrderPorModOption) @foreach ($orProduct->getOrderPorModOption as $pro_modi)

+ {{ $pro_modi->name }} : {{ $pro_modi->price }}

@endforeach @endif @if ($orProduct->return_qty)

{{ $orProduct->return_qty }} x Return

@endif
{{ $orProduct->qty }} {{ $orProduct->price }}
@if ($orProduct->getOrderPorModOption) @foreach ($orProduct->getOrderPorModOption as $pro_modi)

+ {{ $pro_modi->price }}

@endforeach @endif
{{ $orProduct->tax_rate }}%
@if ($orProduct->getOrderPorModOption) @foreach ($orProduct->getOrderPorModOption as $pro_modi)

+ {{ $pro_modi->tax_rate }}

@endforeach @endif
{{ $orProduct->discount == '' ? '--' : $orProduct->discount }} {{ $orProduct->subtotal }} {{ $orProduct->total_tax }} {{ $orProduct->total }}
@if (count($orderPayment) > 0)
{{ __('messages.payment_history') }}
@foreach ($orderPayment as $payment)

{{ $payment->payment_method_name }}

{{ number_format($payment->paid_payment, 2) }} {{ Auth::user()->business->currency->symbol }}

@endforeach @endif @if (count($orderReturnPayment) > 0)
{{ __('messages.payment_return') }}
@foreach ($orderReturnPayment as $paymentReturn)

{{ $paymentReturn->paymentMethod->name }}

{{ number_format($paymentReturn->amount, 2) }} {{ Auth::user()->business->currency->symbol }}

@endforeach @endif

{{ __('messages.CreatedBy') }}: {{ $order->user->name }}

Subtotal:

{{ number_format($order->subtotal, 2) }} {{ Auth::user()->business->currency->symbol }}

{{ __('messages.VATAmount') }}:

{{ number_format($order->tax, 2) }} {{ Auth::user()->business->currency->symbol }}

Discount:

- {{ number_format($order->total_discount, 2) }} {{ Auth::user()->business->currency->symbol }}


Total {{ $order->payment_method_name }}:

{{ number_format($order->total, 2) }} {{ Auth::user()->business->currency->symbol }}


Note: It was a pleasure working with you and your team. We hope you will keep us in mind for future projects. Thank You!
@endsection