@if(!is_null($creditNote->project_id) && !is_null($creditNote->project->clientdetails)) @lang("modules.credit-notes.billedTo"):
{{ ucwords($creditNote->project->client->name) }}
{{ ucwords($creditNote->project->clientdetails->company_name) }}
{!! nl2br($creditNote->project->clientdetails->address) !!}
{{ $creditNote->project->client->email }}
@if($creditNoteSetting->show_gst == 'yes' && !is_null($creditNote->project->clientdetails->gst_number))
@lang('app.gstIn'): {{ $creditNote->project->clientdetails->gst_number }}
@endif @elseif(!is_null($creditNote->client_id)) @lang("modules.credit-notes.billedTo"):
{{ ucwords($creditNote->client->name) }}
{{ ucwords($creditNote->clientdetails->company_name) }}
{!! nl2br($creditNote->clientdetails->address) !!}
{{ $creditNote->client->email }}
@if($creditNoteSetting->show_gst == 'yes' && !is_null($creditNote->clientdetails->gst_number))
@lang('app.gstIn'): {{ $creditNote->clientdetails->gst_number }}
@endif @elseif(is_null($creditNote->client_id) && is_null($creditNote->project_id)) @if($creditNote->invoice->client) @lang("modules.credit-notes.billedTo"):
{{ ucwords($creditNote->invoice->client->name) }}
{{ ucwords($creditNote->invoice->client->client_detail->company_name) }}
{!! nl2br($creditNote->invoice->client->client_detail->address) !!}
{{ $creditNote->invoice->client->email }}
@if($creditNoteSetting->show_gst == 'yes' && !is_null($creditNote->invoice->client->client_detail->gst_number))
@lang('app.gstIn'): {{ $creditNote->invoice->client->client_detail->gst_number }}
@endif @elseif($creditNote->invoice->project) @lang("modules.credit-notes.billedTo"):
{{ ucwords($creditNote->invoice->project->client->name) }}
{{ ucwords($creditNote->invoice->project->clientdetails->company_name) }}
{!! nl2br($creditNote->invoice->project->clientdetails->address) !!}
{{ $creditNote->invoice->project->client->email }}
@if($creditNoteSetting->show_gst == 'yes' && !is_null($creditNote->invoice->project->clientdetails->gst_number))
@lang('app.gstIn'): {{ $creditNote->invoice->project->clientdetails->gst_number }}
@endif @endif @endif
@lang("modules.credit-notes.generatedBy"):

{{ ucwords($global->company_name) }}

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

{{ $creditNote->cn_number }}

@lang('app.menu.issues') Date: {{ $creditNote->issue_date->format($global->date_format) }}
@if($creditNote->status == 'open')
@lang('app.dueDate'): {{ $creditNote->due_date->format($global->date_format) }}
@endif @if($invoiceNumber)
@lang('app.invoiceNumber'): {{ $invoiceNumber->invoice_number }}
@endif
@lang('app.status'): {{ __('app.'.$creditNote->status) }}
@foreach($creditNote->items as $item) @if($item->type == 'item') @endif @endforeach @if(isset($discount) && $discount != 0 && $discount != '') @endif @foreach($taxes as $key=>$tax) @endforeach
# @lang("modules.credit-notes.item") @lang("modules.credit-notes.qty") @lang("modules.credit-notes.unitPrice") ({!! htmlentities($creditNote->currency->currency_code) !!}) @lang("modules.credit-notes.price") ({!! htmlentities($creditNote->currency->currency_code) !!})
{{ ++$count }}

{{ ucfirst($item->item_name) }}

{{ $item->quantity }}

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

{{ number_format((float)$item->amount, 2, '.', '') }}
      @lang("modules.credit-notes.subTotal") {{ number_format((float)$creditNote->sub_total, 2, '.', '') }}
      @lang("modules.credit-notes.discount") -{{ number_format((float)$discount, 2, '.', '') }}
      {{ strtoupper($key) }} {{ number_format((float)$tax, 2, '.', '') }}
@lang("modules.credit-notes.total") {{ number_format((float)$creditNote->total, 2, '.', '') }}
@lang('modules.credit-notes.creditAmountUsed') {{ number_format((float)$creditNote->creditAmountUsed(), 2, '.', '') }}
@lang('modules.credit-notes.creditAmountRemaining') {{ number_format((float)$creditNote->creditAmountRemaining(), 2, '.', '') }}

 


@if(!is_null($creditNote->note)) {!! nl2br($creditNote->note) !!}
@endif @if($creditNote->status == 'open') {!! nl2br($creditNoteSetting->credit_note_terms) !!} @endif