<?php $__env->startSection('page_title'); ?>
    OSAA - Reimbursement
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_sub_title'); ?>    
    
    <?php echo $info['year']; ?>-<?php echo substr(intval($info['year']) + 1, 2, 2); ?> <?php echo $info['division']; ?> <?php echo Helpers::getActivityName($info['activity']); ?> Playoff Reimbursement

<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    @parent    

    <style type="text/css">
        h2 {
            color: #1C43A6 !important;
        }

        h2.line {
            border-bottom: 1px solid #1C43A6;
            padding-bottom: 0.25em;
            margin-bottom: 0.25em;
        }

        h3 {
            color: #990000 !important;
        }
        
        .page_functions {
            width: auto !important;
        }

        table {
            border-collapse: collapse;
            width: 100%;
            font-size: 10pt;
        }

        table thead th {
            text-align: left;
            border-bottom: 1px solid #CCCCCC;
        }

        table tbody tr {
             line-height: 1.5em;
        }

    </style>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('jquery_init'); ?>         
    
    if(!window.console)
    {
        window.console = { log: $.noop, group: $.noop, groupEnd: $.noop };            
    }   

   
    /*
     * Close button
     */
    $('.close_button')
        .button({'icons':{'primary':'ui-icon-circle-arrow-w'}})
        .css({'font-size':'9pt'});     

    /*
     * Bracket button
     */
    $('.bracket_button')
        .button()
        .css({'font-size':'9pt', 'margin-right' : '10px'});
  

<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_functions'); ?>          

    <a href="<?php echo url('/activities/' . strtolower($info['bracket']->activity) . '/bracket?div=' . $info['bracket']->division); ?>" target="_blank" class="bracket_button">View Bracket</a>    

    <a href="<?php echo url('/reports/reimburse'); ?>" class="close_button">Back</a>    
    
<?php $__env->stopSection(); ?>


<?php $__env->startSection('main_content'); ?>                

    <?php foreach ($info['school_objects'] as $school_object): ?>

        <div style="page-break-inside: avoid;">

            <h2><?php echo $school_object->school->name; ?></h2>

            <table>
                <thead>
                    <tr>
                        <th style="width: 90px;">Round(s)</th>
                        <th style="width: 125px;">Date(s)</th>
                        <th style="width: 315px;">Location</th>
                        <th style="width: 50px;">Miles</th>
                        <th style="width: 50px;">Rate</th>
                        <th style="width: 30px;">&#215;</th>
                        <th style="width: 65spx;">Mileage</th>
                        <th style="width: 50px;"># Part.</th>
                        <th style="width: 55px;">Rate</th>
                        <th style="width: 90px;">Per Diem</th>
                        <th style="width: 100px;">Sub-Total</th>
                    </tr>

                    <tbody>
                        
                        <?php foreach ($school_object->installments as $installment): ?>
                        
                            <tr>

                                <td><?php echo $installment->round; ?></td>
                                <td><?php echo count($installment->dates); ?> (<?php echo implode(', ', $installment->dates); ?>)</td>
                                <td><?php echo $installment->location; ?></td>
                                <td><?php echo $installment->miles; ?></td>
                                <td>$<?php echo number_format($installment->mileage_rate, 2); ?></td>
                                <td><?php echo $installment->multiplier; ?></td>
                                <td>$<?php echo number_format($installment->mileage_payment, 2); ?></td>
                                <td><?php echo $installment->people; ?></td>
                                <td>$<?php echo number_format($installment->person_rate, 2); ?></td>
                                <td>$<?php echo number_format($installment->people_payment, 2); ?></td> 
                                <td>$<?php echo number_format($installment->sub_total, 2); ?></td>

                            </tr>

                        <?php endforeach; ?>

                        <tr>
                            <td style="text-align: right; padding-right: 5px;" colspan="10"><?php echo $school_object->school->short_name; ?>:</td>
                            <td style="border-top: 2px solid black; font-weight: bold; text-align: right;">$<?php echo number_format($school_object->total, 2); ?></td>
                        </tr>

                    </tbody>
                </thead>

            </table>

        </div>        

    <?php endforeach; ?>

<?php $__env->stopSection(); ?>
