auditionadmin/resources/views/dashboard/invoice.blade.php

55 lines
2.5 KiB
PHP

@props(['school', 'invoiceData'])
<x-layout.app>
<x-slot:page_title>Invoice - {{ $school->name }}</x-slot:page_title>
<x-slot:title_bar_right>
<x-form.button href="{{ route('pdf_invoice',$school->id) }}">Download PDF Invoice</x-form.button>
</x-slot:title_bar_right>
<div class="">
<x-table.table class="">
<thead class="">
<tr>
<x-table.th>Student Name</x-table.th>
<x-table.th>Audition</x-table.th>
<x-table.th>Entry Timestamp</x-table.th>
<x-table.th>Entry Fee</x-table.th>
<x-table.th>Late Fee</x-table.th>
</tr>
</thead>
<x-table.body>
@foreach($invoiceData['lines'] as $line)
<tr>
<x-table.td>{{ $line['student_name'] }}</x-table.td>
<x-table.td>{{ $line['audition'] }}</x-table.td>
<x-table.td>{{ $line['entry_timestamp']->setTimezone('America/Chicago')->format('m/d/Y g:i:s A') }}</x-table.td>
<x-table.td>${{ number_format($line['entry_fee'],2) }}</x-table.td>
<x-table.td>${{ number_format($line['late_fee'],2) }}</x-table.td>
</tr>
@endforeach
</x-table.body>
<tfoot class="">
<tr>
<td colspan="2">
<x-table.th class="text-right">Totals</x-table.th>
<x-table.th>${{ number_format($invoiceData['linesTotal'],2) }}</x-table.th>
<x-table.th>${{ number_format($invoiceData['lateFeesTotal'],2) }}</x-table.th>
</tr>
<tr>
<td colspan="3"></td>
<x-table.th class="text-right">Total Entry Fees</x-table.th>
<x-table.th>${{ number_format($invoiceData['linesTotal'] + $invoiceData['lateFeesTotal'], 2) }}</x-table.th>
</tr>
<tr>
<x-table.th colspan="4" class="text-right">School Fee</x-table.th>
<x-table.th >${{ number_format($invoiceData['schoolFeeTotal'],2) }}</x-table.th>
</tr>
<tr>
<x-table.th colspan="4" class="text-right">Grand Total</x-table.th>
<x-table.th >${{ number_format($invoiceData['grandTotal'],2) }}</x-table.th>
</tr>
</tfoot>
</x-table.table>
</div>
</x-layout.app>