@if (!is_null($invoice->project) && !is_null($invoice->project->client) && !is_null($invoice->project->client->clientDetails)) @php $client = $invoice->project->client; @endphp @elseif(!is_null($invoice->client_id) && !is_null($invoice->clientDetails)) @php $client = $invoice->client; @endphp @endif
@lang('app.invoice')

{{ ucwords(global_setting()->company_name) }}
@if (!is_null($settings)) {!! nl2br(default_address()->address) !!}
{{ global_setting()->company_phone }} @endif @if ($invoiceSetting->show_gst == 'yes' && $invoice->address)
{{ $invoice->address->tax_name }}: {{ $invoice->address->tax_number }} @endif


@lang('modules.invoices.invoiceDate') {{ $invoice->issue_date->format(global_setting()->date_format) }}
@lang('app.dueDate') {{ $invoice->due_date->format(global_setting()->date_format) }}
@if ($invoice->shipping_address) @endif

@lang('modules.invoices.billedTo')
@php if ($invoice->project && $invoice->project->client) { $client = $invoice->project->client; } elseif ($invoice->client_id != '') { $client = $invoice->client; } elseif ($invoice->estimate && $invoice->estimate->client) { $client = $invoice->estimate->client; } @endphp {{ ucwords($client->name) }}
{{ ucwords($client->clientDetails->company_name) }}
{!! nl2br($client->clientDetails->address) !!}

@lang('app.shippingAddress')
{!! nl2br($client->clientDetails->address) !!}

@if ($invoiceSetting->hsn_sac_code_show) @foreach ($invoice->items as $item) @if ($item->type == 'item') @if ($invoiceSetting->hsn_sac_code_show) @endif @if ($item->item_summary != '' || $item->recurringInvoiceItemImage) @endif @endif @endforeach

@if ($invoiceSetting->show_project == 1 && isset($invoice->project->project_name)) @lang('modules.invoices.projectName')
{{ $invoice->project->project_name }} @endif

@lang('app.description')@lang('app.hsnSac') @endif @lang('modules.invoices.qty') @lang('modules.invoices.unitPrice') ({{ $invoice->currency->currency_code }}) @lang('modules.invoices.amount') ({{ $invoice->currency->currency_code }})
{{ ucfirst($item->item_name) }}{{ $item->hsn_sac_code }}{{ $item->quantity }} {{ number_format((float) $item->unit_price, 2, '.', '') }} {{ number_format((float) $item->amount, 2, '.', '') }}
{!! nl2br(strip_tags($item->item_summary)) !!} @if ($item->recurringInvoiceItemImage)

@endif
@if ($discount != 0 && $discount != '') @endif @foreach ($taxes as $key => $tax) @endforeach
@lang('modules.invoices.subTotal') {{ number_format((float) $invoice->sub_total, 2, '.', '') }}
@lang('modules.invoices.discount') {{ number_format((float) $discount, 2, '.', '') }}
{{ strtoupper($key) }} {{ number_format((float) $tax, 2, '.', '') }}
@lang('modules.invoices.total') {{ number_format((float) $invoice->total, 2, '.', '') }}
@foreach ($invoice->items as $item) @if ($item->type == 'item') @endif @endforeach @if ($discount != 0 && $discount != '') @endif @foreach ($taxes as $key => $tax) @endforeach
@lang('app.description') @if ($item->item_summary != '') @endif
{{ ucfirst($item->item_name) }}
{!! nl2br(strip_tags($item->item_summary)) !!}
@lang('modules.invoices.qty') {{ $item->quantity }}
@lang('modules.invoices.unitPrice') ({{ $invoice->currency->currency_code }}) {{ number_format((float) $item->unit_price, 2, '.', '') }}
@lang('modules.invoices.amount') ({{ $invoice->currency->currency_code }}) {{ number_format((float) $item->amount, 2, '.', '') }}
@lang('modules.invoices.subTotal') {{ number_format((float) $invoice->sub_total, 2, '.', '') }}
@lang('modules.invoices.discount') {{ number_format((float) $discount, 2, '.', '') }}
{{ strtoupper($key) }} {{ number_format((float) $tax, 2, '.', '') }}
@lang('modules.invoices.total') {{ number_format((float) $invoice->total, 2, '.', '') }}
@lang('app.note')

{!! $invoice->note ?? '--' !!}

@lang('modules.invoiceSettings.invoiceTerms')

{!! nl2br($invoiceSetting->invoice_terms) !!}