@extends('layouts.admin') @section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number) @section('content') @if (($recurring = $invoice->recurring) && ($next = $recurring->next()))

{{ trans('recurring.recurring') }}

{{ trans('recurring.message', [ 'type' => mb_strtolower(trans_choice('general.invoices', 1)), 'date' => $next->format($date_format) ]) }}

@endif
{{ $invoice->status->name }}
@if (setting('general.invoice_logo')) @elseif (setting('general.company_logo')) @else @endif
{{ setting('general.company_name') }}
{!! nl2br(setting('general.company_address')) !!}
@if (setting('general.company_tax_number')) {{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}
@endif
@if (setting('general.company_phone')) {{ setting('general.company_phone') }}
@endif {{ setting('general.company_email') }}
{{ trans('invoices.bill_to') }}
{{ $invoice->customer_name }}
{!! nl2br($invoice->customer_address) !!}
@if ($invoice->customer_tax_number) {{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}
@endif
@if ($invoice->customer_phone) {{ $invoice->customer_phone }}
@endif {{ $invoice->customer_email }}
@if ($invoice->order_number) @endif
{{ trans('invoices.invoice_number') }}: {{ $invoice->invoice_number }}
{{ trans('invoices.order_number') }}: {{ $invoice->order_number }}
{{ trans('invoices.invoice_date') }}: {{ Date::parse($invoice->invoiced_at)->format($date_format) }}
{{ trans('invoices.payment_due') }}: {{ Date::parse($invoice->due_at)->format($date_format) }}
@foreach($invoice->items as $item) @endforeach
{{ trans_choice('general.items', 1) }} {{ trans('invoices.quantity') }} {{ trans('invoices.price') }} {{ trans('invoices.total') }}
{{ $item->name }} @if ($item->sku)
{{ trans('items.sku') }}: {{ $item->sku }} @endif
{{ $item->quantity }} @money($item->price, $invoice->currency_code, true) @money($item->total, $invoice->currency_code, true)
@if ($invoice->notes)

{{ trans_choice('general.notes', 2) }}

{{ $invoice->notes }}

@endif
@foreach ($invoice->totals as $total) @if ($total->code != 'total') @else @if ($invoice->paid) @endif @endif @endforeach
{{ trans($total->title) }}: @money($total->amount, $invoice->currency_code, true)
{{ trans('invoices.paid') }}: - @money($invoice->paid, $invoice->currency_code, true)
{{ trans($total->name) }}: @money($total->amount - $invoice->paid, $invoice->currency_code, true)

{{ trans('invoices.histories') }}

@foreach($invoice->histories as $history) @endforeach
{{ trans('general.date') }} {{ trans_choice('general.statuses', 1) }} {{ trans('general.description') }}
{{ Date::parse($history->created_at)->format($date_format) }} {{ $history->status->name }} {{ $history->description }}

{{ trans('invoices.payments') }}

@foreach($invoice->payments as $payment) @endforeach
{{ trans('general.date') }} {{ trans('general.amount') }} {{ trans_choice('general.accounts', 1) }} {{ trans('general.actions') }}
{{ Date::parse($payment->paid_at)->format($date_format) }} @money($payment->amount, $payment->currency_code, true) {{ $payment->account->name }} {!! Form::open([ 'id' => 'invoice-payment-' . $payment->id, 'method' => 'DELETE', 'url' => ['incomes/invoices/payment', $payment->id], 'style' => 'display:inline' ]) !!} {!! Form::button(' ' . trans('general.delete'), array( 'type' => 'button', 'class' => 'btn btn-danger btn-xs', 'title' => trans('general.delete'), 'onclick' => 'confirmDelete("' . '#invoice-payment-' . $payment->id . '", "' . trans_choice('general.payments', 2) . '", "' . trans('general.delete_confirm', ['name' => '' . Date::parse($payment->paid_at)->format($date_format) . ' - ' . money($payment->amount, $payment->currency_code, true) . ' - ' . $payment->account->name . '', 'type' => strtolower(trans_choice('general.revenues', 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")' )) !!} {!! Form::close() !!}
@endsection @push('js') @endpush @push('css') @endpush @push('scripts') @endpush