Invoice/ Bill show and print add stacks

This commit is contained in:
cuneytsenturk 2018-11-07 22:32:46 +03:00
parent fbf9d5af41
commit 52c3f254de
4 changed files with 216 additions and 24 deletions

View File

@ -29,40 +29,58 @@
<div class="col-58"> <div class="col-58">
<div class="text"> <div class="text">
{{ trans('bills.bill_from') }}<br><br> {{ trans('bills.bill_from') }}<br><br>
@stack('name_input_start')
<strong>{{ $bill->vendor_name }}</strong><br> <strong>{{ $bill->vendor_name }}</strong><br>
@stack('name_input_end')
@stack('address_input_start')
{!! nl2br($bill->vendor_address) !!}<br> {!! nl2br($bill->vendor_address) !!}<br>
@stack('address_input_end')
@stack('tax_number_input_start')
@if ($bill->vendor_tax_number) @if ($bill->vendor_tax_number)
{{ trans('general.tax_number') }}: {{ $bill->vendor_tax_number }}<br> {{ trans('general.tax_number') }}: {{ $bill->vendor_tax_number }}<br>
@endif @endif
@stack('tax_number_input_end')
<br> <br>
@stack('phone_input_start')
@if ($bill->vendor_phone) @if ($bill->vendor_phone)
{{ $bill->vendor_phone }}<br> {{ $bill->vendor_phone }}<br>
@endif @endif
@stack('phone_input_end')
@stack('email_start')
{{ $bill->vendor_email }} {{ $bill->vendor_email }}
@stack('email_input_end')
</div> </div>
</div> </div>
<div class="col-42"> <div class="col-42">
<div class="text"> <div class="text">
<table> <table>
<tbody> <tbody>
@stack('bill_number_input_start')
<tr> <tr>
<th>{{ trans('bills.bill_number') }}:</th> <th>{{ trans('bills.bill_number') }}:</th>
<td class="text-right">{{ $bill->bill_number }}</td> <td class="text-right">{{ $bill->bill_number }}</td>
</tr> </tr>
@stack('bill_number_input_end')
@stack('order_number_input_start')
@if ($bill->order_number) @if ($bill->order_number)
<tr> <tr>
<th>{{ trans('bills.order_number') }}:</th> <th>{{ trans('bills.order_number') }}:</th>
<td class="text-right">{{ $bill->order_number }}</td> <td class="text-right">{{ $bill->order_number }}</td>
</tr> </tr>
@endif @endif
@stack('order_number_input_end')
@stack('billed_at_input_start')
<tr> <tr>
<th>{{ trans('bills.bill_date') }}:</th> <th>{{ trans('bills.bill_date') }}:</th>
<td class="text-right">{{ Date::parse($bill->billed_at)->format($date_format) }}</td> <td class="text-right">{{ Date::parse($bill->billed_at)->format($date_format) }}</td>
</tr> </tr>
@stack('billed_at_input_end')
@stack('due_at_input_start')
<tr> <tr>
<th>{{ trans('bills.payment_due') }}:</th> <th>{{ trans('bills.payment_due') }}:</th>
<td class="text-right">{{ Date::parse($bill->due_at)->format($date_format) }}</td> <td class="text-right">{{ Date::parse($bill->due_at)->format($date_format) }}</td>
</tr> </tr>
@stack('due_at_input_end')
</tbody> </tbody>
</table> </table>
</div> </div>
@ -72,24 +90,48 @@
<table class="lines"> <table class="lines">
<thead> <thead>
<tr> <tr>
@stack('actions_th_start')
@stack('actions_th_end')
@stack('name_th_start')
<th class="item">{{ trans_choice('general.items', 1) }}</th> <th class="item">{{ trans_choice('general.items', 1) }}</th>
@stack('name_th_end')
@stack('quantity_th_start')
<th class="quantity">{{ trans('bills.quantity') }}</th> <th class="quantity">{{ trans('bills.quantity') }}</th>
@stack('quantity_th_end')
@stack('price_th_start')
<th class="price">{{ trans('bills.price') }}</th> <th class="price">{{ trans('bills.price') }}</th>
@stack('price_th_end')
@stack('taxes_th_start')
@stack('taxes_th_end')
@stack('total_th_start')
<th class="total">{{ trans('bills.total') }}</th> <th class="total">{{ trans('bills.total') }}</th>
@stack('total_th_end')
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach($bill->items as $item) @foreach($bill->items as $item)
<tr> <tr>
@stack('actions_td_start')
@stack('actions_td_end')
@stack('name_td_start')
<td class="item"> <td class="item">
{{ $item->name }} {{ $item->name }}
@if ($item->sku) @if ($item->sku)
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small> <br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
@endif @endif
</td> </td>
@stack('name_td_end')
@stack('quantity_td_start')
<td class="quantity">{{ $item->quantity }}</td> <td class="quantity">{{ $item->quantity }}</td>
@stack('quantity_td_end')
@stack('price_td_start')
<td class="price">@money($item->price, $bill->currency_code, true)</td> <td class="price">@money($item->price, $bill->currency_code, true)</td>
@stack('price_td_end')
@stack('taxes_td_start')
@stack('taxes_td_end')
@stack('total_td_start')
<td class="total">@money($item->total, $bill->currency_code, true)</td> <td class="total">@money($item->total, $bill->currency_code, true)</td>
@stack('total_td_end')
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
@ -97,22 +139,26 @@
<div class="row"> <div class="row">
<div class="col-58"> <div class="col-58">
@stack('notes_input_start')
@if ($bill->notes) @if ($bill->notes)
<table class="text" style="page-break-inside: avoid;"> <table class="text" style="page-break-inside: avoid;">
<tr><th>{{ trans_choice('general.notes', 2) }}</th></tr> <tr><th>{{ trans_choice('general.notes', 2) }}</th></tr>
<tr><td>{{ $bill->notes }}</td></tr> <tr><td>{{ $bill->notes }}</td></tr>
</table> </table>
@endif @endif
@stack('notes_input_end')
</div> </div>
<div class="col-42"> <div class="col-42">
<table class="text" style="page-break-inside: avoid;"> <table class="text" style="page-break-inside: avoid;">
<tbody> <tbody>
@foreach ($bill->totals as $total) @foreach ($bill->totals as $total)
@if ($total->code != 'total') @if ($total->code != 'total')
@stack($total->code . '_td_start')
<tr> <tr>
<th>{{ trans($total->title) }}:</th> <th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td> <td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
</tr> </tr>
@stack($total->code . '_td_end')
@else @else
@if ($bill->paid) @if ($bill->paid)
<tr class="text-success"> <tr class="text-success">
@ -120,10 +166,12 @@
<td class="text-right">- @money($bill->paid, $bill->currency_code, true)</td> <td class="text-right">- @money($bill->paid, $bill->currency_code, true)</td>
</tr> </tr>
@endif @endif
@stack('grand_total_td_start')
<tr> <tr>
<th>{{ trans($total->name) }}:</th> <th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $bill->paid, $bill->currency_code, true)</td> <td class="text-right">@money($total->amount - $bill->paid, $bill->currency_code, true)</td>
</tr> </tr>
@stack('grand_total_td_end')
@endif @endif
@endforeach @endforeach
</tbody> </tbody>

View File

@ -119,40 +119,58 @@
<div class="col-xs-7"> <div class="col-xs-7">
{{ trans('bills.bill_from') }} {{ trans('bills.bill_from') }}
<address> <address>
@stack('name_input_start')
<strong>{{ $bill->vendor_name }}</strong><br> <strong>{{ $bill->vendor_name }}</strong><br>
@stack('name_input_end')
@stack('address_input_start')
{!! nl2br($bill->vendor_address) !!}<br> {!! nl2br($bill->vendor_address) !!}<br>
@stack('address_input_end')
@stack('tax_number_input_start')
@if ($bill->vendor_tax_number) @if ($bill->vendor_tax_number)
{{ trans('general.tax_number') }}: {{ $bill->vendor_tax_number }}<br> {{ trans('general.tax_number') }}: {{ $bill->vendor_tax_number }}<br>
@endif @endif
@stack('tax_number_input_end')
<br> <br>
@stack('phone_input_start')
@if ($bill->vendor_phone) @if ($bill->vendor_phone)
{{ $bill->vendor_phone }}<br> {{ $bill->vendor_phone }}<br>
@endif @endif
@stack('phone_input_end')
@stack('email_start')
{{ $bill->vendor_email }} {{ $bill->vendor_email }}
@stack('email_input_end')
</address> </address>
</div> </div>
<div class="col-xs-5"> <div class="col-xs-5">
<div class="table-responsive"> <div class="table-responsive">
<table class="table no-border"> <table class="table no-border">
<tbody> <tbody>
<tr> @stack('bill_number_input_start')
<th>{{ trans('bills.bill_number') }}:</th> <tr>
<td class="text-right">{{ $bill->bill_number }}</td> <th>{{ trans('bills.bill_number') }}:</th>
</tr> <td class="text-right">{{ $bill->bill_number }}</td>
@if ($bill->order_number) </tr>
<tr> @stack('bill_number_input_end')
<th>{{ trans('bills.order_number') }}:</th> @stack('order_number_input_start')
<td class="text-right">{{ $bill->order_number }}</td> @if ($bill->order_number)
</tr> <tr>
@endif <th>{{ trans('bills.order_number') }}:</th>
<tr> <td class="text-right">{{ $bill->order_number }}</td>
<th>{{ trans('bills.bill_date') }}:</th> </tr>
<td class="text-right">{{ Date::parse($bill->billed_at)->format($date_format) }}</td> @endif
</tr> @stack('order_number_input_end')
<tr> @stack('billed_at_input_start')
<th>{{ trans('bills.payment_due') }}:</th> <tr>
<td class="text-right">{{ Date::parse($bill->due_at)->format($date_format) }}</td> <th>{{ trans('bills.bill_date') }}:</th>
</tr> <td class="text-right">{{ Date::parse($bill->billed_at)->format($date_format) }}</td>
</tr>
@stack('billed_at_input_end')
@stack('due_at_input_start')
<tr>
<th>{{ trans('bills.payment_due') }}:</th>
<td class="text-right">{{ Date::parse($bill->due_at)->format($date_format) }}</td>
</tr>
@stack('due_at_input_end')
</tbody> </tbody>
</table> </table>
</div> </div>
@ -164,22 +182,46 @@
<table class="table table-striped"> <table class="table table-striped">
<tbody> <tbody>
<tr> <tr>
@stack('actions_th_start')
@stack('actions_th_end')
@stack('name_th_start')
<th>{{ trans_choice('general.items', 1) }}</th> <th>{{ trans_choice('general.items', 1) }}</th>
@stack('name_th_end')
@stack('quantity_th_start')
<th class="text-center">{{ trans('bills.quantity') }}</th> <th class="text-center">{{ trans('bills.quantity') }}</th>
@stack('quantity_th_end')
@stack('price_th_start')
<th class="text-right">{{ trans('bills.price') }}</th> <th class="text-right">{{ trans('bills.price') }}</th>
@stack('price_th_end')
@stack('taxes_th_start')
@stack('taxes_th_end')
@stack('total_th_start')
<th class="text-right">{{ trans('bills.total') }}</th> <th class="text-right">{{ trans('bills.total') }}</th>
@stack('total_th_end')
</tr> </tr>
@foreach($bill->items as $item) @foreach($bill->items as $item)
<tr> <tr>
@stack('actions_td_start')
@stack('actions_td_end')
@stack('name_td_start')
<td> <td>
{{ $item->name }} {{ $item->name }}
@if ($item->sku) @if ($item->sku)
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small> <br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
@endif @endif
</td> </td>
@stack('name_td_end')
@stack('quantity_td_start')
<td class="text-center">{{ $item->quantity }}</td> <td class="text-center">{{ $item->quantity }}</td>
@stack('quantity_td_end')
@stack('price_td_start')
<td class="text-right">@money($item->price, $bill->currency_code, true)</td> <td class="text-right">@money($item->price, $bill->currency_code, true)</td>
@stack('price_td_end')
@stack('taxes_td_start')
@stack('taxes_td_end')
@stack('total_td_start')
<td class="text-right">@money($item->total, $bill->currency_code, true)</td> <td class="text-right">@money($item->total, $bill->currency_code, true)</td>
@stack('total_td_end')
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
@ -189,13 +231,15 @@
<div class="row"> <div class="row">
<div class="col-xs-7"> <div class="col-xs-7">
@if ($bill->notes) @stack('notes_input_start')
<p class="lead">{{ trans_choice('general.notes', 2) }}:</p> @if ($bill->notes)
<p class="lead">{{ trans_choice('general.notes', 2) }}:</p>
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;"> <p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
{{ $bill->notes }} {{ $bill->notes }}
</p> </p>
@endif @endif
@stack('notes_input_end')
</div> </div>
<div class="col-xs-5"> <div class="col-xs-5">
<div class="table-responsive"> <div class="table-responsive">
@ -203,10 +247,12 @@
<tbody> <tbody>
@foreach ($bill->totals as $total) @foreach ($bill->totals as $total)
@if ($total->code != 'total') @if ($total->code != 'total')
@stack($total->code . '_td_start')
<tr> <tr>
<th>{{ trans($total->title) }}:</th> <th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td> <td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
</tr> </tr>
@stack($total->code . '_td_end')
@else @else
@if ($bill->paid) @if ($bill->paid)
<tr class="text-success"> <tr class="text-success">
@ -214,10 +260,12 @@
<td class="text-right">- @money($bill->paid, $bill->currency_code, true)</td> <td class="text-right">- @money($bill->paid, $bill->currency_code, true)</td>
</tr> </tr>
@endif @endif
@stack('grand_total_td_start')
<tr> <tr>
<th>{{ trans($total->name) }}:</th> <th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $bill->paid, $bill->currency_code, true)</td> <td class="text-right">@money($total->amount - $bill->paid, $bill->currency_code, true)</td>
</tr> </tr>
@stack('grand_total_td_end')
@endif @endif
@endforeach @endforeach
</tbody> </tbody>

View File

@ -29,40 +29,58 @@
<div class="col-58"> <div class="col-58">
<div class="text"> <div class="text">
{{ trans('invoices.bill_to') }}<br><br> {{ trans('invoices.bill_to') }}<br><br>
@stack('name_input_start')
<strong>{{ $invoice->customer_name }}</strong><br> <strong>{{ $invoice->customer_name }}</strong><br>
@stack('name_input_end')
@stack('address_input_start')
{!! nl2br($invoice->customer_address) !!}<br> {!! nl2br($invoice->customer_address) !!}<br>
@stack('address_input_end')
@stack('tax_number_input_start')
@if ($invoice->customer_tax_number) @if ($invoice->customer_tax_number)
{{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br> {{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br>
@endif @endif
@stack('tax_number_input_end')
<br> <br>
@stack('phone_input_start')
@if ($invoice->customer_phone) @if ($invoice->customer_phone)
{{ $invoice->customer_phone }}<br> {{ $invoice->customer_phone }}<br>
@endif @endif
@stack('phone_input_end')
@stack('email_start')
{{ $invoice->customer_email }} {{ $invoice->customer_email }}
@stack('email_input_end')
</div> </div>
</div> </div>
<div class="col-42"> <div class="col-42">
<div class="text"> <div class="text">
<table> <table>
<tbody> <tbody>
@stack('invoice_number_input_start')
<tr> <tr>
<th>{{ trans('invoices.invoice_number') }}:</th> <th>{{ trans('invoices.invoice_number') }}:</th>
<td class="text-right">{{ $invoice->invoice_number }}</td> <td class="text-right">{{ $invoice->invoice_number }}</td>
</tr> </tr>
@stack('invoice_number_input_end')
@stack('order_number_input_start')
@if ($invoice->order_number) @if ($invoice->order_number)
<tr> <tr>
<th>{{ trans('invoices.order_number') }}:</th> <th>{{ trans('invoices.order_number') }}:</th>
<td class="text-right">{{ $invoice->order_number }}</td> <td class="text-right">{{ $invoice->order_number }}</td>
</tr> </tr>
@endif @endif
@stack('order_number_input_end')
@stack('invoiced_at_input_start')
<tr> <tr>
<th>{{ trans('invoices.invoice_date') }}:</th> <th>{{ trans('invoices.invoice_date') }}:</th>
<td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td> <td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td>
</tr> </tr>
@stack('invoiced_at_input_end')
@stack('due_at_input_start')
<tr> <tr>
<th>{{ trans('invoices.payment_due') }}:</th> <th>{{ trans('invoices.payment_due') }}:</th>
<td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td> <td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td>
</tr> </tr>
@stack('due_at_input_end')
</tbody> </tbody>
</table> </table>
</div> </div>
@ -72,24 +90,48 @@
<table class="lines"> <table class="lines">
<thead> <thead>
<tr> <tr>
@stack('actions_th_start')
@stack('actions_th_end')
@stack('name_th_start')
<th class="item">{{ trans_choice($text_override['items'], 2) }}</th> <th class="item">{{ trans_choice($text_override['items'], 2) }}</th>
@stack('name_th_end')
@stack('quantity_th_start')
<th class="quantity">{{ trans($text_override['quantity']) }}</th> <th class="quantity">{{ trans($text_override['quantity']) }}</th>
@stack('quantity_th_end')
@stack('price_th_start')
<th class="price">{{ trans($text_override['price']) }}</th> <th class="price">{{ trans($text_override['price']) }}</th>
@stack('price_th_end')
@stack('taxes_th_start')
@stack('taxes_th_end')
@stack('total_th_start')
<th class="total">{{ trans('invoices.total') }}</th> <th class="total">{{ trans('invoices.total') }}</th>
@stack('total_th_end')
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach($invoice->items as $item) @foreach($invoice->items as $item)
<tr> <tr>
@stack('actions_td_start')
@stack('actions_td_end')
@stack('name_td_start')
<td class="item"> <td class="item">
{{ $item->name }} {{ $item->name }}
@if ($item->sku) @if ($item->sku)
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small> <br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
@endif @endif
</td> </td>
@stack('name_td_end')
@stack('quantity_td_start')
<td class="quantity">{{ $item->quantity }}</td> <td class="quantity">{{ $item->quantity }}</td>
@stack('quantity_td_end')
@stack('price_td_start')
<td class="price">@money($item->price, $invoice->currency_code, true)</td> <td class="price">@money($item->price, $invoice->currency_code, true)</td>
@stack('price_td_end')
@stack('taxes_td_start')
@stack('taxes_td_end')
@stack('total_td_start')
<td class="total">@money($item->total, $invoice->currency_code, true)</td> <td class="total">@money($item->total, $invoice->currency_code, true)</td>
@stack('total_td_end')
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
@ -97,22 +139,26 @@
<div class="row"> <div class="row">
<div class="col-58"> <div class="col-58">
@stack('notes_input_start')
@if ($invoice->notes) @if ($invoice->notes)
<table class="text" style="page-break-inside: avoid;"> <table class="text" style="page-break-inside: avoid;">
<tr><th>{{ trans_choice('general.notes', 2) }}</th></tr> <tr><th>{{ trans_choice('general.notes', 2) }}</th></tr>
<tr><td>{{ $invoice->notes }}</td></tr> <tr><td>{{ $invoice->notes }}</td></tr>
</table> </table>
@endif @endif
@stack('notes_input_end')
</div> </div>
<div class="col-42"> <div class="col-42">
<table class="text" style="page-break-inside: avoid;"> <table class="text" style="page-break-inside: avoid;">
<tbody> <tbody>
@foreach ($invoice->totals as $total) @foreach ($invoice->totals as $total)
@if ($total->code != 'total') @if ($total->code != 'total')
@stack($total->code . '_td_start')
<tr> <tr>
<th>{{ trans($total->title) }}:</th> <th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td> <td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr> </tr>
@stack($total->code . '_td_end')
@else @else
@if ($invoice->paid) @if ($invoice->paid)
<tr class="text-success"> <tr class="text-success">
@ -120,10 +166,12 @@
<td class="text-right">- @money($invoice->paid, $invoice->currency_code, true)</td> <td class="text-right">- @money($invoice->paid, $invoice->currency_code, true)</td>
</tr> </tr>
@endif @endif
@stack('grand_total_td_start')
<tr> <tr>
<th>{{ trans($total->name) }}:</th> <th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td> <td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr> </tr>
@stack('grand_total_td_end')
@endif @endif
@endforeach @endforeach
</tbody> </tbody>

View File

@ -135,40 +135,58 @@
<div class="col-xs-7"> <div class="col-xs-7">
{{ trans('invoices.bill_to') }} {{ trans('invoices.bill_to') }}
<address> <address>
@stack('name_input_start')
<strong>{{ $invoice->customer_name }}</strong><br> <strong>{{ $invoice->customer_name }}</strong><br>
@stack('name_input_end')
@stack('address_input_start')
{!! nl2br($invoice->customer_address) !!}<br> {!! nl2br($invoice->customer_address) !!}<br>
@stack('address_input_end')
@stack('tax_number_input_start')
@if ($invoice->customer_tax_number) @if ($invoice->customer_tax_number)
{{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br> {{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br>
@endif @endif
@stack('tax_number_input_end')
<br> <br>
@stack('phone_input_start')
@if ($invoice->customer_phone) @if ($invoice->customer_phone)
{{ $invoice->customer_phone }}<br> {{ $invoice->customer_phone }}<br>
@endif @endif
@stack('phone_input_end')
@stack('email_start')
{{ $invoice->customer_email }} {{ $invoice->customer_email }}
@stack('email_input_end')
</address> </address>
</div> </div>
<div class="col-xs-5"> <div class="col-xs-5">
<div class="table-responsive"> <div class="table-responsive">
<table class="table no-border"> <table class="table no-border">
<tbody> <tbody>
@stack('invoice_number_input_start')
<tr> <tr>
<th>{{ trans('invoices.invoice_number') }}:</th> <th>{{ trans('invoices.invoice_number') }}:</th>
<td class="text-right">{{ $invoice->invoice_number }}</td> <td class="text-right">{{ $invoice->invoice_number }}</td>
</tr> </tr>
@stack('invoice_number_input_end')
@stack('order_number_input_start')
@if ($invoice->order_number) @if ($invoice->order_number)
<tr> <tr>
<th>{{ trans('invoices.order_number') }}:</th> <th>{{ trans('invoices.order_number') }}:</th>
<td class="text-right">{{ $invoice->order_number }}</td> <td class="text-right">{{ $invoice->order_number }}</td>
</tr> </tr>
@endif @endif
@stack('order_number_input_end')
@stack('invoiced_at_input_start')
<tr> <tr>
<th>{{ trans('invoices.invoice_date') }}:</th> <th>{{ trans('invoices.invoice_date') }}:</th>
<td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td> <td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td>
</tr> </tr>
@stack('invoiced_at_input_end')
@stack('due_at_input_start')
<tr> <tr>
<th>{{ trans('invoices.payment_due') }}:</th> <th>{{ trans('invoices.payment_due') }}:</th>
<td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td> <td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td>
</tr> </tr>
@stack('due_at_input_end')
</tbody> </tbody>
</table> </table>
</div> </div>
@ -180,22 +198,46 @@
<table class="table table-striped"> <table class="table table-striped">
<tbody> <tbody>
<tr> <tr>
@stack('actions_th_start')
@stack('actions_th_end')
@stack('name_th_start')
<th>{{ trans_choice($text_override['items'], 2) }}</th> <th>{{ trans_choice($text_override['items'], 2) }}</th>
@stack('name_th_end')
@stack('quantity_th_start')
<th class="text-center">{{ trans($text_override['quantity']) }}</th> <th class="text-center">{{ trans($text_override['quantity']) }}</th>
@stack('quantity_th_end')
@stack('price_th_start')
<th class="text-right">{{ trans($text_override['price']) }}</th> <th class="text-right">{{ trans($text_override['price']) }}</th>
@stack('price_th_end')
@stack('taxes_th_start')
@stack('taxes_th_end')
@stack('total_th_start')
<th class="text-right">{{ trans('invoices.total') }}</th> <th class="text-right">{{ trans('invoices.total') }}</th>
@stack('total_th_end')
</tr> </tr>
@foreach($invoice->items as $item) @foreach($invoice->items as $item)
<tr> <tr>
@stack('actions_td_start')
@stack('actions_td_end')
@stack('name_td_start')
<td> <td>
{{ $item->name }} {{ $item->name }}
@if ($item->sku) @if ($item->sku)
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small> <br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
@endif @endif
</td> </td>
@stack('name_td_end')
@stack('quantity_td_start')
<td class="text-center">{{ $item->quantity }}</td> <td class="text-center">{{ $item->quantity }}</td>
@stack('quantity_td_end')
@stack('price_td_start')
<td class="text-right">@money($item->price, $invoice->currency_code, true)</td> <td class="text-right">@money($item->price, $invoice->currency_code, true)</td>
@stack('price_td_end')
@stack('taxes_td_start')
@stack('taxes_td_end')
@stack('total_td_start')
<td class="text-right">@money($item->total, $invoice->currency_code, true)</td> <td class="text-right">@money($item->total, $invoice->currency_code, true)</td>
@stack('total_td_end')
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
@ -205,6 +247,7 @@
<div class="row"> <div class="row">
<div class="col-xs-7"> <div class="col-xs-7">
@stack('notes_input_start')
@if ($invoice->notes) @if ($invoice->notes)
<p class="lead">{{ trans_choice('general.notes', 2) }}</p> <p class="lead">{{ trans_choice('general.notes', 2) }}</p>
@ -212,6 +255,7 @@
{{ $invoice->notes }} {{ $invoice->notes }}
</p> </p>
@endif @endif
@stack('notes_input_end')
</div> </div>
<div class="col-xs-5"> <div class="col-xs-5">
<div class="table-responsive"> <div class="table-responsive">
@ -219,10 +263,12 @@
<tbody> <tbody>
@foreach ($invoice->totals as $total) @foreach ($invoice->totals as $total)
@if ($total->code != 'total') @if ($total->code != 'total')
@stack($total->code . '_td_start')
<tr> <tr>
<th>{{ trans($total->title) }}:</th> <th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td> <td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr> </tr>
@stack($total->code . '_td_end')
@else @else
@if ($invoice->paid) @if ($invoice->paid)
<tr class="text-success"> <tr class="text-success">
@ -230,10 +276,12 @@
<td class="text-right">- @money($invoice->paid, $invoice->currency_code, true)</td> <td class="text-right">- @money($invoice->paid, $invoice->currency_code, true)</td>
</tr> </tr>
@endif @endif
@stack('grand_total_td_start')
<tr> <tr>
<th>{{ trans($total->name) }}:</th> <th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td> <td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr> </tr>
@stack('grand_total_td_end')
@endif @endif
@endforeach @endforeach
</tbody> </tbody>