@php $addProductPermission = user()->permission('add_product'); @endphp @if (!in_array('clients', user_modules())) @lang('messages.enableClientModule') @lang('app.back') @else

@lang('app.invoice') @lang('app.details')


@if (isset($type) && $type == 'proposal') @endif @if (isset($type) && $type == 'estimate') @endif
{{ invoice_setting()->invoice_prefix }}{{ invoice_setting()->invoice_number_separator }}{{ $zero }}
( {{company()->currency->currency_code}} @lang('app.to') {{company()->currency->currency_code}} )

@if (isset($client) && !is_null($client))
@else @endif
@if (isset($project) && !is_null($project))
@else
@endif
@if($linkInvoicePermission == 'all')
@endif

@if (isset($invoice) && $invoice->client) {!! nl2br($invoice->client->clientDetails->address) !!} @elseif (isset($invoice) && isset($client)) {!! nl2br($client->clientDetails->address) !!} @elseif (isset($estimate) && $estimate->client) {!! nl2br($estimate->client->clientDetails->address) !!} @else @lang('messages.selectCustomerForBillingAddress') @endif

@if (isset($invoice) && $invoice->client && $invoice->client->clientDetails->shipping_address) {!! nl2br($invoice->client->clientDetails->shipping_address) !!} @elseif(isset($client) && $client->clientDetails && $client->clientDetails->shipping_address) {!! nl2br($client->clientDetails->shipping_address) !!} @else @lang('app.addShippingAddress') @endif


@if ($addProductPermission == 'all' || $addProductPermission == 'added') @lang('app.add') @endif
@if (isset($invoice)) @foreach ($invoice->items as $key => $item)
@if ($invoiceSetting->hsn_sac_code_show) @endif @if ($invoiceSetting->hsn_sac_code_show) @endif
@lang('app.description')@lang("app.hsnSac") @lang("modules.invoices.qty") @lang("modules.invoices.unitPrice") @lang('modules.invoices.tax') @lang('modules.invoices.amount')
@if (!is_null($item->product_id) && $item->product_id != 0) {{ $item->unit->unit_type }} @else @endif
{{ number_format((float) $item->amount, 2, '.', '') }}
@endforeach @elseif (isset($estimate)) @foreach ($estimate->items as $key => $item)
@if ($invoiceSetting->hsn_sac_code_show) @endif @if ($invoiceSetting->hsn_sac_code_show) @endif
@lang('app.description')@lang("app.hsnSac") @lang('modules.invoices.qty') @lang("modules.invoices.unitPrice") @lang('modules.invoices.tax') @lang('modules.invoices.amount')
@if (!is_null($item->product_id) && $item->product_id != 0) {{ $item->unit->unit_type }} @else @endif
{{ number_format((float) $item->amount, 2, '.', '') }}
@if (isset($type) && $type == 'proposal') proposalItemImage->id) ? $item->proposalItemImage->id : '' }} /> @else estimateItemImage->id) ? $item->estimateItemImage->id : '' }} /> @endif
@endforeach @else
@if ($invoiceSetting->hsn_sac_code_show) @endif @if ($invoiceSetting->hsn_sac_code_show) @endif
@lang('app.description')@lang("app.hsnSac") @lang("modules.invoices.qty") @lang("modules.invoices.unitPrice") @lang('modules.invoices.tax') @lang('modules.invoices.amount')
0.00
@endif

@lang('modules.invoices.subTotal') 0.00
@lang('modules.invoices.discount')
{{ isset($invoice) ? number_format((float) $invoice->discount, 2, '.', '') : '0.00' }}
@lang('modules.invoices.tax')
0.00
@lang('modules.invoices.total') 0.00

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

@if ($paymentGateway->paypal_status == 'active') @endif @if ($paymentGateway->stripe_status == 'active') @endif @if ($paymentGateway->razorpay_status == 'active') @endif @if ($paymentGateway->paystack_status == 'active') @endif @if ($paymentGateway->mollie_status == 'active') @endif @if ($paymentGateway->payfast_status == 'active') @endif @if ($paymentGateway->authorize_status == 'active') @endif @if ($paymentGateway->square_status == 'active') @endif @if ($paymentGateway->flutterwave_status == 'active') @endif
@lang('app.cancel')
@endif