@extends('layouts.app') @push('styles') @endpush @php $addProductPermission = user()->permission('add_product'); @endphp @section('content') @php $billingCycle = $invoice->unlimited_recurring == 1 ? -1 : $invoice->billing_cycle; @endphp @php $recurringInvoice = count($invoice->recurrings) > 0 ? 'disabled' : ''; @endphp

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


@method('PUT')
@if($linkInvoicePermission == 'all')
@endif

@lang('modules.recurringInvoice.invoiceDate')
@php switch ($invoice->rotation) { case 'daily': $rotationType = __('app.daily'); break; case 'weekly': $rotationType = __('modules.recurringInvoice.week'); break; case 'bi-weekly': $rotationType = __('app.bi-week'); break; case 'monthly': $rotationType = __('app.month'); break; case 'quarterly': $rotationType = __('app.quarter'); break; case 'half-yearly': $rotationType = __('app.half-year'); break; case 'annually': $rotationType = __('app.year'); break; default: // } @endphp

@lang('modules.invoices.customerCharged') @if($invoice->rotation != 'daily') @lang('app.every') @endif {{$rotationType}}

@if (count($invoice->recurrings) == 0)

@lang('modules.recurringInvoice.currentInvoiceDate') {{$invoice->issue_date->translatedFormat(company()->date_format)}}

@endif

@if (count($invoice->recurrings) == 0)

@lang('modules.recurringInvoice.soOn')

@endif

@lang('modules.recurringInvoice.billingCycle') {{$billingCycle}}


@if(in_array('products', user_modules()) || in_array('purchase', user_modules()))
@if ($addProductPermission == 'all' || $addProductPermission == 'added') @lang('app.add') @endif
@endif
@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, '.', '') }}
recurringInvoiceItemImage && $item->recurringInvoiceItemImage->external_link) readonly @endif />
@if(count($invoice->recurrings) == 0) @endif
@endforeach
@if(count($invoice->recurrings) == 0) @endif
@lang('modules.invoices.subTotal') {{ number_format((float) $invoice->sub_total, 2, '.', '') }}
@lang('modules.invoices.discount')
{{ number_format((float) $invoice->discount, 2, '.', '') }}
@lang('modules.invoices.tax')
0.00
@lang('modules.invoices.total') {{ number_format((float) $invoice->total, 2, '.', '') }}
@lang('app.save') @lang('app.cancel')
@endsection @push('scripts') @endpush