{{-- Invoice #{{ $offlineSale->order_id }}
@if (!empty($branchInfo['logo'])) Logo @else N/A @endif

{{ $branchInfo['name'] ?? 'Branch Name' }}

{{ $branchInfo['address'] ?? '' }}
Phone: {{ $branchInfo['phone'] ?? '' }}
Email: {{ $branchInfo['email'] ?? '' }}

Tax Invoice

Invoice No: {{ $offlineSale->order_id }}
Date: {{ \Carbon\Carbon::parse($offlineSale->created_at)->format('d-M-Y H:i') }}
Customer: {{ $offlineSale->customer_details['name'] ?? 'Walk-in Customer' }}
@if (!empty($offlineSale->customer_details['phone_number'])) Phone: {{ $offlineSale->customer_details['phone_number'] }}
@endif @if (!empty($offlineSale->customer_details['address'])) Address: {{ $offlineSale->customer_details['address'] }} @endif
@foreach ($offlineSale->sale_items as $index => $item) @php $taxable = ($item['sell_price'] ?? 0) * ($item['quantity'] ?? 1); $gstAmount = ($taxable * ($item['gst'] ?? 0)) / 100; @endphp @endforeach
# Item HSN Code IMEI Rate Qty GST % Total
{{ $loop->iteration }} {{ $item['name'] }} {{$item['hsn_code']}} ₹{{ number_format($item['sell_price'], 2) }} {{ $item['quantity'] }} ₹{{ number_format($gstAmount, 2) }}
({{ number_format($item['gst'] ?? 0, 2) }}%)
₹{{ number_format($item['total'], 2) }}

Thank you for your purchase!

Subtotal (Excl. Tax): ₹{{ number_format($offlineSale->sub_total, 2) }}

CGST: ₹{{ number_format($offlineSale->cgst, 2) }}

SGST: ₹{{ number_format($offlineSale->sgst, 2) }}

Subtotal (Incl. GST): ₹{{ number_format($offlineSale->sub_total + $offlineSale->cgst + $offlineSale->sgst, 2) }}

@if ($offlineSale->discount > 0)

Discount: -₹{{ number_format($offlineSale->discount, 2) }}

@endif @if ($offlineSale->additional_charge > 0)

Additional Charges: +₹{{ number_format($offlineSale->additional_charge, 2) }}

@endif @if ($offlineSale->cash_wallet_deduction > 0)

Cash Wallet Deduction: -₹{{ number_format($offlineSale->cash_wallet_deduction, 2) }}

@endif @if ($offlineSale->shopping_wallet_deduction > 0)

Shopping Wallet Deduction: -₹{{ number_format($offlineSale->shopping_wallet_deduction, 2) }}

@endif

Total Payable: ₹{{ number_format($offlineSale->sub_total + $offlineSale->cgst + $offlineSale->sgst, 2) }}

Payment Mode: {{ ucfirst($offlineSale->payment_mode) }}

--}} Invoice #{{ $offlineSale->order_id }}
@if (!empty($branchInfo['logo'])) Logo @else N/A @endif

{{ $branchInfo['name'] ?? 'Branch Name' }}

{{ $branchInfo['address'] ?? '' }}
Phone: {{ $branchInfo['phone'] ?? '' }}
Email: {{ $branchInfo['email'] ?? '' }}

Tax Invoice

Invoice No: {{ $offlineSale->order_id }}
Date: {{ \Carbon\Carbon::parse($offlineSale->created_at)->format('d-M-Y H:i') }}
Customer: {{ $offlineSale->customer_details['name'] ?? 'Walk-in Customer' }}
@if (!empty($offlineSale->customer_details['phone_number'])) Phone: {{ $offlineSale->customer_details['phone_number'] }}
@endif @if (!empty($offlineSale->customer_details['address'])) Address: {{ $offlineSale->customer_details['address'] }} @endif
{{-- --}} @foreach ($offlineSale->sale_items as $index => $item) @php $price = $item['sell_price'] ?? 0; $qty = $item['quantity'] ?? 1; $gstRate = $item['gst'] ?? 0; $taxable = $price * $qty; // GST extracted from inclusive price $gstAmount = $gstRate > 0 ? ($taxable * $gstRate) / (100 + $gstRate) : 0; $basePrice = $taxable - $gstAmount; @endphp {{-- --}} @endforeach
# Item HSN CodeIMEIRate Qty GST % Total
{{ $loop->iteration }}
{{ $item['name'] }}
@if (isset($item['imei'])) @if (is_array($item['imei'])) @foreach ($item['imei'] as $imei) {{ $imei }}
@endforeach @else {{ $item['imei'] }} @endif @else - @endif
{{ $item['hsn_code'] }} {{ isset($item['imei']) ? (is_array($item['imei']) ? implode(', ', $item['imei']) : $item['imei']) : '-' }} ₹{{ number_format($basePrice, 2) }} {{ $item['quantity'] }} ₹{{ number_format($gstAmount, 2) }}
({{ number_format($item['gst'] ?? 0, 2) }}%)
₹{{ number_format($item['sell_price'], 2) ?? 0 }}

TERMS AND CONDITIONS

1. PRICE: Above prices are inclusive of all taxes.

2. PAYMENT: 100% against order.

3. WARRANTY: Manufacturer's warranty only applicable.

4. Visit the authorized service center within the one-year warranty period for defect repairs.

5. JURISDICTION: Subject to Erode jurisdiction.

6. ON SALES: Goods once sold will not be taken back or replaced.

Subtotal (Excl. Tax): {{ number_format($offlineSale->sub_total - $offlineSale->tax_value, 2) }}

CGST: ₹{{ number_format($offlineSale->cgst, 2) }}

SGST: ₹{{ number_format($offlineSale->sgst, 2) }}

Shop wallet: ₹{{ number_format($offlineSale->cash_wallet_deduction, 2) }}

cash wallet: ₹{{ number_format($offlineSale->shopping_wallet_deduction, 2) }}

Subtotal (Incl. GST): ₹{{ number_format($offlineSale->sub_total, 2) }}

{{--

Subtotal (Incl. GST): ₹{{ number_format($offlineSale->sub_total + $offlineSale->cgst + $offlineSale->sgst, 2) }}

--}} @if ($offlineSale->discount > 0)

Discount: -₹{{ number_format($offlineSale->discount, 2) }}

@endif @if ($offlineSale->additional_charge > 0)

Additional Charges: +₹{{ number_format($offlineSale->additional_charge, 2) }}

@endif

Total Payable: ₹{{ number_format($offlineSale->amount_payable, 2) }} {{-- ₹{{ number_format($offlineSale->sub_total + $offlineSale->cgst + $offlineSale->sgst, 2) }} --}}

Payment Mode: {{ ucfirst($offlineSale->payment_mode) }}