@section('page_title') OSAA - Reimbursement @stop @section('page_sub_title') OSAA State Championships Reimbursement @stop @section('scripts') @parent @stop @section('jquery_init') if(!window.console) { window.console = { log: $.noop, group: $.noop, groupEnd: $.noop }; } var divisions = {{ json_encode($info['divisions']) }}; $('#sport').change(function() { // Get the selected activity var select = $(this); var activity = $('option:selected', select).val(); // Get this newly selected activity's divisions var options = divisions[activity]; // Get the division select var div_select = $('#division'); // Clear out all options $('option', div_select).remove(); // Add options from the new list of divisions $.each(options, function(value, text) { $('') .attr('value', value) .html(text) .appendTo(div_select); }); div_select.focus(); }); /* * Close button */ $('.close_button') .button({'icons':{'primary':'ui-icon-circle-close'}}) .css({'font-size':'9pt'}); /* * Submit button */ $('.submit_button') .button() .css({'font-size':'9pt'}) .click(function () { // Submit the form $('
') .attr('data-check', 1) .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .css('width', '250px') .css('height', '180px') .css('text-align', 'center') .css('padding', '0.5em') .position({my : "center center", at : "center center", of : window}) .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front') .html('
Calculating Reimbursements...

Please wait while reimbursements are calculated, this may take a while to process...
'); $(this).parents('form').submit(); }); /* * Missing addresses button */ $('.missing_button') .button() .css({'font-size':'9pt'}) .click(function () { var button = $(this); button.blur(); $('
') .attr('data-check', 1) .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .attr('data-check', 1) .css('width', '300px') .css('height', '170px') .css('text-align', 'center') .css('padding', '0.5em') .position({my : "center center", at : "center center", of : window}) .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front') .html('
Checking Missing Addresses...

Please wait while the database checks for any missing addresses, this may take a while to process...
'); var form = $(this).parents('form'); var url = form.attr('action'); // Get a form check var jqxhr = $.ajax( { type : 'GET', url : url + '?' + form.serialize() + '&missing=1', dataType : 'html' }) .done(function (data) { $('[data-check]').remove(); $('
') .appendTo('body') .dialog( { draggable : true, resizable : false, height : 280, width : 600, modal : true, title : 'Missing Address Report', open : function () { var dialog_object = $(this); var html = data; dialog_object.html(html); $('.close_button', dialog_object) .button({'icons' : {'secondary' : 'ui-icon-circle-close'}}) .css({'font-size' : '9pt'}) .click(function(event) { event.preventDefault(); dialog_object.dialog('close'); }) .focus(); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert("There was an error checking for missing addresses.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }); }); @stop @section('page_functions') Close @stop @section('main_content')

Team Sport Reimbursements for {{ Session::get('year') }}-{{ substr(intval(Session::get('year')) + 1, 2, 2) }}


Instructions
  1. Use this form utility to calculate team sport reimbursements for OSAA State Championship teams on the brackets.
  2. Select the Team Sport and Division from the respective drop-down lists.
  3. Click the Missing Addresses button first to get a report of any contest location that's missing an address. Any missing address error must be resolved in order for the calculations to be processed correctly.
  4. Click the Calculate button to calculate reimbursements.

{{-- Errors --}} @if (Session::has('errors'))
@foreach ($errors->all() as $error) {{ $error }} @endforeach
@endif {{ Form::open(array('url' => url('/reports/reimburse/team/calculate'), 'method' => 'get', 'id' => 'form')) }}

Team Sport

{{ Form::label('sport', 'Select', array('style' => 'font-weight: bold;')) }} {{ Form::select('sport', $info['sports'], null, array('id' => 'sport')) }}

Division

{{ Form::label('division', 'Select', array('style' => 'font-weight: bold;')) }} {{ Form::select('division', reset($info['divisions']), null, array('id' => 'division')) }}

Options



Missing Addresses


Calculate


{{ Form::close() }} @stop