mivita/resources/views/pdf/invoice-homeparty.blade.php
Kevin Adametz bfa3bb1df4 08 2024
2024-08-05 12:05:24 +02:00

100 lines
No EOL
4.6 KiB
PHP

<div id="invoice_box">
<table>
<thead>
<tr>
<th class="text-left" style="width: 10%">{{__('tables.article_no')}}</th>
<th class="text-left" style="width: 40%">{{__('tables.label')}}</th>
<th class="text-right" style="width: 10%">{{__('tables.quantity')}}</th>
<th class="text-right" style="width: 10%">{{__('tables.points')}}</th>
<th class="text-right" style="width: 10%">%</th>
<th class="text-right" style="width: 15%">{{__('tables.vk_price')}}*</th>
<th class="text-right" style="width: 15%">{{ __('tables.ek_price') }}*</th>
</tr>
</thead>
<tbody>
@if($shopping_order->homeparty->homeparty_host)
@include('pdf.invoice-homeparty-detail', ['homeparty'=>$shopping_order->homeparty, 'homeparty_user' => $shopping_order->homeparty->homeparty_host])
@endif
@if($shopping_order->homeparty->homeparty_guests)
@foreach($shopping_order->homeparty->homeparty_guests as $homeparty_guest)
@include('pdf.invoice-homeparty-detail', ['homeparty'=>$shopping_order->homeparty, 'homeparty_user' => $homeparty_guest])
@endforeach
@endif
</tbody>
<tfoot>
@php($hp_order = $shopping_order->homeparty->order)
@if($hp_order['is_bonus'])
<tr class="doubleline foot-small">
<td class="">&nbsp;</td>
<td colspan="5" class="border-top">
{{ $hp_order['voucher_name'] }}
</td>
<td class="border-top text-right">{{ Util::formatNumber($hp_order['voucher_price'])}} &euro;</td>
</tr>
<tr class="fullline">
@else
<tr class="doubleline">
@endif
<td class="">&nbsp;</td>
<td colspan="2" class="border-top">
<b>{{ __('order.sum') }}</b>
</td>
<td class="border-top text-right"><strong>{{ $hp_order['points'] - $hp_order['bonus_points_diff'] }}</strong></td>
<td class="">&nbsp;</td>
<td class="border-top text-right"><strong>{{ Util::formatNumber($hp_order['price'])}} &euro;</strong></td>
<td class="border-top text-right"><strong>{{ Util::formatNumber($hp_order['ek_price'])}} &euro;</strong></td>
</tr>
<tr class="foot-small">
<td class="">&nbsp;</td>
<td colspan="4" class="text-muted">
{{ __('order.total_without_VAT') }}:
</td>
<td class="text-muted text-right">{{ Util::formatNumber($hp_order['price_net'])}} &euro;</td>
<td class="text-muted text-right">{{ Util::formatNumber($hp_order['ek_price_net'])}} &euro;</td>
</tr>
@if($shopping_order->tax_split)
@foreach ($shopping_order->tax_split as $tax_rate => $tax)
<tr class="foot-small">
<td class="">&nbsp;</td>
<td class="text-left" colspan="4">
{{ __('order.excl') }} {{ $tax_rate }}% {{ __('order.VAT') }}
@if(isset($shopping_order->net_split[$tax_rate]))
/ {{ __('pdf.off') }} {{ Util::formatNumber($shopping_order->net_split[$tax_rate]['ek_net']) }} &euro; {{ __('pdf.ek') }} {{ __('pdf.net') }}
@endif
</td>
<td class="text-muted text-right">
<span class="no-line-break">
{{ Util::formatNumber($tax['vk_tax'])}} &euro;
</span>
</td>
<td class="text-muted text-right">
<span class="no-line-break">
{{ Util::formatNumber($tax['ek_tax'])}} &euro;
</span>
</td>
</tr>
@endforeach
@else
<tr class="foot-small">
<td class="">&nbsp;</td>
<td colspan="4" class="text-muted">
{{ __('order.included_VAT') }}:
</td>
<td class="text-muted text-right">
<span class="no-line-break">
{{ Util::formatNumber($hp_order['price']-$hp_order['price_net'])}} &euro;
</span>
</td>
<td class="text-muted text-right">
<span class="no-line-break">
{{ Util::formatNumber($hp_order['ek_price']-$hp_order['ek_price_net'])}} &euro;
</span>
</td>
</tr>
@endif
</tfoot>
</table>
</div>