@if ($invoiceLogo != null) @endif
{{ $companyName }}
{{ $invoiceAddress }}
{{ translate('Email') }}: {{ $invoiceEmail }}
{{ translate('Phone') }}: {{ $invoicephone }}
{{ translate('TAX INVOICE') }}
{{ translate('Order Code') }}: {{ $order->order_code }}
{{ translate('Bill Number') }}: {{ $order->bill_no ?? 'Not provided' }}
{{ translate('Order Date') }}: {{ $order->created_at->format('d.m.Y') }}
{{ translate('Payment type') }}: {{ translate(strtoupper($order->payment_type)) }}
{{ translate('Billing address') }}:
@isset($order->user->name) {{ $order->user->name }},
@endisset @isset($order->address->address) {{ $order->address->address }}, @endisset
@isset($order->address->landmark) {{ $order->address->landmark }}, @endisset
@isset($order->address->level_id) @php $request = 'en'; $level = shipping_address_details($request, $order->address->level_id); @endphp @if (!empty($level['child'])) {{ $level['child'] }},
@endif @if (!empty($level['parent'])) {{ $level['parent'] }}, @endif @if (!empty($level['grand_parent'])) {{ $level['grand_parent'] }}, @endif @endisset
{{ translate('Phone') }}: @isset($order->user->phone) {{ $order->user->phone }} @endisset
{{ translate('Shipping address') }}:
@isset($order->user->name) {{ $order->user->name }},
@endisset @isset($order->address->address) {{ $order->address->address }}, @endisset
@isset($order->address->landmark) {{ $order->address->landmark }}, @endisset
@isset($order->address->level_id) @if (!empty($level['child'])) {{ $level['child'] }},
@endif @if (!empty($level['parent'])) {{ $level['parent'] }}, @endif @if (!empty($level['grand_parent'])) {{ $level['grand_parent'] }}, @endif @endisset
{{ translate('Phone') }}: @isset($order->user->phone) {{ $order->user->phone }} @endisset
{{ translate('S/L') }} {{ translate('Product Name') }} {{ translate('Qty') }} {{ translate('Mrp') }} {{ translate('Offer Price') }} {{ translate('Total') }}
@foreach ($order->orderDetails as $key => $orderDetail) @if ($orderDetail->product != null) @endif @endforeach
{{ $key + 1 }} {{ $orderDetail->product->name }} @if ($orderDetail->variation && $orderDetail->variation->combinations->count() > 0) @foreach ($orderDetail->variation->combinations as $combination) {{ $combination->attribute->getTranslation('name', $langCode, true) }}: {{ $combination->attributeValue->getTranslation('attribute_value', $langCode, true) }} @endforeach @endif {{ $orderDetail->quantity }} @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($orderDetail->mrp) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($orderDetail->offer_price) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif @php $priceToUse = $orderDetail->offer_price == 0 || $orderDetail->offer_price === null ? $orderDetail->mrp : $orderDetail->offer_price; @endphp {{ decimal_price($orderDetail->quantity * $priceToUse) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
@if ($order->payment_type == 'online')
@elseif($order->payment_type == 'cod')
@endif
{{-- @php $totalPercentage = 0; $taxes = []; foreach ($order->orderDetails as $orderDetail) { foreach ($orderDetail->productCountry->productTax as $item) { $totalPercentage += $item['percentage']; } } foreach ($order->orderDetails as $orderDetail) { foreach ($orderDetail->productCountry->productTax as $item) { $taxRate = $order->tax * ($item['percentage'] / $totalPercentage); if (isset($taxes[$item['tax_label']])) { $taxes[$item['tax_label']] += $taxRate; } else { $taxes[$item['tax_label']] = $taxRate; } } } @endphp @foreach ($taxes as $label => $amount) @endforeach --}} @php $taxes = get_split_tax($order); @endphp @foreach ($taxes as $tax) @endforeach
{{ translate('Total Amount') }} @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->total_amount + ($order->discount_rate ?? $order->discount_rate)) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Taxable Value') }} @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->sub_total_amount - (float) $order->tax) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Total Tax') }} @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->tax) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate($label) }} {{ decimal_price($amount) }} @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($grand_total) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ $tax['key'] }} ({{ $tax['percentage'] }}) @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($tax['value']) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Shipping Cost') }} @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->delivery_charge) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Coupon Discount') }}({{ $order->discount_percentage }}%) @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->discount_rate) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Grand Total') }} @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->total_amount) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif