This commit is contained in:
denisdulici
2018-04-16 19:01:29 +03:00
parent 7897300cb8
commit d2b0a816e3
12 changed files with 130 additions and 41 deletions

View File

@ -112,12 +112,19 @@
<div class="table-responsive">
<table class="table">
<tbody>
@foreach($invoice->totals as $total)
@if($total->code != 'total')
<tr>
<th>{{ trans($total['name']) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@foreach ($invoice->totals as $total)
@if ($total->code != 'total')
@if (($total->code == 'tax') && isset($taxes[$total->name]))
<tr>
<th>{{ $taxes[$total->name] }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@else
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@endif
@else
@if ($invoice->paid)
<tr class="text-success">
@ -126,7 +133,7 @@
</tr>
@endif
<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>
</tr>
@endif

View File

@ -119,12 +119,19 @@
<div class="table-responsive">
<table class="table">
<tbody>
@foreach($invoice->totals as $total)
@if($total->code != 'total')
<tr>
<th>{{ trans($total['name']) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@foreach ($invoice->totals as $total)
@if ($total->code != 'total')
@if (($total->code == 'tax') && isset($taxes[$total->name]))
<tr>
<th>{{ $taxes[$total->name] }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@else
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@endif
@else
@if ($invoice->paid)
<tr class="text-success">
@ -133,7 +140,7 @@
</tr>
@endif
<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>
</tr>
@endif