@component('yas_admin::emails.layout')
@lang('yas_admin::app.emails.orders.created.title')

@lang('yas_admin::app.emails.dear', ['admin_name' => core()->getAdminEmailDetails()['name']]),👋

{!! __('yas_admin::app.emails.orders.created.greeting', [ 'order_id' => '#' . $order->increment_id . '', 'created_at' => core()->formatDate($order->created_at, 'Y-m-d H:i:s') ]) !!}

@lang('yas_admin::app.emails.orders.created.summary')
{{-- Addresses & Details Section --}} @if ($order->shipping_address) @endif @if ($order->shipping_address && $order->billing_address) @endif @if ($order->billing_address) @endif
@lang('yas_admin::app.emails.orders.shipping-address')
{{ $order->shipping_address->company_name ?? '' }}
{{ $order->shipping_address->name }}
{{ $order->shipping_address->address }}
{{ $order->shipping_address->postcode . " " . $order->shipping_address->city }}
{{ $order->shipping_address->state }}
---
@lang('yas_admin::app.emails.orders.contact') : {{ $order->billing_address->phone }}
@lang('yas_admin::app.emails.orders.shipping')
{{ $order->shipping_title }}
@lang('yas_admin::app.emails.orders.billing-address')
{{ $order->billing_address->company_name ?? '' }}
{{ $order->billing_address->name }}
{{ $order->billing_address->address }}
{{ $order->billing_address->postcode . " " . $order->billing_address->city }}
{{ $order->billing_address->state }}
---
@lang('yas_admin::app.emails.orders.contact') : {{ $order->billing_address->phone }}
@lang('yas_admin::app.emails.orders.payment')
{{ core()->getConfigData('sales.payment_methods.' . $order->payment->method . '.title') }}
@php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($order->payment->method); @endphp @if (! empty($additionalDetails))
{{ $additionalDetails['title'] }}
{{ $additionalDetails['value'] }}
@endif
{{-- Order Items Table --}}
@foreach (['sku', 'name', 'price', 'qty'] as $item) @endforeach @foreach ($order->items as $item) @endforeach
@lang('yas_admin::app.emails.orders.' . $item)
{{ $item->getTypeInstance()->getOrderedItem($item)->sku }} {{ $item->name }} @if (isset($item->additional['attributes']))
@foreach ($item->additional['attributes'] as $attribute) {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
@endforeach
@endif
@if (core()->getConfigData('sales.taxes.sales.display_prices') == 'including_tax') {{ core()->formatBasePrice($item->base_price_incl_tax) }} @elseif (core()->getConfigData('sales.taxes.sales.display_prices') == 'both') {{ core()->formatBasePrice($item->base_price_incl_tax) }}
@lang('yas_admin::app.emails.orders.excl-tax') {{ core()->formatBasePrice($item->base_price) }}
@else {{ core()->formatBasePrice($item->base_price) }} @endif
{{ $item->qty_ordered }}
{{-- Totals Summary Section --}}
@if (core()->getConfigData('sales.taxes.sales.display_subtotal') == 'including_tax') @elseif (core()->getConfigData('sales.taxes.sales.display_subtotal') == 'both') @else @endif @if ($order->shipping_address) @if (core()->getConfigData('sales.taxes.sales.display_shipping_amount') == 'including_tax') @elseif (core()->getConfigData('sales.taxes.sales.display_shipping_amount') == 'both') @else @endif @endif @if ($order->discount_amount > 0) @endif
@lang('yas_admin::app.emails.orders.subtotal') {{ core()->formatBasePrice($order->base_sub_total_incl_tax) }}
@lang('yas_admin::app.emails.orders.subtotal-excl-tax') {{ core()->formatBasePrice($order->base_sub_total) }}
@lang('yas_admin::app.emails.orders.subtotal-incl-tax') {{ core()->formatBasePrice($order->base_sub_total_incl_tax) }}
@lang('yas_admin::app.emails.orders.subtotal') {{ core()->formatBasePrice($order->base_sub_total) }}
@lang('yas_admin::app.emails.orders.shipping-handling') {{ core()->formatBasePrice($order->base_shipping_amount_incl_tax) }}
@lang('yas_admin::app.emails.orders.shipping-handling-excl-tax') {{ core()->formatBasePrice($order->base_shipping_amount) }}
@lang('yas_admin::app.emails.orders.shipping-handling-incl-tax') {{ core()->formatBasePrice($order->base_shipping_amount_incl_tax) }}
@lang('yas_admin::app.emails.orders.shipping-handling') {{ core()->formatBasePrice($order->base_shipping_amount) }}
@lang('yas_admin::app.emails.orders.tax') {{ core()->formatBasePrice($order->base_tax_amount) }}
@lang('yas_admin::app.emails.orders.discount') {{ core()->formatBasePrice($order->base_discount_amount) }}
@lang('yas_admin::app.emails.orders.grand-total') {{ core()->formatBasePrice($order->base_grand_total) }}
@endcomponent