{{-- 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: {{ !empty($offlineSale->changed_date) ? \Carbon\Carbon::parse($offlineSale->changed_date)->format('d-M-Y H:i') : \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 sxsxsxsQty 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' }}

{!! nl2br(e(wordwrap($branchInfo['address'] ?? '', 30, "\n", true))) !!}
+91 {{ $branchInfo['phone'] ?? '' }}
{{ $branchInfo['email'] ?? '' }}

Tax Invoice

Order ID : {{ $offlineSale->order_id }}
Date : {{ !empty($offlineSale->changed_date) ? \Carbon\Carbon::parse($offlineSale->changed_date)->format('d/m/Y') : \Carbon\Carbon::parse($offlineSale->created_at)->format('d/m/Y') }}
Customer Details
Name
:
{{ $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['email']))
Email Address
:
{{ $offlineSale->customer_details['email'] }}
@endif @if (!empty($offlineSale->customer_details['address']))
Address
:
{{ $offlineSale->customer_details['address'] }}
@endif
Shipping Address
Name
:
{{ $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['email']))
Email Address
:
{{ $offlineSale->customer_details['email'] }}
@endif @if (!empty($offlineSale->customer_details['address']))
Address
:
{{ $offlineSale->customer_details['address'] }}
@endif
Order Summary
@foreach ($offlineSale->sale_items as $index => $item) @php $price = $item['sell_price'] ?? 0; $qty = $item['quantity'] ?? 1; $gstRate = $item['gst'] ?? 0; $taxable = $price * $qty; $gstAmount = $gstRate > 0 ? ($taxable * $gstRate) / (100 + $gstRate) : 0; $basePrice = $taxable - $gstAmount; @endphp @endforeach
S No Item HSN Code Rate Qty GST Total
{{ $loop->iteration }}
{{ strlen($item['name']) > 50 ? substr($item['name'], 0, 50) . '...' : $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'] }} ₹{{ number_format($basePrice, 2) }} {{ $item['quantity'] }} ₹{{ number_format($gstAmount, 2) }}
({{ number_format($item['gst'] ?? 0, 2) }}%)
₹{{ number_format(($item['sell_price'] ?? 0) * ($item['quantity'] ?? 1), 2) }}
Total
₹{{ number_format($offlineSale->amount_payable, 2) }}

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.
Payment Details

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) }}

@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 ₹{{ number_format($offlineSale->amount_payable, 2) }}

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