@php $count = 0; $total = $orders->count(); @endphp @foreach($orders as $order) @php $count++; $user = $order->user; @endphp
IPDC
TAX INVOICE

B. A. P. S. VISION {{ ucfirst($user->name) }}
{{ \App\Models\Setting::get('company_address', '123 Business Street, City, State 12345') }} @php $shipping_address_str = ''; $shipping_address = $order->shipping_address; // Already an array due to casting if (is_string($shipping_address)) { $shipping_address = json_decode($shipping_address, true); } if (is_array($shipping_address)) { $shipping_address_str .= ($shipping_address['address_line_1'] ?? '') . ', ' . ($shipping_address['address_line_2'] ?? '') . ', ' . ($shipping_address['city'] ?? '') . ', ' . ($shipping_address['state'] ?? '') . ', ' . ($shipping_address['postal_code'] ?? '') . ', ' . ($shipping_address['country'] ?? ''); } @endphp {{ $shipping_address_str ?? 'Address not available' }}
Phone: {{ $user->phone ?? 'N/A' }}
Email: {{ $user->email }}

GSTIN :                {{ config('app.gst_number', '27AAACT2727Q1ZZ') }}
PAN No. :             {{ config('app.pan_number', 'AAACT2727Q') }}
Order No :           {{ $order->order_number }} Invoice No :   IPDC-{{ str_pad($order->id, 5, '0', STR_PAD_LEFT) }}
Order Date :        {{ $order->created_at->ist()->format('d-M-Y') }} Payment Date :   {{ $order->created_at->ist()->format('d-M-Y') }}
@if($order->is_bulk_purchased) BULK PURCHASE - FREE SHIPPING @endif

@php $i = 1; $cgst = 0.00; $sgst = 0.00; $igst = 0.00; $sub_total = 0.00; $grand_total = 0.00; @endphp @foreach($order->orderItems as $orderDetail) @php $item_total = $orderDetail->price * $orderDetail->quantity; $sub_total += $item_total; $grand_total += $item_total; @endphp @php $i++; @endphp @endforeach @php $grand_total += $order->shipping_cost; @endphp
# Book Name QTY Amount
{{ $i }} {{ $orderDetail->book->title }} {{ $orderDetail->quantity }} {{ number_format($item_total, 2) }}/-
Subtotal : {{ number_format($sub_total, 2) }}/-
Shipping Amount : {{ number_format($order->shipping_cost, 2) }}/-
Final Amount : {{ number_format($grand_total, 2) }}/-

Whether tax is payable on reverse charge basis - NO

# This fee receipt is valid subject to cheque realisation or online payment confirmation.
# Subject to Local Jurisdiction where the receipt is generated.
# Fees once paid are neither refundable nor transferable.
# This is computer generated receipt and does not require any stamp or signature.

@if($count != $total)
@endif @endforeach