mivita/resources/views/pdf/invoice-homeparty.blade.php
2023-07-03 10:07:08 +02:00

100 lines
No EOL
4.4 KiB
PHP

<div id="invoice_box">
<table>
<thead>
<tr>
<th class="text-left" style="width: 10%">Artikel-Nr.</th>
<th class="text-left" style="width: 40%">Bezeichnung</th>
<th class="text-right" style="width: 10%">Menge</th>
<th class="text-right" style="width: 10%">Points</th>
<th class="text-right" style="width: 10%">%</th>
<th class="text-right" style="width: 15%">VK-Preis*</th>
<th class="text-right" style="width: 15%">EK-Preis*</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">
<strong>Summe:</strong>
</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">
Summe ohne MwSt:
</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">
zzgl. {{ $tax_rate }}% MwSt
@if(isset($shopping_order->net_split[$tax_rate]))
/ aus {{ Util::formatNumber($shopping_order->net_split[$tax_rate]['ek_net']) }} &euro; EK netto
@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">
Enthaltene MwSt:
</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>