@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('modules.recurringInvoice.completedTotalInvoice')

@if(!is_null($invoice->billing_cycle)) {{$invoice->recurrings->count()}}/{{$invoice->billing_cycle}} @else {{$invoice->recurrings->count()}}/ @endif

@if (count($invoice->recurrings) > 0) @else @endif
@lang('app.invoice')

{{ company()->company_name }}
@if (!is_null($settings)) {!! nl2br(default_address()->address) !!}
{{ company()->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->translatedFormat(company()->date_format) }}
@lang('app.dueDate') --
@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 {{ $client->name_salutation }}
{{ $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 }})
{{ $item->item_name }}{{ $item->hsn_sac_code }}{{ $item->quantity }}@if($item->unit)
{{ $item->unit->unit_type }}@endif
{{ 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, '.', '') }}
{{ $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
{{ $item->item_name }}
{!! nl2br(strip_tags($item->item_summary)) !!}
@lang('modules.invoices.qty') {{ $item->quantity }}@if($item->unit)
{{ $item->unit->unit_type }}@endif
@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, '.', '') }}
{{ $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) !!}