@extends('layouts.print') @section('title', trans_choice('general.bills', 1) . ': ' . $bill->bill_number) @section('content')
@if (!empty($bill->contact->logo) && !empty($bill->contact->logo->id)) @else @endif
{{ setting('company.name') }}

{!! nl2br(setting('company.address')) !!}

@if (setting('company.tax_number')) {{ trans('general.tax_number') }}: {{ setting('company.tax_number') }} @endif

@if (setting('company.phone')) {{ setting('company.phone') }} @endif

{{ setting('company.email') }}


{{ trans('bills.bill_from') }}
@stack('name_input_start') {{ $bill->contact_name }}
@stack('name_input_end') @stack('address_input_start')

{!! nl2br($bill->contact_address) !!}

@stack('address_input_end') @stack('tax_number_input_start')

@if ($bill->contact_tax_number) {{ trans('general.tax_number') }}: {{ $bill->contact_tax_number }} @endif

@stack('tax_number_input_end') @stack('phone_input_start')

@if ($bill->contact_phone) {{ $bill->contact_phone }} @endif

@stack('phone_input_end') @stack('email_start')

{{ $bill->contact_email }}

@stack('email_input_end')

@stack('bill_number_input_start') {{ trans('bills.bill_number') }}: {{ $bill->bill_number }}

@stack('bill_number_input_end') @stack('order_number_input_start') @if ($bill->order_number) {{ trans('bills.order_number') }}: {{ $bill->order_number }}

@endif @stack('order_number_input_end') @stack('billed_at_input_start') {{ trans('bills.bill_date') }}: @date($bill->billed_at)

@stack('billed_at_input_end') @stack('due_at_input_start') {{ trans('bills.payment_due') }}: @date($bill->due_at)

@stack('due_at_input_end')
@foreach($bill as $item) @endforeach @stack('name_th_start') @stack('name_th_end') @stack('quantity_th_start') @stack('quantity_th_end') @stack('price_th_start') @stack('price_th_end') @stack('total_th_start') @stack('total_th_end') @foreach($bill->items as $item) @include('partials.documents.item.print', ['document' => $bill]) @endforeach
{{ trans_choice('general.items', 1) }}{{ trans('bills.quantity') }}{{ trans('bills.price') }}{{ trans('bills.total') }}
@stack('notes_input_start') @if ($bill->notes)
{{ trans_choice('general.notes', 2) }}

{{ $bill->notes }} @endif @stack('notes_input_end')
@foreach ($bill->totals_sorted as $total) @if ($total->code != 'total') @stack($total->code . '_td_start')
{{ trans($total->title) }}: @money($total->amount, $bill->currency_code, true)

@stack($total->code . '_td_end') @else @if ($bill->paid)
{{ trans('invoices.paid') }}: - @money($bill->paid, $bill->currency_code, true)

@endif @stack('grand_total_td_start')
{{ trans($total->name) }}: @money($total->amount - $bill->paid, $bill->currency_code, true)
@stack('grand_total_td_end') @endif @endforeach
@endsection