<style>
    <?php include public_path('css/invoice.css') ?>
</style>
{{--
--}}

@php
//    dd(get_defined_vars());
@endphp
<table class="invoice">
    <thead>
    <tr>
        <th colspan="9">
            <table style="width: 100%;" class="invoiceHeadTable">
                <tr class="orderIdRow">
                    <td colspan="2" >{{$humanId}}</td>
                </tr>
                <tr>
                    <td style="width: 50%">
                        <strong>Szállító:</strong>
                        <br><br>
                        <strong>{{$supplier['name']}} </strong><br>
                        {{$supplier['address']}} <br>
                        <strong>Levelezési cím:</strong>  {{$supplier['mailingAddress']}} 	<br>
                        <strong>Tel.: </strong> {{formatterPhoneNumber($supplier['phone'])}} , <strong>Vevőszolgálat: </strong>{{formatterPhoneNumber($supplier['customerServicePhone'])}}<br>
                        <strong>E-mail: </strong>{{$supplier['orderEmail']}}
                        @if(!empty($customNotificationEmail)), {{$customNotificationEmail}}@endif
                        <br>
                    </td>
                    <td>
                        <strong>Vevő:</strong>
                        <br>Delirest Kft
                        <br>1117 Bp. Irinyi J. u. 4-20
                        <br><strong>Szállítási cím:</strong>
                        @if(!empty($deliveryAddressName))
                            <br>{{$deliveryAddressName}}
                        @else
                            <br>{{$profit_center['name']}}
                        @endif
                        <br>{{$deliveryAddress}}
                        <br>{{$profit_center['email']}} {{$profit_center['primaryPhone']}}
                        <br><strong>Leadó:</strong> {{$contactName}}
                    </td>
                </tr>
                <tr>
                    <td><strong>Rendelés leadás: </strong> {{$sentTime?formatterDateTime($sentTime):''}}
                        <br><strong>Szállítási dátum: </strong>
                        {{formatterDate($deliveryDate)}}
                        @if($orderType=='weekly')
                            -  {{formatterDate(\Carbon\Carbon::parse($deliveryDate)->addDays(6))}}
                        @endif
                        </td>
                    <td>
                        <strong>Tételek: </strong>
                        @if($orderType=='daily') {{count($items)}}
                        @elseif($orderType=='weekly') {{count($items['weekDayItems'])}}
                        @else 0
                        @endif

                        @if(isset($noPrintButton))

                        @else
                            <button style="float: right;" class="btn btn-sm btn-success printButton" >Nyomtatás</button>
                        @endif


{{--

                        <button class="btn btn-sm btn-success printButton" style="float: right;display: none">print</button>
--}}

                    </td>
                </tr>
@isset($note)
                    @if(!empty($note))
                        <tr>
                            <td colspan="2"><strong>Megjegyzés: </strong> {{$note}} </td>

                            </td>
                        </tr>
                    @endif
@endisset

            </table>
        </th>
    </tr>
    </thead>
    <tbody>
    @if($orderType=='daily')
        @include("modules.order.invoiceDailyParts")
    @else
        @include("modules.order.invoiceWeeklyParts")
    @endif
    </tbody>
{{--
    <tfoot>
    <tr>
        <th>1</th>
        <th>2</th>
        <th>3</th>
        <th>4</th>
        <th>5</th>
        <th>6</th>
        <th>7</th>
    </tr>
    </tfoot>
--}}
</table>
