@lang('app.invoice')

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

@if ($creditNote) @endif @if($invoice->status == 'unpaid') @endif
@lang('modules.invoices.invoiceNumber') {{ $invoice->invoice_number }}
@lang('app.credit-note') {{ $creditNote->cn_number }}
@lang('modules.invoices.invoiceDate') {{ $invoice->issue_date->format(global_setting()->date_format) }}
@lang('app.dueDate') {{ $invoice->due_date->format(global_setting()->date_format) }}
@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.invoices.billedTo")
{{ ucfirst($client->name) }}
{{ ucwords($client->clientDetails->company_name) }}
{!! nl2br($client->clientDetails->address) !!}

@if ($invoiceSetting->hsn_sac_code_show) @endif @foreach ($invoice->items as $item) @if($item->type == 'item') @if ($invoiceSetting->hsn_sac_code_show) @endif @if ($item->item_summary != '' || $item->invoiceItemImage) @endif @endif @endforeach
@lang('app.description')@lang("app.hsnSac")@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->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 ($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, '.', '') }} {!! htmlentities($invoice->currency->currency_code) !!}
@lang("modules.invoices.total") @lang("modules.invoices.due") {{ number_format((float) $invoice->amountDue(),2,'.', '') }} {!! htmlentities($invoice->currency->currency_code) !!}
@if (count($payments) > 0)

@lang('app.menu.payments') ({{ $invoice->invoice_number }})

@foreach($payments as $key => $payment) @endforeach
# @lang("modules.invoices.price") @lang("modules.invoices.paymentMethod") @lang("modules.invoices.paidOn")
{{ $key + 1 }} {{ currency_formatter($payment->amount, '') }} {{ $invoice->currency->currency_code }} @php $method = '--'; if(!is_null($payment->offline_method_id)) { $method = $payment->offlineMethod->name; } elseif(isset($payment->gateway)){ $method = $payment->gateway; } @endphp {{ $method }} {{ $payment->paid_on->format(global_setting()->date_format) }}
@endif
@lang('app.note')
@if (isset($taxes) && invoice_setting()->tax_calculation_msg == 1) @endif
@lang('modules.invoiceSettings.invoiceTerms')
{!! nl2br($invoiceSetting->invoice_terms) !!}

@if ($invoice->calculate_tax == 'after_discount') @lang('messages.calculateTaxAfterDiscount') @else @lang('messages.calculateTaxBeforeDiscount') @endif

@if ($invoice->signature)
@lang('app.signature')

({{ $invoice->signature->full_name }})

@endif