<div style="padding: 10px 10px 10px 10px;">
    <div class="note note-info">
        <table class="table table-striped table-bordered table-hover table-bg" style="text-align: center;">
            <thead style="padding: 10px 10px 10px 10px;">
            <tr>
                <th style="padding: 10px 10px 10px 10px;">Evaluaciones</th>
                <th style="padding: 10px 10px 10px 10px;">Porcentaje</th>
                <th style="padding: 10px 10px 10px 10px;">Nota</th>
            </tr>
            </thead>
            <tbody>
            @php($aux = 0)
            @php($count = 0)

            @foreach($notasFinal as $item)
                <tr>
                    <th style="padding: 10px 10px 10px 10px;">{{ $item->nombre }}</th>
                    <th style="padding: 10px 10px 10px 10px;">{{ $item->porcentaje }} %</th>

                    @if($item->nota > 11)
                        <th style="padding: 10px 10px 10px 10px; text-align: right;"> {{$item->nota}} </th>
                    @else
                        <th style="padding: 10px 10px 10px 10px; text-align: right; color: red;"> {{$item->nota}} </th>

                    @endif
                    @php($aux += $item->nota)
                    @php($count++)

                </tr>
            @endforeach
            <tr>
                <th style="border-bottom: 1pt solid black;"></th>
                <th style="border-bottom: 1pt solid black;"></th>
                <th style="border-bottom: 1pt solid black;"></th>
            </tr>
            <tr>
                <th style="border-bottom: 1pt solid black;"> Nota</th>
                <th style="border-bottom: 1pt solid black;"></th>
                @if( ($aux/$count) > 11)
                    <th style="border-bottom: 1pt solid black;">{{ $aux/$count }}</th>
                @else
                    <th style="border-bottom: 1pt solid black; color: red;text-align: right;">{{ $aux/$count }}</th>

                @endif
            </tr>

            </tbody>
        </table>
    </div>
</div>