@extends('layouts.app') @section('content')
@include('backend.accounting.invoice.invoice-actions') @php $date_format = get_company_option('date_format','Y-m-d'); @endphp @if($invoice->related_to == 'contacts' && isset($invoice->client)) @php $client_currency = $invoice->client->currency; @endphp @php $client = $invoice->client; @endphp @else @php $client_currency = $invoice->project->client->currency; @endphp @php $client = $invoice->project->client; @endphp @endif
{{ _lang('View Invoice') }}

{{ get_company_option('company_name') }}

{{ get_company_option('address') }}
{{ get_company_option('email') }}
{!! get_company_option('vat_id') != '' ? _lang('VAT ID').': '.clean(get_company_option('vat_id')).'
' : '' !!} {!! get_company_option('reg_no')!= '' ? _lang('REG NO').': '.clean(get_company_option('reg_no')).'
' : '' !!}
{{ _lang('Invoice To') }}
{{ $client->contact_name }}
{{ $client->contact_email }}
{!! $client->company_name != '' ? clean($client->company_name).'
' : '' !!} {!! $client->address != '' ? clean($client->address).'
' : '' !!} {!! $client->vat_id != '' ? _lang('VAT ID').': '.clean($client->vat_id).'
' : '' !!} {!! $client->reg_no != '' ? _lang('REG NO').': '.clean($client->reg_no).'
' : '' !!}
{{ _lang('Invoice Details') }}
{{ _lang('Invoice') }} #: {{ $invoice->invoice_number }}
{{ _lang('Invoice Date') }}: {{ date($date_format, strtotime( $invoice->invoice_date)) }}
{{ _lang('Due Date') }}: {{ date($date_format, strtotime( $invoice->due_date)) }}
{{ _lang('Payment Status') }}: {{ _dlang(str_replace('_',' ',$invoice->status)) }}
@php $currency = currency(); @endphp
@foreach($invoice->invoice_items as $item) @endforeach
{{ _lang('Name') }} {{ _lang('Quantity') }} {{ _lang('Unit Cost') }} {{ _lang('Discount') }} {{ _lang('Tax method') }} {{ _lang('Tax') }} {{ _lang('Sub Total') }}
{{ $item->item->item_name }}
{{ $item->description }}
{{ $item->quantity }} {{ decimalPlace($item->unit_cost, $currency) }} {{ decimalPlace($item->discount, $currency) }} {{ strtoupper($item->tax_method) }} {{ decimalPlace($item->tax_amount, $currency) }} {{ decimalPlace($item->sub_total, $currency) }}
@php $base_currency = base_currency(); @endphp
@if($invoice->status != 'Paid') @endif
{{ _lang('Tax') }} {{ decimalPlace($invoice->tax_total, $currency) }} @if($client_currency != $base_currency)
{{ decimalPlace(convert_currency($base_currency, $client_currency, $invoice->tax_total), currency($client_currency)) }} @endif
{{ _lang('Grand Total') }} {{ decimalPlace($invoice->grand_total, $currency) }} @if($client_currency != $base_currency)
{{ decimalPlace($invoice->converted_total, currency($client_currency)) }} @endif
{{ _lang('Total Paid') }} {{ decimalPlace($invoice->paid, $currency) }} @if($client_currency != $base_currency)
{{ decimalPlace(convert_currency($base_currency, $client_currency, $invoice->paid), currency($client_currency)) }} @endif
{{ _lang('Amount Due') }} {{ decimalPlace(($invoice->grand_total - $invoice->paid), $currency) }} @if($invoice->client->currency != $base_currency)
{{ decimalPlace(convert_currency($base_currency, $client_currency, ($invoice->grand_total - $invoice->paid)), currency($client_currency)) }} @endif
@if( ! $transactions->isEmpty() )
@foreach($transactions as $transaction) @endforeach
{{ _lang('Payment History') }}
{{ _lang('Date') }} {{ _lang('Account') }} {{ _lang('Amount') }} {{ _lang('Payment Method') }}
{{ date($date_format, strtotime($transaction->trans_date)) }} {{ $transaction->account->account_title }} {{ decimalPlace($transaction->amount, $currency) }} {{ $transaction->payment_method->name }}
@endif @if($invoice->note != '')
{{ $invoice->note }}
@endif @if(get_company_option('invoice_footer') != '')
{!! xss_clean(get_company_option('invoice_footer')) !!}
@endif
@endsection