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

{!! nl2br($global->address) !!}
{{ $global->company_phone }}
{{ (is_null($estimate->estimate_number)) ? '#'.$estimate->id : $estimate->estimate_number}}
@lang("modules.estimates.validTill") : {{ $estimate->valid_till->format($global->date_format) }}
@lang('app.status') : {{ __('app.'.$estimate->status) }}
@php $colspan = ($invoiceSetting->hsn_sac_code_show) ? 5 : 4; @endphp

@if($invoiceSetting->hsn_sac_code_show) @endif @foreach($estimate->items as $item) @if($item->type == 'item') @if($invoiceSetting->hsn_sac_code_show) @endif @if(!is_null($item->item_summary)) @endif @endif @endforeach
# @lang("modules.invoices.item") @lang('modules.invoices.hsnSacCode')@lang("modules.invoices.qty") @lang("modules.invoices.unitPrice") ({!! htmlentities($estimate->currency->currency_code) !!}) @lang("modules.invoices.price") ({!! htmlentities($estimate->currency->currency_code) !!})
{{ ++$count }}

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

{{ $item->hsn_sac_code ?? '--' }}{{ $item->quantity }} {{ number_format((float)$item->unit_price, 2, '.', '') }} {{ number_format((float)$item->amount, 2, '.', '') }}
hsn_sac_code_show) colspan="4" @else colspan="3" @endif style="padding: 0!important;"> @if(!is_null($item->item_summary))

{{ $item->item_summary }}

@endif
@if($discount != 0 && $discount != '') @endif @foreach($taxes as $key=>$tax) @endforeach
@lang("modules.invoices.subTotal"): {{ number_format((float)$estimate->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)$estimate->total, 2, '.', '') }}

@if (isset($invoice))
{!! nl2br($invoice->note) !!}
{!! nl2br($invoiceSetting->invoice_terms) !!} @endif

@if($estimate->sign)

@lang('modules.estimates.signature') (@lang('app.customers'))

@endif

@lang('app.thanks')!
{{--Custom fields data--}} @if(isset($fields) && count($fields) > 0)

@lang('modules.projects.otherInfo')

@foreach($fields as $field) @endforeach
{{ ucfirst($field->label) }}

@if( $field->type == 'text') {{$invoice->custom_fields_data['field_'.$field->id] ?? '-'}} @elseif($field->type == 'password') {{$invoice->custom_fields_data['field_'.$field->id] ?? '-'}} @elseif($field->type == 'number') {{$invoice->custom_fields_data['field_'.$field->id] ?? '-'}} @elseif($field->type == 'textarea') {{$invoice->custom_fields_data['field_'.$field->id] ?? '-'}} @elseif($field->type == 'radio') {{ !is_null($invoice->custom_fields_data['field_'.$field->id]) ? $invoice->custom_fields_data['field_'.$field->id] : '-' }} @elseif($field->type == 'select') {{ (!is_null($invoice->custom_fields_data['field_'.$field->id]) && $invoice->custom_fields_data['field_'.$field->id] != '') ? $field->values[$invoice->custom_fields_data['field_'.$field->id]] : '-' }} @elseif($field->type == 'checkbox') {{ !is_null($invoice->custom_fields_data['field_'.$field->id]) ? $field->values[$invoice->custom_fields_data['field_'.$field->id]] : '-' }} @elseif($field->type == 'date') {{ !is_null($invoice->custom_fields_data['field_'.$field->id]) ? \Carbon\Carbon::parse($invoice->custom_fields_data['field_'.$field->id])->format($global->date_format) : '--'}} @endif

@endif