@php $viewEstimatePermission = user()->permission('view_estimates'); $addEstimatePermission = user()->permission('add_estimates'); $editEstimatePermission = user()->permission('edit_estimates'); $deleteEstimatePermission = user()->permission('delete_estimates'); $addInvoicePermission = user()->permission('add_invoices'); @endphp @if (!in_array('client', user_roles())) @if (!is_null($invoice->last_viewed)) {{ $invoice->client->name }} @lang('app.viewedOn') {{ $invoice->last_viewed->timezone($settings->timezone)->translatedFormat($settings->date_format) }} @lang('app.at') {{ $invoice->last_viewed->timezone($settings->timezone)->translatedFormat($settings->time_format) }} @lang('app.using') @lang('modules.attendance.ipAddress'):{{ $invoice->ip_address }} @endif @endif
@lang('app.estimate')

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


@lang('modules.estimates.estimatesNumber') {{ $invoice->estimate_number }}
@lang('modules.estimates.validTill') {{ $invoice->valid_till->translatedFormat(company()->date_format) }}
@if ( ($invoice->client || $invoice->clientDetails) && ($invoice->client->name || $invoice->client->email || $invoice->client->mobile || $invoice->clientDetails->company_name || $invoice->clientDetails->address ) && (invoice_setting()->show_client_name == 'yes' || invoice_setting()->show_client_email == 'yes' || invoice_setting()->show_client_phone == 'yes' || invoice_setting()->show_client_company_name == 'yes' || invoice_setting()->show_client_company_address == 'yes') )

@lang("modules.invoices.billedTo")
@if ($invoice->client && $invoice->client->name && invoice_setting()->show_client_name == 'yes') {{ $invoice->client->name }}
@endif @if ($invoice->client && $invoice->client->email && invoice_setting()->show_client_email == 'yes') {{ $invoice->client->email }}
@endif @if ($invoice->client && $invoice->client->mobile && invoice_setting()->show_client_phone == 'yes') +{{$invoice->clientdetails->user->country->phonecode}} {{ $invoice->client->mobile }}
@endif @if ($invoice->clientDetails && $invoice->clientDetails->company_name && invoice_setting()->show_client_company_name == 'yes') {{ $invoice->clientDetails->company_name }}
@endif @if ($invoice->clientDetails && $invoice->clientDetails->address && invoice_setting()->show_client_company_address == 'yes') {!! nl2br($invoice->clientDetails->address) !!} @endif

@endif
@if ($invoice->clientDetails->company_logo)


@endif @lang('modules.estimates.' . $invoice->status)


@lang('modules.invoices.description')
{!! $invoice->description !!}
@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->estimateItemImage) @endif @endif @endforeach
@lang('app.description')@lang('app.hsnSac') @lang('modules.invoices.qty') @lang('modules.invoices.unitPrice') ({{ $invoice->currency->currency_code }}) @lang('modules.invoices.tax') @lang('modules.invoices.amount') ({{ $invoice->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, $invoice->currency_id, false) }} {{ $item->tax_list }} {{ currency_format($item->amount, $invoice->currency_id, false) }}
{!! nl2br(strip_tags($item->item_summary)) !!} @if ($item->estimateItemImage)

@endif
@if ($discount != 0 && $discount != '') @endif @foreach ($taxes as $key => $tax) @endforeach
@lang('modules.invoices.subTotal')
@lang('modules.invoices.discount')
{{ $key }}
@lang('modules.invoices.total')
@if ($discount != 0 && $discount != '') @endif @foreach ($taxes as $key => $tax) @endforeach
{{ currency_format($invoice->sub_total, $invoice->currency_id, false) }}
{{ currency_format($discount, $invoice->currency_id, false) }}
{{ currency_format($tax, $invoice->currency_id, false) }}
{{ currency_format($invoice->total, $invoice->currency_id, false) }} {{ $invoice->currency->currency_code }}
@foreach ($invoice->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->estimateItemImage) @endif
{{ $item->item_name }}
{!! nl2br(strip_tags($item->item_summary)) !!} @if ($item->estimateItemImage)

@endif
@lang('modules.invoices.qty') {{ $item->quantity }} @if($item->unit)
{{ $item->unit->unit_type }}@endif
@lang('modules.invoices.unitPrice') ({{ $invoice->currency->currency_code }}) {{ currency_format($item->unit_price, $invoice->currency_id, false) }}
@lang('modules.invoices.amount') ({{ $invoice->currency->currency_code }}) {{ currency_format($item->amount, $invoice->currency_id, false) }}
@lang('modules.invoices.subTotal') {{ currency_format($item->sub_total, $invoice->currency_id, false) }}
@lang('modules.invoices.discount') {{ currency_format($discount, $invoice->currency_id, false) }}
{{ $key }} {{ currency_format($tax, $invoice->currency_id, false) }}
@lang('modules.invoices.total') {{ currency_format($invoice->total, $invoice->currency_id, false) }}
@if (isset($taxes) && invoice_setting()->tax_calculation_msg == 1) @endif
@lang('app.note')

{!! !empty($invoice->note) ? $invoice->note : '--' !!}

@lang('modules.invoiceSettings.invoiceTerms')

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

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

@if ($invoice->sign)
@lang('modules.estimates.signature')

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

@endif
{{-- Custom fields data --}} @if (isset($fields) && count($fields) > 0)
@lang('modules.projects.otherInfo')
@endif @push('scripts') @endpush