@includeIf('invoices.pdf.invoice_pdf_css')
@if(!is_null($invoice->project) && !is_null($invoice->project->client) && !is_null($invoice->project->client->clientDetails)) @lang("modules.invoices.billedTo"):

{{ $invoice->project->client->clientDetails->company_name }}

@lang('app.address') :
{!! nl2br($invoice->project->clientDetails->address) !!}
@if ($invoice->show_shipping_address === 'yes')
@lang('app.shippingAddress') :
{!! nl2br($invoice->project->clientDetails->shipping_address) !!}
@endif @if($invoiceSetting->show_gst == 'yes' && !is_null($invoice->project->client->clientDetails->gst_number))
@lang('app.gstIn'): {{ $invoice->project->client->clientDetails->gst_number }}
@endif @elseif(!is_null($invoice->client_id) && !is_null($invoice->clientDetails)) @lang("modules.invoices.billedTo"):

{{ $invoice->clientDetails->company_name }}

@lang('app.address') :
{!! nl2br($invoice->clientDetails->address) !!}
@if ($invoice->show_shipping_address === 'yes')
@lang('app.shippingAddress') :
{!! nl2br($invoice->clientDetails->shipping_address) !!}
@endif @if($invoiceSetting->show_gst == 'yes' && !is_null($invoice->clientDetails->gst_number))
@lang('app.gstIn'): {{ $invoice->clientDetails->gst_number }}
@endif @endif @if(is_null($invoice->project) && !is_null($invoice->estimate) && !is_null($invoice->estimate->client->clientDetails)) @lang("modules.invoices.billedTo"):

{{ $invoice->estimate->client->clientDetails->company_name }}

@lang('app.address') :
{!! nl2br($invoice->estimate->client->clientDetails->address) !!}
@if ($invoice->show_shipping_address === 'yes')
@lang('app.shippingAddress') :
{!! nl2br($invoice->estimate->client->clientDetails->shipping_address) !!}
@endif @if($invoiceSetting->show_gst == 'yes' && !is_null($invoice->estimate->client->clientDetails->gst_number))
@lang('app.gstIn'): {{ $invoice->estimate->client->clientDetails->gst_number }}
@endif @endif
@lang("modules.invoices.generatedBy"):

{{ $company->company_name }}

@if(!is_null($company))
{!! nl2br($company->defaultAddress->address) !!}
{{ $company->company_phone }}
@endif @if($invoiceSetting->show_gst == 'yes' && !is_null($invoiceSetting->gst_number))
@lang('app.gstIn'): {{ $invoiceSetting->gst_number }}
@endif

{{ $invoice->invoice_number }}

@if($creditNote)
@lang('app.credit-note'): {{ $creditNote->cn_number }}
@endif
@lang('app.menu.issues') @lang('app.date'): {{ $invoice->issue_date->translatedFormat($company->date_format) }}
@if($invoice->status === 'unpaid')
@lang('app.dueDate'): {{ $invoice->due_date->translatedFormat($company->date_format) }}
@endif
@lang('app.status'): {{ $invoice->status }}
@foreach($invoice->items as $item) @if($item->type == 'item') @endif @endforeach @if($discount != 0 && $discount != '') @endif @foreach($taxes as $key=>$tax) @endforeach @if ($invoice->creditNotes()->count() > 0) @endif
# @lang("modules.invoices.item") @lang("modules.invoices.qty") @lang("modules.invoices.unitPrice") ({!! htmlentities($invoice->currency->currency_code) !!}) @lang("modules.invoices.price") ({!! htmlentities($invoice->currency->currency_code) !!})
{{ ++$count }}

{{ $item->item_name }}

@if(!is_null($item->item_summary))

{!! nl2br(pdfStripTags($item->item_summary)) !!}

@endif

{{ $item->quantity }}

{{ number_format((float)$item->unit_price, 2, '.', '') }}

{{ 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('modules.invoices.appliedCredits') {{ number_format((float)$invoice->appliedCredits(), 2, '.', '') }}
@lang("modules.invoices.total") @lang("modules.invoices.paid") {{ number_format((float)$invoice->getPaidAmount(), 2, '.', '') }}
@lang("modules.invoices.total") @lang("modules.invoices.due") {{ number_format((float)$invoice->amountDue(), 2, '.', '') }}

 


@if(!is_null($invoice->note)) @lang('app.note')
{!! nl2br($invoice->note) !!}
@endif @if($invoice->status == 'unpaid') @lang('modules.invoiceSettings.invoiceTerms')
{!! nl2br($invoiceSetting->invoice_terms) !!} @endif