HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/brameda/brameda.nl/resources/views/shop/partials/checkout/order_details.blade.php
@php
/** @var \App\Komma\Shop\Cart\ShoppingCartItem[] $items **/
/** @var float $total **/
/** @var float $total_without_discount **/
/** @var string $total_formatted **/
/** @var \App\Komma\Globalization\RegionInfo $regionInfo */
@endphp
<div class="">
    <table>
        <thead>
            <tr>
                <th>@lang('kms/global.name')</th>
                <th>@lang('shop/products.sku')</th>
                <th>@lang('shop/products.price')</th>
                <th>@lang('shop/products.amount')</th>
                <th>@lang('shop/products.total_without_discounts')</th>
                <th>@lang('shop/products.discount')</th>
                <th>@lang('shop/products.total')</th>
            </tr>
        </thead>
        <tbody>
        @foreach($items as $item)
            @php /** @var \App\Komma\Shop\Products\Product\Product|\App\Komma\Shop\Products\ProductGroup\ProductGroup|\App\Komma\Shop\Products\ProductComposite\ProductComposite $productable **/ @endphp
            @php $productable = $item->getProductable() @endphp
        <tr>
            @switch(get_class($productable))
                @case(\App\Komma\Shop\Products\Product\Product::class)
                    <td>{{ $productable->getDisplayName() }}</td>
                    <td>{{ $productable->stock_keeping_unit }}</td>
                    <td>{{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($productable->getPrice(), true, true) }}</td>
                    <td>{{ $item->getAmount() }}</td>
                    <td>{{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($item->getTotal(false), true, true) }}</td>
                    <td>
                        <!--Show each applied discount name (type)....-->
                        @foreach($item->getDiscounts() as $discount)
                            @php /** @var \App\Komma\Shop\Discounts\Discount $discount */@endphp
                            @lang('shop/discounts.type.'.$discount->type)<br>
                        @endforeach
                        <!--...followed by their total amount of discount-->
                        {{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($item->getTotal(false) - $item->getTotal(true), true, true)  }}
                    </td>
                    <td>{{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($item->getTotal(true), true, true) }}</td>
                    @break
                @case(\App\Komma\Shop\Products\ProductGroup\ProductGroup::class)
                    <!--TODO IMPLEMENT PROPERLY
                    <td>-</td> <!--Only products have stock keeping units-->
                    <td>{{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($productable->getPrice(), true, true) }}</td>
                    @break
                @case(\App\Komma\Shop\Products\ProductComposite\ProductComposite::class)
                     <!--TODO IMPLEMENT PROPERLY
                    <td>-</td> <!--Only products have stock keeping units-->
                    @break
            @endswitch
        </tr>
        @endforeach
        <tr>
            <td colspan="5"></td>
            <td><b>@lang('shop/products.total_ex_vat_and_discounts')</b></td>
            <td>{{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($total_ex_vat_and_discounts, true, true) }}</td>
        </tr>
        <tr>
            <td colspan="5"></td>
            <td><b>@lang('shop/products.total_ex_vat')</b></td>
            <td>{{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($total_ex_vat, true, true) }}</td>
        </tr>
        <tr>
            <td colspan="5"></td>
            <td><b>@lang('shop/products.vat')</b></td>
            <td>{{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($vat_total, true, true) }} (21%)</td>
        </tr>
        <tr>
            <td colspan="5"></td>
            <td><b>@lang('shop/products.total')</b></td>
            <td>{{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($total, true, true) }}</td>
        </tr>
        </tbody>
    </table>
</div>