@extends('blank.app') @section('styles') @endsection @section('content')
{{ __('order::receipt.header') }}
{{--
{{ $setting->local->company_name ?? '' }}
--}}

{{ __('order::receipt.user.info_tax_seller') }}

{{ $setting->local->company_name ?? '' }}

{{ $setting->local->address ?? '' }}

{{ __('order::receipt.tax_number') }} : {{ $setting->tax_number ?? '' }}

{{ $setting->email ?? '' }}

{{ __('order::receipt.no') }}
{{ $order->no ?? '' }}
{{ __('order::receipt.date') }}
{{ !empty($order->order_at) ? str_date($order->order_at, 'd M Y') : '' }}
{{ __('order::receipt.user.info') }} @foreach (['name', 'tel'] as $v)

{{ __('order::receipt.user.' . $v) }} : {{ $member[$v] ?? '' }}

@endforeach
{{-- @if (!empty($setting))
{{ $setting->local->company_name ?? '' }}

{{ $setting->tax_number ?? '' }}

{{ $setting->local->address ?? '' }}

{{ $setting->email ?? '' }}

{{ $setting->tel ?? '-' }}

@endif --}}
@if (!empty($order->items)) @foreach ($order->items as $k_i => $i) @php $total = "

" . number_format($i->total ?? null, 2) . '

'; if (!empty($i->discount)) { $total .= "

" . number_format($i->price ?? null, 2) . '

'; } @endphp @endforeach @endif
{{ __('order::receipt.table.header.seq') }} {{ __('order::receipt.table.header.product') }} {{ __('order::receipt.table.header.amount') }} {{ __('order::receipt.table.header.price') }}
{{ $k_i + 1 }} {!! $items[$k_i] ?? '' !!} {{ $i->quantity ?? 0 }}{!! $total !!}

{{ __('order::receipt.payment') }}

{{ !empty($order->payment_method) ? __('field.otp_payment.' . strtolower($order->payment_method)) : '' }} @if ($order->payment_method == 'BANK') @if (!empty($order->payment_json)) @php $bank_detail = json_decode($order->payment_json, true); $lang = app()->getLocale(); foreach ($bank_detail['bank']['translate'] as $v) { if ($v['lang'] == $lang) { $bank_name = $v['bank_name']; break; } } @endphp {{ ' (' . ($bank_name ?? '') . ')' }} @else {{ ' (' . ($order->bank->local->bank_name ?? '') . ')' }} @endif @endif

@if (!empty($order->invoice_status))

{{ __('order::receipt.user.info_tax') }}

@php $invoice_detail = $order->invoice_json; $header = ['type', 'tax_number', 'name', 'tel', 'address']; @endphp @foreach ($header as $v) @if (empty($invoice_detail[$v]) && $v != 'address') @continue @endif @php $right = $invoice_detail[$v] ?? '-'; if ($v == 'type') { $right = __('field.opt_tax_address_type.' . strtolower($invoice_detail[$v])); } elseif ($v == 'address') { $right = implode(' ', [$invoice_detail['address'] ?? '', $invoice_detail['city'] ?? '', $invoice_detail['district'] ?? '', $invoice_detail['province'] ?? '', $invoice_detail['zipcode'] ?? '']); } @endphp

{{ __('field.' . $v) }} : {{ $right }}

@endforeach
@endif
@foreach ($footer as $k => $v) @if (in_array($k, ['discount', 'shipping']) && (empty($v) || $v == '0.00')) @continue @endif
{{ __('order::receipt.table.footer.' . $k) }} {{ ($v ?? 0) . ' ' . $currency }}
@if ($k == 'grand_total' && !empty($order->vat_type))
{{ __('order::receipt.before_vat') }} {{ number_format($order->total_total ?? 0, 2) . ' ' . $currency }}
{{ __('order::receipt.vat') }} {{ number_format($order->total_vat ?? 0, 2) . ' ' . $currency }}
{{ __('order::receipt.total_vat') }} {{ number_format($order->grand_total ?? 0, 2) . ' ' . $currency }}
@endif @endforeach
{{ __('order::receipt.note') }} :

{!! nl2br(e(str_replace(['\\r\\n', '\\r', '\\n', "\r\n", "\r"], "\n", $setting->local->remark ?? ''))) !!}

{{ __('order::receipt.sign') }}

{{-- {{ $invoice_detail['name'] ?? '' }} --}}

{{ __('order::receipt.payer') }}

(

{{-- {{ $invoice_detail['name'] ?? '' }} --}}

)

{{ __('order::receipt.sign') }}

{{ $setting->local->sign ?? '' }}

{{ __('order::receipt.payee') }}

(

{{ $setting->local->full_sign ?? '' }}

)

@endsection