@php use Illuminate\Support\Str; @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 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) @endforeach
Item Description Qty Status Tax (%) Unit Price Total
{{ $item['product']['title'] }} {{ $item['product']['short_description'] }} {{ $item['quantity'] }} {{ Str::replace('_',' ',$item['orderItem']['status']) }} {{ $item['orderItem']['tax_amount'] }} ({{ $item['orderItem']['tax_percent'] }}%) {{ $systemSettings['currencySymbol'] }}{{ number_format($item['price'], 2) }} {{ $systemSettings['currencySymbol'] }}{{ number_format($item['price'] * $item['quantity'], 2) }}
Subtotal: {{ $systemSettings['currencySymbol'] }}{{ number_format($vendor['total_price'], 2) }}
@endforeach {{-- Payment Summary --}} @if($order['wallet_balance'] > 0) @endif @if($order['promo_discount'] > 0) @endif
Items Subtotal: {{ $systemSettings['currencySymbol'] }}{{ $order['subtotal'] }}
Shipping & Handling: {{ $systemSettings['currencySymbol'] }}{{ $order['delivery_charge'] }}
Handling Charges: {{ $systemSettings['currencySymbol'] }}{{ $order['handling_charges'] }}
Per Store Drop Off Fee: {{ $systemSettings['currencySymbol'] }}{{ $order['per_store_drop_off_fee'] }}
Grand Total: {{ $systemSettings['currencySymbol'] }}{{ number_format($order['subtotal'] + $order['delivery_charge'] + ($order['handling_charges'] ?? 0) + ($order['per_store_drop_off_fee'] ?? 0), 2) }}
Wallet Used: - {{ $systemSettings['currencySymbol'] }}{{ $order['wallet_balance'] }}
Promo Discount {{ (!empty($order['promoLine']) && $order['promoLine']['cashback_flag'] ? ' (' . "cashback" . ')' : '')}} ({{$order['promo_code']}}): - {{ $systemSettings['currencySymbol'] }}{{ $order['promo_discount'] }}
Total Payable: {{ $systemSettings['currencySymbol'] }}{{ $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) @endforeach
Item Description Qty Status Tax (%) Unit Price Total
{{ $item['product']['title'] }} {{ $item['product']['short_description'] }} {{ $item['quantity'] }} {{ Str::replace('_',' ', $item['orderItem']['status']) }} {{ $item['orderItem']['tax_amount'] }} ({{ $item['orderItem']['tax_percent'] }}%) {{ $systemSettings['currencySymbol'] }}{{ number_format($item['price'], 2) }} {{ $systemSettings['currencySymbol'] }}{{ number_format($item['price'] * $item['quantity'], 2) }}
Store Subtotal: {{ $systemSettings['currencySymbol'] }}{{ number_format($vendor['total_price'], 2) }}
{{-- Authorized Signatory (Seller) --}}
@if(!empty($vendor['seller']['authorized_signature'])) Authorized Signatory @else
@endif
Authorized Signatory
@if(!$loop->last)
@endif @endforeach