<div class="table-responsive">
    <table class="table table-striped">
        <thead>
        <tr>
            <th>&nbsp;</th>
            <th class="text-right">{{__('Points')}}</th>
            <th class="text-right">{{__('Verdienst')}}</th>
            <th class="text-right">{{__('VK-Preis')}}</th>
            <th class="text-right">{{__('EK-Preis')}}</th>
        </tr>
        </thead>
        <tbody>
        @if($homeparty->homeparty_host)
            @php($user_cart = \App\Services\HomepartyCart::getUserCart($homeparty->homeparty_host->id))
            <tr>
            <td>
                <strong>Gastgeber/in {{$homeparty->homeparty_host->billing_firstname}} {{$homeparty->homeparty_host->billing_lastname}}</strong>
            </td>
            <td class="text-right">
                {{$user_cart->getFormattedPoints()}}
            </td>
            <td class="text-right">
                <div class="no-line-break">{{$user_cart->getFormattedIncomePrice()}} &euro;</div>
                @if($homeparty->isPriceCurrency())
                <span class="small no-line-break">~{{  $user_cart->getCurrencyByKey('IncomePrice') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                @endif  
            </td>
            <td class="text-right">
                <div class="no-line-break">{{$user_cart->getFormattedPrice()}} &euro;</div>
                @if($homeparty->isPriceCurrency())
                <span class="small no-line-break">~{{  $user_cart->getCurrencyByKey('Price') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                @endif  
            </td>
            <td class="text-right">
                <div class="no-line-break">{{$user_cart->getFormattedEkPriceWithout()}} &euro;</div>
                @if($homeparty->isPriceCurrency())
                <span class="small no-line-break">~{{  $user_cart->getCurrencyByKey('EkPriceWithout') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                @endif  
            </td>
        </tr>
            @if($user_cart->shipping_price > 0)
            <tr>
                <td class="text-left bg-warning-light" colspan="4">Versandkosten:</td>
                <td class="text-right bg-warning-light">
                    <div class="no-line-break">{{$user_cart->getFormattedShippingPrice()}} &euro;</div>
                        @if($homeparty->isPriceCurrency())
                        <span class="small no-line-break">~{{  $user_cart->getCurrencyByKey('ShippingPrice') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                        @endif    
                </td>
            </tr>
            @endif 
        @endif

        @if($homeparty->homeparty_guests)
            @php($g_count = 1)
            @foreach($homeparty->homeparty_guests as $homeparty_guest)
                @php($user_cart = \App\Services\HomepartyCart::getUserCart($homeparty_guest->id))
                <tr>
                    <td>
                        <strong> {!! $g_count++ !!}. Gast {{$homeparty_guest->billing_firstname}} {{$homeparty_guest->billing_lastname}}</strong>
                    </td>
                    <td class="text-right">
                        {{$user_cart->getFormattedPoints()}}
                    </td>
                    <td class="text-right">
                        <div class="no-line-break">{{$user_cart->getFormattedIncomePrice()}} &euro;</div>
                        @if($homeparty->isPriceCurrency())
                        <span class="small no-line-break">~{{  $user_cart->getCurrencyByKey('IncomePrice') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                        @endif  
                    </td>
                    <td class="text-right">
                        <div class="no-line-break">{{$user_cart->getFormattedPrice()}} &euro;</div>
                        @if($homeparty->isPriceCurrency())
                        <span class="small no-line-break">~{{  $user_cart->getCurrencyByKey('Price') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                        @endif  
                    </td>
                    <td class="text-right">
                        <div class="no-line-break">{{$user_cart->getFormattedEkPriceWithout()}} &euro;</div>
                        @if($homeparty->isPriceCurrency())
                        <span class="small no-line-break">~{{  $user_cart->getCurrencyByKey('EkPriceWithout') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                        @endif  
                    </td>
                </tr>
                @if($user_cart->shipping_price > 0)
                <tr>
                    <td class="text-left bg-warning-light" colspan="4">Versandkosten:</td>
                    <td class="text-right bg-warning-light">
                        <div class="no-line-break">{{$user_cart->getFormattedShippingPrice()}} &euro;</div>
                            @if($homeparty->isPriceCurrency())
                            <span class="small no-line-break">~{{  $user_cart->getCurrencyByKey('ShippingPrice') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                            @endif    
                    </td>
                </tr>
                @endif 

            @endforeach
        @endif

      
        </tbody>
        <tfoot>
        @if(\App\Services\HomepartyCart::$is_bonus)
            <tr class="foot-small">
                <td colspan="4" class="border-top">
                    {{ \App\Services\HomepartyCart::$voucher_name }}
                </td>
                <td class="border-top text-right">{{ App\Services\HomepartyCart::getFormattedBonusPrice() }}&euro;</td>
            </tr>

        @endif
        <tr class="foot-small">
            <td colspan="1" class="border-top">
                <strong>Gesamtsummen:</strong>
            </td>
            <td class="border-top text-right">
                <div class="no-line-break"><strong>{{\App\Services\HomepartyCart::getFormattedPointsTotal()}}</strong></div>
            </td>
            <td class="border-top text-right">
                <div class="no-line-break"><strong>{{\App\Services\HomepartyCart::getFormattedIncomePrice()}} &euro;</strong></div>
                @if($homeparty->isPriceCurrency())
                <span class="small no-line-break">~{{  \App\Services\HomepartyCart::getCurrencyByKey('IncomePrice') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                @endif
            </td>
            <td class="border-top text-right">
                <div class="no-line-break"><strong>{{\App\Services\HomepartyCart::getFormattedPrice()}} &euro;</strong></div>
                @if($homeparty->isPriceCurrency())
                <span class="small no-line-break">~{{  \App\Services\HomepartyCart::getCurrencyByKey('Price') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                @endif
            </td>
            <td class="border-top text-right">
                <div class="no-line-break"><strong>{{\App\Services\HomepartyCart::getFormattedEkPrice()}} &euro;</strong></div>
                @if($homeparty->isPriceCurrency())
                <span class="small no-line-break">~{{  \App\Services\HomepartyCart::getCurrencyByKey('EkPrice') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                @endif
            </td>
        </tr>
        @if($homeparty->getCardInfo('user_tax_free'))
        <tr class="foot-small">
            <td colspan="1" class="text-muted">
                Enthaltene MwSt:
            </td>
            <td class="">&nbsp;</td>

            <td class="">&nbsp;</td>
            <td class="text-muted text-right">0 &euro;</td>
            <td class="text-muted text-right">0 &euro;</td>
        </tr>
        @else
        <tr class="foot-small">
            <td colspan="1" class="text-muted">
                Summe ohne MwSt:
            </td>
            <td class="">&nbsp;</td>

            <td class="">&nbsp;</td>
            <td class="text-muted text-right"> 
                <div class="no-line-break">{{\App\Services\HomepartyCart::getFormattedPriceNet()}} &euro;</div>
                @if($homeparty->isPriceCurrency())
                <span class="small no-line-break">~{{  \App\Services\HomepartyCart::getCurrencyByKey('PriceNet') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                @endif
            </td>
            <td class="text-muted text-right"> 
                <div class="no-line-break">{{\App\Services\HomepartyCart::getFormattedEkPriceNet()}} &euro;</div>
                @if($homeparty->isPriceCurrency())
                <span class="small no-line-break">~{{  \App\Services\HomepartyCart::getCurrencyByKey('EkPriceNet') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                @endif
            </td>
        </tr>
        <tr class="foot-small">
            <td colspan="1" class="text-muted">
                Enthaltene MwSt:
            </td>
            <td class="">&nbsp;</td>

            <td class="">&nbsp;</td>
            <td class="text-muted text-right"> 
                <div class="no-line-break">{{\App\Services\HomepartyCart::getFormattedPriceTax()}} &euro;</div>
                @if($homeparty->isPriceCurrency())
                <span class="small no-line-break">~{{  \App\Services\HomepartyCart::getCurrencyByKey('PriceTax') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                @endif
            </td>
            <td class="text-muted text-right"> 
                <div class="no-line-break">{{\App\Services\HomepartyCart::getFormattedEkPriceTax()}} &euro;</div>
                @if($homeparty->isPriceCurrency())
                <span class="small no-line-break">~{{  \App\Services\HomepartyCart::getCurrencyByKey('EkPriceTax') }} {{  $homeparty->getPriceCurrencyUnit() }} </span>
                @endif
            </td>
        </tr>
        @endif
        </tfoot>
    </table>
</div>