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

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


@if ($invoiceExist && $creditNote->invoice_id) @endif
@lang('app.credit-note') {{ $creditNote->cn_number }}
@lang('modules.invoices.invoiceNumber') {{ $creditNote->invoice->invoice_number }}
@lang('app.creditNoteDate') {{ $creditNote->issue_date->translatedFormat(company()->date_format) }}

@lang("modules.invoices.billedTo")
{{ $client->name_salutation }}
{{ $client->clientDetails->company_name }}
{!! nl2br($client->clientDetails->address) !!} @if (($invoiceSetting->show_project == 1) && (isset($creditNote->project)))

@lang("modules.invoices.projectName")
{{ $creditNote->project->project_name }} @endif

@lang('modules.credit-notes.'.$creditNote->status)
@if ($creditNoteSetting->hsn_sac_code_show) @foreach ($creditNote->items as $item) @if ($item->type == 'item') @if ($creditNoteSetting->hsn_sac_code_show) @endif @if ($item->item_summary || $item->creditNoteItemImage) @endif @endif @endforeach
@lang('app.description')@lang("app.hsnSac") @endif @lang('modules.invoices.qty') @lang("modules.invoices.unitPrice") @lang("modules.invoices.tax") @lang("modules.invoices.amount") ({{ $creditNote->currency->currency_code }})
{{ $item->item_name }}{{ $item->hsn_sac_code ? $item->hsn_sac_code : '--' }}{{ $item->quantity }}@if($item->unit)
{{ $item->unit->unit_type }}@endif
{{ currency_format($item->unit_price, $creditNote->currency_id, false) }} {{ $item->tax_list }} {{ currency_format($item->amount, $creditNote->currency_id, false) }}
{!! nl2br(strip_tags($item->item_summary)) !!} @if ($item->creditNoteItemImage)

@endif
@if ($discount != 0 && $discount != '') @endif @foreach ($taxes as $key => $tax) @endforeach
@lang("modules.invoices.subTotal")
@lang("modules.invoices.discount")
{{ $key }}
@lang('app.adjustmentAmount')
@lang("modules.invoices.total")
@lang("modules.credit-notes.creditAmountUsed")
@lang('modules.credit-notes.creditAmountRemaining')
@if ($discount != 0 && $discount != '') @endif @foreach ($taxes as $key => $tax) @endforeach
{{ currency_format($creditNote->sub_total, $creditNote->currency_id, false) }}
{{ currency_format($discount, $creditNote->currency_id, false) }}
{{ currency_format($tax, $creditNote->currency_id, false) }}
{{ currency_format($creditNote->adjustment_amount, $creditNote->currency_id, false) }}
{{ currency_format($creditNote->total, $creditNote->currency_id, false) }}
{{ currency_format($creditNote->creditAmountUsed(), $creditNote->currency_id, false) }}
{{ currency_format($creditNote->creditAmountRemaining(), $creditNote->currency_id, false) }} {{ $creditNote->currency->currency_code }}
@foreach ($creditNote->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 != '' || $item->creditNoteItemImage) @endif
{{ $item->item_name }}
{!! nl2br(strip_tags($item->item_summary)) !!} @if ($item->creditNoteItemImage)

@endif
@lang('modules.invoices.qty') {{ $item->quantity }}
@lang("modules.invoices.unitPrice") ({{ $creditNote->currency->currency_code }}) {{ currency_format($item->unit_price, $creditNote->currency_id, false) }}
@lang("modules.invoices.amount") ({{ $creditNote->currency->currency_code }}) {{ currency_format($item->amount, $creditNote->currency_id, false) }}
@lang("modules.invoices.subTotal") {{ currency_format($creditNote->sub_total, $creditNote->currency_id, false) }}
@lang("modules.invoices.discount") {{ currency_format($discount, $creditNote->currency_id, false) }}
{{ $key }} {{ currency_format($tax, $creditNote->currency_id, false) }}
@lang("modules.invoices.total") {{ currency_format($creditNote->total, $creditNote->currency_id, false) }}
@lang('modules.credit-notes.creditAmountUsed') {{ currency_format($creditNote->creditAmountUsed(), $creditNote->currency_id, false) }}
@lang("modules.invoices.total") @lang("modules.invoices.due") {{ currency_format($creditNote->creditAmountRemaining(), $creditNote->currency_id, false) }} {{ $creditNote->currency->currency_code }}
@if (isset($invoiceSetting->other_info)) @endif
@lang('app.note')

{!! $creditNote->note ? nl2br($creditNote->note) : '--' !!}

@lang('modules.invoiceSettings.invoiceTerms')

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

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