@php $fontPath = []; // Get the default locale code. $getLocale = app()->getLocale(); // Get the current currency code. $currencyCode = core()->getBaseCurrencyCode(); if ($getLocale == 'en' && $currencyCode == 'INR') { $fontFamily = [ 'regular' => 'DejaVu Sans', 'bold' => 'DejaVu Sans', ]; } else { $fontFamily = [ 'regular' => 'Arial, sans-serif', 'bold' => 'Arial, sans-serif', ]; } if (in_array($getLocale, ['ar', 'he', 'fa', 'tr', 'ru', 'uk'])) { $fontFamily = [ 'regular' => 'DejaVu Sans', 'bold' => 'DejaVu Sans', ]; } elseif ($getLocale == 'zh_CN') { $fontPath = [ 'regular' => asset('fonts/NotoSansSC-Regular.ttf'), 'bold' => asset('fonts/NotoSansSC-Bold.ttf'), ]; $fontFamily = [ 'regular' => 'Noto Sans SC', 'bold' => 'Noto Sans SC Bold', ]; } elseif ($getLocale == 'ja') { $fontPath = [ 'regular' => asset('fonts/NotoSansJP-Regular.ttf'), 'bold' => asset('fonts/NotoSansJP-Bold.ttf'), ]; $fontFamily = [ 'regular' => 'Noto Sans JP', 'bold' => 'Noto Sans JP Bold', ]; } elseif ($getLocale == 'hi_IN') { $fontPath = [ 'regular' => asset('fonts/Hind-Regular.ttf'), 'bold' => asset('fonts/Hind-Bold.ttf'), ]; $fontFamily = [ 'regular' => 'Hind', 'bold' => 'Hind Bold', ]; } elseif ($getLocale == 'bn') { $fontPath = [ 'regular' => asset('fonts/NotoSansBengali-Regular.ttf'), 'bold' => asset('fonts/NotoSansBengali-Bold.ttf'), ]; $fontFamily = [ 'regular' => 'Noto Sans Bengali', 'bold' => 'Noto Sans Bengali Bold', ]; } elseif ($getLocale == 'sin') { $fontPath = [ 'regular' => asset('fonts/NotoSansSinhala-Regular.ttf'), 'bold' => asset('fonts/NotoSansSinhala-Bold.ttf'), ]; $fontFamily = [ 'regular' => 'Noto Sans Sinhala', 'bold' => 'Noto Sans Sinhala Bold', ]; } $seller = seller()->user(); $logo = $seller->logo ? Storage::url($seller->logo) : bagisto_asset('images/logo.svg'); @endphp
@if (core()->getConfigData('sales.invoice_settings.pdf_print_outs.invoice_id')) @endif @if (core()->getConfigData('sales.invoice_settings.pdf_print_outs.order_id')) @endif
@lang('marketplace::app.seller.orders.view.invoices.invoice-id'): #{{ $invoice->id }} @lang('marketplace::app.seller.orders.view.invoices.order-id'): #{{ $invoice->order->order->increment_id }}
@lang('marketplace::app.seller.orders.view.invoices.date'): {{ core()->formatDate($invoice->created_at, 'd-m-Y') }} @lang('marketplace::app.seller.orders.view.invoices.order-date'): {{ core()->formatDate($invoice->order->created_at, 'd-m-Y') }}
@if (! empty(core()->getConfigData('sales.shipping.origin.country'))) @endif
{{ core()->getConfigData('sales.shipping.origin.store_name') }}
{{ core()->getConfigData('sales.shipping.origin.address') }}
{{ core()->getConfigData('sales.shipping.origin.zipcode') . ' ' . core()->getConfigData('sales.shipping.origin.city') }}
{{ core()->getConfigData('sales.shipping.origin.state') . ', ' . core()->getConfigData('sales.shipping.origin.country') }}
@if ($invoice->invoice->hasPaymentTerm())
@lang('marketplace::app.seller.orders.view.invoices.payment-terms'): {{ $invoice->invoice->getFormattedPaymentTerm() }}
@endif @if (core()->getConfigData('sales.shipping.origin.bank_details'))
@lang('marketplace::app.seller.orders.view.invoices.bank-details'):
{!! nl2br(core()->getConfigData('sales.shipping.origin.bank_details')) !!}
@endif
@php $billingAddress = $invoice->order->order->billing_address; $shippingAddress = $invoice->order->order->shipping_address; @endphp @if ($billingAddress) @endif @if ($shippingAddress) @endif @if ($billingAddress) @endif @if ($shippingAddress) @endif
@lang('marketplace::app.seller.orders.view.invoices.bill-to') @lang('marketplace::app.seller.orders.view.invoices.ship-to')
{{ $billingAddress->company_name ?? '' }}
{{ $billingAddress->name }}
{{ $billingAddress->address }}
{{ $billingAddress->postcode . ' ' . $billingAddress->city }}
{{ $billingAddress->state . ', ' . core()->country_name($billingAddress->country) }}
@lang('marketplace::app.seller.orders.view.invoices.contact'): {{ $billingAddress->phone }}
{{ $shippingAddress->company_name ?? '' }}
{{ $shippingAddress->name }}
{{ $shippingAddress->address }}
{{ $shippingAddress->postcode . ' ' . $shippingAddress->city }}
{{ $shippingAddress->state . ', ' . core()->country_name($shippingAddress->country) }}
@lang('marketplace::app.seller.orders.view.invoices.contact'): {{ $shippingAddress->phone }}
@if ($shippingAddress) @endif @if ($shippingAddress) @endif
@lang('marketplace::app.seller.orders.view.invoices.payment-method') @lang('marketplace::app.seller.orders.view.invoices.shipping-method')
{{ core()->getConfigData('sales.payment_methods.' . $invoice->order->order->payment->method . '.title') }} @php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($invoice->order->order->payment->method); @endphp @if (! empty($additionalDetails))
{{ $additionalDetails['title'] }}: {{ $additionalDetails['value'] }}
@endif
{{ $invoice->order->order->shipping_title }}
@foreach ($invoice->items as $invoiceItem) @php $item = $invoiceItem->item; @endphp @endforeach
@lang('SKU') @lang('marketplace::app.seller.orders.view.invoices.product-name') @lang('marketplace::app.seller.orders.view.invoices.price') @lang('marketplace::app.seller.orders.view.invoices.qty') @lang('marketplace::app.seller.orders.view.invoices.subtotal')
{{ $item->getTypeInstance()->getOrderedItem($item)->sku }} {{ $item->name }} @if (isset($item->additional['attributes']))
@foreach ($item->additional['attributes'] as $attribute) @if ( ! isset($attribute['attribute_type']) || $attribute['attribute_type'] !== 'file' ) {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
@else {{ $attribute['attribute_name'] }} : {{ File::basename($attribute['option_label']) }}
@endif @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('marketplace::app.seller.orders.view.invoices.excl-tax') {{ core()->formatPrice($item->base_price) }}
@else {!! core()->formatBasePrice($item->base_price) !!} @endif
{{ $item->qty }} @if (core()->getConfigData('sales.taxes.sales.display_subtotal') == 'including_tax') {!! core()->formatBasePrice($item->base_total_incl_tax) !!} @elseif (core()->getConfigData('sales.taxes.sales.display_subtotal') == 'both') {!! core()->formatBasePrice($item->base_total_incl_tax) !!}
@lang('marketplace::app.seller.orders.view.invoices.excl-tax') {{ core()->formatPrice($item->base_total) }}
@else {!! core()->formatBasePrice($item->base_total) !!} @endif
@if (core()->getConfigData('sales.taxes.sales.display_subtotal') == 'including_tax') @elseif (core()->getConfigData('sales.taxes.sales.display_subtotal') == 'both') @else @endif
@lang('marketplace::app.seller.orders.view.invoices.subtotal') - {!! core()->formatBasePrice($invoice->base_sub_total_incl_tax) !!}
@lang('marketplace::app.seller.orders.view.invoices.subtotal-incl-tax') - {!! core()->formatBasePrice($invoice->base_sub_total_incl_tax) !!}
@lang('marketplace::app.seller.orders.view.invoices.subtotal-excl-tax') - {!! core()->formatBasePrice($invoice->base_sub_total) !!}
@lang('marketplace::app.seller.orders.view.invoices.subtotal') - {!! core()->formatBasePrice($invoice->base_sub_total) !!}
@lang('marketplace::app.seller.orders.view.invoices.shipping-handling') - {!! core()->formatBasePrice(0) !!}
@lang('marketplace::app.seller.orders.view.invoices.tax') - {!! core()->formatBasePrice($invoice->base_tax_amount) !!}
@lang('marketplace::app.seller.orders.view.invoices.discount') - {!! core()->formatBasePrice($invoice->base_discount_amount) !!}
@lang('marketplace::app.seller.orders.view.invoices.grand-total') - {!! core()->formatBasePrice($invoice->base_grand_total - $invoice->base_shipping_amount) !!}
@if (core()->getConfigData('sales.invoice_settings.pdf_print_outs.footer_text'))
{{ core()->getConfigData('sales.invoice_settings.pdf_print_outs.footer_text') }}
@endif