@extends('layouts.admin') @section('title', trans_choice('general.bills', 1) . ': ' . $bill->bill_number) @section('content')
{{ $bill->status->name }}
@if (setting('general.invoice_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('bills.bill_from') }}
{{ $bill->vendor_name }}
{!! nl2br($bill->vendor_address) !!}
@if ($bill->vendor_tax_number) {{ trans('general.tax_number') }}: {{ $bill->vendor_tax_number }}
@endif
@if ($bill->vendor_phone) {{ $bill->vendor_phone }}
@endif {{ $bill->vendor_email }}
@if ($bill->order_number) @endif
{{ trans('bills.bill_number') }}: {{ $bill->bill_number }}
{{ trans('bills.order_number') }}: {{ $bill->order_number }}
{{ trans('bills.bill_date') }}: {{ Date::parse($bill->billed_at)->format($date_format) }}
{{ trans('bills.payment_due') }}: {{ Date::parse($bill->due_at)->format($date_format) }}
@foreach($bill->items as $item) @endforeach
{{ trans_choice('general.items', 1) }} {{ trans('bills.quantity') }} {{ trans('bills.price') }} {{ trans('bills.total') }}
{{ $item->name }} @if ($item->sku)
{{ trans('items.sku') }}: {{ $item->sku }} @endif
{{ $item->quantity }} @money($item->price, $bill->currency_code, true) @money($item->total, $bill->currency_code, true)
@if ($bill->notes)

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

{{ $bill->notes }}

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

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

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

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

@foreach($bill->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' => 'bill-payment-' . $payment->id, 'method' => 'DELETE', 'url' => ['expenses/bills/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("' . '#bill-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