@php use App\Support\Currency\CurrencySnapshotPayload; use Illuminate\Support\Str; $invoiceCurrencyCode = strtoupper((string) ($order['currency_code'] ?? $order['base_currency_code'] ?? ($systemSettings['currency'] ?? ''))); $money = function ($amount) use ($invoiceCurrencyCode) { return CurrencySnapshotPayload::formatAmount($amount, $invoiceCurrencyCode) ?? trim($invoiceCurrencyCode.' '.number_format((float) $amount, 2, '.', ',')); }; @endphp Tax Invoice - {{ $systemSettings['appName'] }}

Tax Invoice

{{-- Header Section --}}
{{ $systemSettings['appName'] }} Logo

{{ $systemSettings['appName'] }}

@if(!empty($systemSettings['companyAddress']))

{!! nl2br(e($systemSettings['companyAddress'])) !!}

@endif

Email: {{ $systemSettings['sellerSupportEmail'] ?? 'support@example.com' }}

Phone: {{ $systemSettings['sellerSupportNumber'] ?? '0000000000' }}

Invoice #: {{ $order['uuid'] }}
Order Id #: {{ $order['id'] }}
Order Date: {{ $order['created_at']->format('Y-m-d H:i:s') }}
Payment Method: {{ $order['payment_method'] ?? 'Cash on Delivery' }}
Payment Date: {{ $order['created_at'] }}
Billing Information
{{ $order['shipping_name'] }}
{{ $order['shipping_address_1'] }}, {{ $order['shipping_landmark'] }}, {{ $order['shipping_city'] }}, {{ $order['shipping_state'] }}, {{ $order['shipping_country'] }} - {{ $order['shipping_zip'] }}
Email: {{ $order['email'] }}
Phone: {{ $order['shipping_phone'] }}
{{-- Order Items --}}

Order Summary

@foreach($sellerOrder as $vendor)
Sold by: {{ $vendor['seller']['stores'][0]['name'] ?? ($vendor['items'][0]['orderItem']['store']['name'] ?? 'N/A') }} (ID: {{ $vendor['seller']['id'] ?? 'N/A' }} )
@php $store = $vendor['items'][0]['orderItem']['store'] ?? null; @endphp @if($store)

Store: {{ $store['name'] ?? 'N/A' }} | Tax Name: {{ $store['tax_name'] ?? 'N/A' }} | Tax Number: {{ $store['tax_number'] ?? 'N/A' }}

@endif @foreach($vendor['items'] as $item) @php $addons = $item->orderItem?->addons ?? collect(); @endphp @endforeach
Item Description Qty Status Tax (%) Unit Price Total
{{ $item['product']['title'] }} {{ $item['product']['short_description'] }} @if($addons->isNotEmpty())
{{ __('labels.addons') }}:
    @foreach($addons as $addon)
  • @if(!empty($addon->addonGroup?->title)) {{ $addon->addonGroup->title }} — @endif {{ $addon->addonItem?->title ?? '—' }} · {{ $money($addon->price) }}
  • @endforeach
@endif
{{ $item['quantity'] }} {{ Str::replace('_',' ',$item['orderItem']['status']) }} {{ $money($item['orderItem']['tax_amount']) }} ({{ $item['orderItem']['tax_percent'] }}%) {{ $money($item['price']) }} {{ $money($item?->orderItem['subtotal']) }}
Subtotal: {{ $money($vendor['total_price']) }}
@endforeach {{-- Payment Summary --}} @if($order['wallet_balance'] > 0) @endif @if($order['promo_discount'] > 0) @endif
Items Subtotal: {{ $money($order['subtotal']) }}
Shipping & Handling: {{ $money($order['delivery_charge']) }}
Handling Charges: {{ $money($order['handling_charges']) }}
Per Store Drop Off Fee: {{ $money($order['per_store_drop_off_fee']) }}
Grand Total: {{ $money($order['subtotal'] + $order['delivery_charge'] + ($order['handling_charges'] ?? 0) + ($order['per_store_drop_off_fee'] ?? 0)) }}
Wallet Used: - {{ $money($order['wallet_balance']) }}
Promo Discount {{ (!empty($order['promoLine']) && $order['promoLine']['cashback_flag'] ? ' (' . "cashback" . ')' : '')}} ({{$order['promo_code']}}): - {{ $money($order['promo_discount']) }}
Total Payable: {{ $money($order['total_payable']) }}
{{-- Authorized Signatory --}}
@if(!empty($systemSettings['adminSignature'])) Authorized Signatory @else
@endif
Authorized Signatory
{{-- Footer --}}

Thank you for shopping with {{ $systemSettings['appName'] }}!
@if($systemSettings['sellerSupportEmail']) Need help? Contact us at {{ $systemSettings['sellerSupportEmail'] }}. @endif

{{ $systemSettings['copyrightDetails'] }}

{{-- Store-wise Invoices --}}

Store-wise Invoices

@foreach($sellerOrder as $vendor) @php $store = $vendor['items'][0]['orderItem']['store'] ?? null; @endphp

Sold by: {{ $store['name'] ?? ($vendor['seller']['stores'][0]['name'] ?? 'N/A') }}

@if($store)

{{ $store['address'] ?? '' }}@if(!empty($store['address']) && !empty($store['landmark'])) , @endif{{ $store['landmark'] ?? '' }}

{{ $store['city'] ?? '' }}@if(!empty($store['city']) && !empty($store['state'])) , @endif{{ $store['state'] ?? '' }}

{{ $store['country'] ?? '' }}@if(!empty($store['zipcode'])) - {{ $store['zipcode'] }} @endif

@endif
Invoice #: {{ $order['uuid'] }}
Order Date: {{ $order['created_at']->format('Y-m-d H:i:s') }}
Payment Method: {{ $order['payment_method'] ?? 'Cash on Delivery' }}
Payment Date: {{ $order['created_at'] }}
Billing Information
{{ $order['shipping_name'] }}
{{ $order['shipping_address_1'] }}, {{ $order['shipping_landmark'] }}, {{ $order['shipping_city'] }}, {{ $order['shipping_state'] }}, {{ $order['shipping_country'] }} - {{ $order['shipping_zip'] }}
Email: {{ $order['email'] }}
Phone: {{ $order['shipping_phone'] }}
Sold by: {{ $store['name'] ?? ($vendor['seller']['stores'][0]['name'] ?? 'N/A') }} @if(isset($vendor['seller']['id'])) (Seller ID: {{ $vendor['seller']['id'] }}) @endif
@if($store)

Store: {{ $store['name'] ?? 'N/A' }} | Tax Name: {{ $store['tax_name'] ?? 'N/A' }} | Tax Number: {{ $store['tax_number'] ?? 'N/A' }}

@endif @foreach($vendor['items'] as $item) @php $addons = $item->orderItem?->addons ?? collect(); @endphp @endforeach
Item Description Qty Status Tax (%) Unit Price Total
{{ $item['product']['title'] }} {{ $item['product']['short_description'] }} @if($addons->isNotEmpty())
{{ __('labels.addons') }}:
    @foreach($addons as $addon)
  • @if(!empty($addon->addonGroup?->title)) {{ $addon->addonGroup->title }} — @endif {{ $addon->addonItem?->title ?? '—' }} · {{ $money($addon->price) }}
  • @endforeach
@endif
{{ $item['quantity'] }} {{ Str::replace('_',' ', $item['orderItem']['status']) }} {{ $money($item['orderItem']['tax_amount']) }} ({{ $item['orderItem']['tax_percent'] }}%) {{ $money($item['price']) }} {{ $money($item?->orderItem['subtotal']) }}
Store Subtotal: {{ $money($vendor['total_price']) }}
{{-- Authorized Signatory (Seller) --}}
@if(!empty($vendor['seller']['authorized_signature'])) Authorized Signatory @else
@endif
Authorized Signatory
@if(!$loop->last)
@endif @endforeach