@php // Retrieve settings data $settings_data = \App\Models\Utility::settingsById($ewaybill->created_by); // Generate address parts $addressParts = array_filter([ $settings_data['company_city'] ?? '', $settings_data['company_state'] ?? '', $settings_data['company_zipcode'] ?? '', ]); $logo = \App\Models\Utility::get_file('uploads/logo'); $company_logo = \App\Models\Utility::GetLogo(); // State comparison for tax calculation $companyState = strtolower(trim($settings_data['company_state'] ?? '')); $billingState = strtolower(trim($customer->billing_state ?? '')); $isSameState = !empty($companyState) && !empty($billingState) && $companyState === $billingState; @endphp @php $ewaybill_logo = Utility::getValByName('ewaybill_logo'); $img = !empty($ewaybill_logo) ? asset('storage/ewaybill_logo/' . $ewaybill_logo) : asset('storage/uploads/logo/' . (!empty($company_logo) ? $company_logo : 'logo-dark.png')); @endphp
{{ $settings['company_name'] ?? '' }}
{{ $settings_data['company_address'] ?? '' }}
{{ implode(' , ', $addressParts) ?: '' }}
{{ __('Tel:') }} {{ $settings['company_telephone'] ?? '' }}, {{ __('E-Mail:') }} {{ $settings['mail_from_address'] ?? '' }}
@if($settings['vat_gst_number_switch'] == 'on') @if(!empty($settings['tax_type']) && !empty($settings['vat_number'])){{$settings['tax_type'].' '. __('Number')}} : {{$settings['vat_number']}}
@endif @endif| {{ __('IRN') }} | : | {{ $ewaybill->irn ?? '' }} | |||
| {{ __('Ack No') }} | : | {{ \App\Models\Utility::ebillNumberFormat($settings, $ewaybill->ewaybill_id) }} | {{ __('Ack Date') }} | : | {{ \App\Models\Utility::dateFormat($settings, $ewaybill->issue_date) }} |
{{ __('GSTIN/UIN:') }} {{ $customer->tax_number ?? '' }}
{{ __('PAN NO:') }} {{ $settings_data['pan_number'] ?? '' }}
{{ $customer->billing_name }}
{{ $customer->billing_address ?? '' }}
{{ $customer->billing_city ?? '' }},
{{ __('State Name :') }} {{ $customer->billing_state ?? '' }}- {{ $customer->billing_zip ?? '' }}
{{ __('GSTIN NO:') }} {{ $customer->tax_number ?? '' }}
-
@endif
{{ $customer->shipping_name }}
{{ $customer->shipping_address ?? '' }}
{{ $customer->shipping_city ?? '' }},
{{ __('State Name :') }} {{ $customer->shipping_state ?? '' }} - {{ $customer->billing_zip ?? '' }}
{{ __('GSTIN NO:') }} {{ $customer->tax_number ?? '' }}
-
@endif| Date | : | {{ \App\Models\Utility::dateFormat($settings, $ewaybill->due_date) }} |
| E-way Bill No | : | {{ $ewaybill->converted_ewaybill_id ?? \App\Models\Utility::ebillNumberFormat($settings, $ewaybill->ewaybill_id) }} |
| Delivery Distance | : | {{ $ewaybill->delivery_distance ?? '' }} |
| Buyer Order No | : | {{ $ewaybill->buyer_order_no ?? '' }} |
| {{ __('S.No') }} | {{ __('Description') }} | {{ __('HSN/SAC Code') }} | {{ __('GST Rate') }} | {{ __('Qty') }} | {{ __('Unit') }} | {{ __('(Incl)Rate') }} | {{ __('Rate') }} | {{ __('Disc') }} | {{ __('Amount') }} |
|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $item->name ?? '' }} | {{ $item->expense_chartaccount_code ?? '' }} | @php $groupedTaxes = []; foreach($item->itemTax as $tax) { $key = $tax['name'] . '|' . $tax['rate']; if (!isset($groupedTaxes[$key])) { $groupedTaxes[$key] = $tax; $groupedTaxes[$key]['price'] = floatval(str_replace(',', '', $tax['price'])); } else { $groupedTaxes[$key]['price'] += floatval(str_replace(',', '', $tax['price'])); } } @endphp@foreach($groupedTaxes as $tax) {{ $tax['name'] }} ({{ $tax['rate'] }}) @endforeach | {{ $item->quantity ?? 0 }} | {{ $unitDisplay }} | {{ number_format($item->price ?? 0, 2) }} | {{ number_format($item->price ?? 0, 2) }} | {{ $item->discount ? number_format($item->discount, 2) : '0' }} | {{ number_format($itemTotal, 2) }} |
| No items found | |||||||||
| {{ __('TOTAL') }} | {{ number_format($totalAmount, 2) }} | ||||||||
| Bank Name | : | {{ $invoicePayment->bankAccount->bank_name ?? '' }} |
| Ac/No | : | {{ $invoicePayment->bankAccount->holder_name ?? '' }} |
| Branch & IFS Code | : | {{ $invoicePayment->bankAccount->branch_name ?? '' }} {{ $invoicePayment->bankAccount->ifs_code ?? '' }} |
| No bank details available. | ||
| Basic Amount | {{ number_format($totalAmount, 2) }} |
| VAT | {{ number_format($totalVat, 2) }} |
| CGST | {{ number_format($totalCgst, 2) }} |
| SGST | {{ number_format($totalSgst, 2) }} |
| IGST | {{ number_format($totalIgst, 2) }} |
| Round Off | {{ number_format($roundOff, 2) }} |
| Grand Total | {{ number_format($grandTotal, 2) }} |
| {{ __('Paid') }} | {{ number_format($ewaybill->getTotal() - $ewaybill->getDue() - $ewaybill->ewaybillTotalCreditNote(), 2) }} |
| {{ __('Credit Note') }} | {{ number_format($ewaybill->ewaybillTotalCreditNote(), 2) }} |
| {{ __('Due') }} | {{ number_format($ewaybill->getDue(), 2) }} |
| Taxable Value | @if (!empty($settings['tax_type']) && strtolower($settings['tax_type']) === 'vat')VAT | @elseif ($isSameState)CGST | SGST | @elseif ($totalIgst > 0)IGST | @endifTotal Tax Amount | ||||
|---|---|---|---|---|---|---|---|---|---|
| Rate | Amount | @elseif ($isSameState)Rate | Amount | Rate | Amount | @elseif ($totalIgst > 0)Rate | Amount | @endif||
| {{ number_format($totalAmount, 2) }} | @if (!empty($settings['tax_type']) && strtolower($settings['tax_type']) === 'vat'){{ number_format($vatRate, 2) }}% | {{ number_format($totalVat, 2) }} | @elseif ($isSameState){{ number_format($cgstRate, 2) }}% | {{ number_format($totalCgst, 2) }} | {{ number_format($sgstRate, 2) }}% | {{ number_format($totalSgst, 2) }} | @elseif ($totalIgst > 0){{ number_format($igstRate, 2) }}% | {{ number_format($totalIgst, 2) }} | @endif{{ number_format($totalTax, 2) }} |
| Total: {{ number_format($totalAmount, 2) }} | @if (!empty($settings['tax_type']) && strtolower($settings['tax_type']) === 'vat'){{ number_format($totalVat, 2) }} | @elseif ($isSameState){{ number_format($totalCgst, 2) }} | {{ number_format($totalSgst, 2) }} | @elseif ($totalIgst > 0){{ number_format($totalIgst, 2) }} | @endif{{ number_format($totalTax, 2) }} | ||||
Terms & Conditions:
For {{ $settings['company_name'] ?? '' }}
Authorized Signatory
SUBJECT TO {{ strtoupper($settings['company_state'] ?? 'YOUR STATE') }} JURISDICTION
This is a Computer Generated Invoice