@section('page_title') OSAA - Event Management & Ticket Report @stop @section('page_sub_title') OSAA Playoff Event Management & Ticket Report @stop @section('scripts') @parent @stop @section('jquery_init') if(!window.console) { window.console = { log: $.noop, group: $.noop, groupEnd: $.noop }; } // Make this script play well with IE8 if (typeof String.prototype.trim !== 'function') { String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); } } // Success bar $('.success_bar').animate({ 'top' : 32, 'background-color' : 'rgba(176, 255, 190, 1.0)'}, 1600, 'easeOutQuad', function () { $(this).delay(6000).fadeOut(4000); $(this).hover(function () { $(this).stop(true).css('opacity', '1.0'); }, function () { $(this).fadeOut(4000); }) }); // Reload indicator $('input[type="text"][data-reload], select[data-reload]') .css({'border-left-color' : '#005fa9', 'border-left-width' : '2px'}); /* * Make the action area sticky */ var window_object = $(window); var action_area = $('.action_area'); var top = (action_area.offset().top) - 40; window_object.scroll(function() { action_area.toggleClass('sticky', window_object.scrollTop() > top); }); /* * Action Area Buttons */ $('.action_area a') .css({'font-size' : '9pt', 'margin-right' : '1em'}) .button() .each(function () { var link = $(this); if (link.has('[data-icon]')) { var icon = link.attr('data-icon'); link.button({'icons' : {'primary' : icon }}); } if (link.has('[data-help]')) { var help = link.attr('data-help'); link.tooltip({'content' : help, 'items' : 'a'}); } }); /* * Print Button */ $('[data-action="print"]') .click(function(event) { event.preventDefault(); // Print feature window.location.href = '{{ url('/forms/ticket-report/' . $info['report']->id . '/print') }}'; }); /* * Run check button */ $('[data-action="check"]') .click(function(event) { event.preventDefault(); 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', '225px') .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 Form...

Please wait while your form is checked, this may take a while to process...
'); // Get a form check var jqxhr = $.ajax( { type : 'GET', url : '{{ url('/forms/ticket-report/' . $info['report']->id . '/check') }}', dataType : 'html' }) .done(function (data) { $('[data-check]').remove(); var check = $.parseJSON(data); //console.log(check); showCheckResults(check); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert("There was an error checking form's data.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }); }); /* * Submit button */ $('[data-action="submit"]') .click(function(event) { event.preventDefault(); 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', '225px') .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 Form...

Please wait while your form is checked, this may take a while to process...
'); // Get a form check var jqxhr = $.ajax( { type : 'GET', url : '{{ url('/forms/ticket-report/' . $info['report']->id . '/check') }}', dataType : 'html' }) .done(function (data) { $('[data-check]').remove(); var check = $.parseJSON(data); //console.log(check); if (!check[0]) { showCheckResults(check); return; } // Passed, now confirm $('
') .appendTo('body') .dialog( { modal : true, draggable : true, resizable : false, height : 400, width : 500, title : 'Confirm Form Submission', buttons: [ { text : "Submit", 'class' : "float_left", icons : { primary : 'ui-icon-circle-arrow-e'}, click : function() { // Submit the form $('
') .attr('data-check', 1) .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .attr('data-check', 1) .css('width', '225px') .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('
Submitting Form...

Form check passed, now please wait while your form is submitted, this may take a while to process...
'); // Submit the form window.location.href = "{{ url('/forms/ticket-report/' . $info['report']->id . '/submit') }}"; } }, { text : "Cancel", 'class' : "float_right", 'data-autofocus' : "true", icons : { primary : 'ui-icon-cancel'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var dialog_object = $(this); var html = '
'; html += ''; @if (Helpers::strEqual($info['report']->status, 'WORK')) html += 'Are you sure you want to submit this report??'; html += '

'; html += '
Your report has passed initial inspection for all of the required information. Please note that once you submit this report, you will not be able to make any changes.

A printable version will be generated once you submit this form.
'; html += '
You will need to send to the OSAA office the following items:
    '; html += '
  1. The printed version of this ticket report form
  2. '; html += '
  3. A check for the total ticket sales of $' + $('[name="gate_total"]').text() + '
  4. '; @if (count($info['expense_data']->others) > 0) html += '
  5. Receipts documenting your other approved expenses
  6. '; @endif html += '
'; @else html += 'Are you sure you want to submit this report?'; html += '

'; html += '
Your form passed initial inspection. Please note that once you submit this form, you will not be able to make any additional edits.
'; @endif html += '
'; dialog_object.html(html); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); $('[data-autofocus="true"]').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 form's data.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }); }); @if (Auth::user()->isOsaaUser()) /* * Reopen button */ $('[data-action="reopen"]') .click(function(event) { event.preventDefault(); var button = $(this); button.blur(); // Confirm $('
') .appendTo('body') .dialog( { modal : true, draggable : true, resizable : false, height : 300, width : 400, title : 'Confirm Reopen', buttons: [ { text : "Reopen", 'class' : "float_left", icons : { primary : 'ui-icon-arrowreturnthick-1-w'}, click : function() { // Reopen the form $('
') .attr('data-check', 1) .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .attr('data-check', 1) .css('width', '225px') .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('
Reopening Form...

Please wait, this may take a while to process...
'); // Submit the form window.location.href = "{{ url('/forms/ticket-report/' . $info['report']->id . '/reopen?matchup=' . $info['matchup']->id) }}"; } }, { text : "Cancel", 'class' : "float_right", 'data-autofocus' : "true", icons : { primary : 'ui-icon-cancel'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var dialog_object = $(this); var html = '
'; html += ''; html += 'Are you sure you want to reopen this report??'; html += '

'; html += '
By reopening this form, you can allow additional data to be input. However, the school may have already sent in an older printed version, you may receive duplicate printed forms for the same contest.
'; html += '
'; dialog_object.html(html); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); $('[data-autofocus="true"]').focus(); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); }); @endif /* showCheckResults * * Shows the results of the form check operation. */ function showCheckResults(check) { var pass = check[0]; if (pass) { $('
') .appendTo('body') .dialog( { draggable : true, resizable : false, height : 280, width : 400, modal : true, title : 'Form Check: Pass', open : function () { var dialog_object = $(this); var html = '
'; html += '
'; html += ''; html += 'Your Form Passed Inspection'; html += '
'; html += 'All required information has been provided. This ticket report is ready to be submitted.

When you are ready, click the "Submit" button to generate a printable version of your form.

'; html += '
'; dialog_object.html(html); $('.close_button', dialog_object) .button({'icons' : {'secondary' : 'ui-icon-check'}}) .css({'font-size' : '9pt'}) .focus() .click(function(event) { event.preventDefault(); dialog_object.dialog('close'); }); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); } else { $('
') .appendTo('body') .dialog( { draggable : true, resizable : false, height : 330, width : 500, modal : true, title : 'Form Check: Fail', open : function () { var dialog_object = $(this); var html = '
'; html += '
'; html += ''; html += 'Your Form Failed Inspection'; html += '
'; html += 'You are missing some required information or some other item. Your ticket report is incomplete.

Error Details
'; html += '
    '; $.each(check, function (i, item) { if (i > 0) { html += '
  • ' + item + '
  • '; } }); html += '

'; html += ''; html += '
'; dialog_object.html(html); $('.close_button', dialog_object) .button({'icons' : {'secondary' : 'ui-icon-check'}}) .css({'font-size' : '9pt'}) .focus() .click(function(event) { event.preventDefault(); dialog_object.dialog('close'); }); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); } } /* Positioned elements * * Elements that contain the attribute data-position="true" will be positioned * using JQuery's UI positioning utility. Other expected attributes define the * element's position: * data-position-my * data-position-at * data-position-of */ $('[data-position="true"]').each(function() { var element = $(this); var my = element.attr('data-position-my'); var at = element.attr('data-position-at'); var of = element.attr('data-position-of'); var options = $.parseJSON('{ "my" : "' + my + '", "at": "' + at + '", "of": "' + of + '"}'); element.position(options); }); // Required field marker $('[data-required]:not([data-required-indicator])').after('*'); // Table row highlighter function colorRows () { $('table').each(function () { var i = 0; $('tbody tr:visible', $(this)).each(function () { if (i % 2 == 1) { $(this).addClass('odd'); } else { $(this).removeClass('odd'); } i = i + 1; }); }); } colorRows(); /* alertRequiredField * * Shows an alert box when attempting to save a blank value to a required field. */ function alertRequiredField() { $('
') .appendTo('body') .dialog( { modal : true, draggable : false, resizable : false, height : 275, width : 415, title : 'Required Field', buttons: [ { text : "OK", 'class' : "float_right", icons : { primary : 'ui-icon-check'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var dialog_object = $(this); dialog_object.html('
You\'ve entered in a blank value for a required field. Required fields cannot be empty.
The original value has been restored.
'); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').append('
Still having trouble?
(503) 682-6722 x228
'); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); } /* alertLimitedField * * Shows an alert box when attempting to save a value that exceeds the allowed max limit. */ function alertLimitedField(max, field_name) { $('
') .appendTo('body') .dialog( { modal : true, draggable : false, resizable : false, height : 275, width : 415, title : 'Limit Exceeded', buttons: [ { text : "OK", 'class' : "float_right", icons : { primary : 'ui-icon-check'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var dialog_object = $(this); dialog_object.html('
The maximum allowed number of ' + field_name + ' for {{ strtolower(Helpers::getActivityName($info['report']->activity)) }} is ' + max + '.
Your entry will be adjusted to the maximum number of ' + max + '.
'); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); {{-- $('.ui-dialog-buttonpane .ui-dialog-buttonset').append('
Still having trouble?
(503) 682-6722 x228
'); --}} }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); } /* saveFormData * * Given a form field and a value, this function will do a * JSON POST request to save the form's information. The optional * third parameter will determine if the page will be reloaded or not. */ function saveFormData(field, value, type, reload) { // Ensure the field and value parameters are provided if (typeof field == 'undefined' || typeof value == 'undefined' || typeof type == 'undefined') { alert('Scripting error. Unable to save form data.'); } // Get the optional reload parameter reload = typeof reload !== 'undefined' ? reload : false; // Get the form ID (same across all pages for this form) var form_id = {{ $info['report']->id }}; $('*').css({'cursor':'wait'}); var jqxhr = $.ajax( { type : 'POST', url : '{{ url('/forms/ticket-report') }}/' + form_id + '/update', data : { 'field' : field, 'value' : value, 'type' : type }, dataType : 'html' }) .done(function(returned_data) { // Success //console.log("Successfully saved {'" + form_id + "|" + field + "' : '" + value + "'}"); var info = $.parseJSON(returned_data); $('#updated_at').html(info.updated_at); if (info.force_reload) { reload = true; } }) .fail(function(jqXHR, status, error) { // Error var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert("There was an error saving this form's data.\n\n" + errorData.error.message + "\n\nThis page will now be reloaded."); location.reload(); }) .complete(function () { // Reload if necessary if (reload) { location.reload(); } else { $('*').css({'cursor':''}); } }); } // Autosave text fields function autoSaveTextField(input_field) { clearTimeout(autoSaveTextField.timeout); autoSaveTextField.timeout = setTimeout(function (){ var value = input_field.val(); var original_value = input_field.attr('data-original'); var field = input_field.attr('data-field'); var type = input_field.attr('data-type'); var readonly_attr = input_field.attr('readonly'); if (typeof readonly_attr !== typeof undefined && readonly_attr !== false) { return false; } var reload = false; var reload_attr = input_field.attr('data-reload'); if (typeof reload_attr !== typeof undefined && reload_attr !== false) { reload = true; } var required = false; var required_attr = input_field.attr('data-required'); if (typeof required_attr !== typeof undefined && required_attr !== false) { required = true; } if (required && value == '' && !(original_value == '' || typeof original_value === typeof undefined || original_value === false)) { input_field.val(original_value); input_field.focus(); alertRequiredField(); return; } if (value != original_value && ((required && value != '') || !required)) { saveFormData(field, value, type, reload); input_field.attr('data-original', value); } }, 50); } // Autosave text fields and textareas $('input[type="text"][data-autosave]').on('change blur autocompletechange autocompleteselect', function (event) { var field = $(this); if (field.has('[data-format="number"]') && field.has('[data-max-value]')) { var max = parseInt(field.attr('data-max-value')); if (parseInt(field.val()) > max) { field.val(max); alertLimitedField(max, field.attr('data-title')); } } autoSaveTextField ($(this)); if (field.has('[data-format="number"]')) { var value = parseInt(field.val()); var row = field.parents('tr'); var rate = parseFloat(row.attr('data-rate')); var position = row.attr('data-position'); var total = value * rate; $('[name="' + position + '_total"]').html(total.toFixed(2)); updateExpenseTotals('approved-expense'); } }); $('textarea[data-autosave]').on('change blur autocompletechange autocompleteselect', function (event) { autoSaveTextField ($(this)); }); function updateExpenseTotals(type) { if (type == 'approved-expense') { var sub_total = 0.00; $('[data-total="' + type + '"]').each(function() { sub_total += parseFloat($(this).text()); }); $('[name="approved_expense_total"]').html(sub_total.toFixed(2)); } if (type == 'other-expense') { /* No need to update this */ } // Update expense total var approved_expenses = parseFloat($('[name="approved_expense_total"]').text()); var other_expenses = parseFloat($('[name="other_expense_total"]').text()); if (isNaN(other_expenses)) { other_expenses = 0.00; } var expense_total = (approved_expenses + other_expenses).toFixed(2); $('[name="expense_total"]').html(expense_total); } updateExpenseTotals('approved-expense'); // Autosave select fields $('select[data-autosave]').on('change', function(event) { var select_field = $(this); var selected = $(':selected', select_field); var value = selected.val(); var original_value = select_field.attr('data-original'); var field = select_field.attr('data-field'); var type = select_field.attr('data-type'); var readonly_attr = select_field.attr('readonly'); if (typeof readonly_attr !== typeof undefined && readonly_attr !== false) { return false; } var reload = false; var reload_attr = select_field.attr('data-reload'); if (typeof reload_attr !== typeof undefined && reload_attr !== false) { reload = true; } if (value != original_value) { saveFormData(field, value, type, reload); select_field.attr('data-original', value); } }); // Autosave check-box fields $('input[type="checkbox"][data-autosave]').on('change', function(event) { var checkbox_field = $(this); var value = checkbox_field.is(':checked'); var original_value = checkbox_field.attr('data-original'); var field = checkbox_field.attr('data-field'); var type = checkbox_field.attr('data-type'); var readonly_attr = checkbox_field.attr('readonly'); if (typeof readonly_attr !== typeof undefined && readonly_attr !== false) { return false; } var reload = false; var reload_attr = checkbox_field.attr('data-reload'); if (typeof reload_attr !== typeof undefined && reload_attr !== false) { reload = true; } if (value != original_value) { saveFormData(field, value, type, reload); checkbox_field.attr('data-original', value); } }); @if (Session::has('new_form') or Input::has('new-form')) showHelp('new-form', true); @endif /* ShowHelp * * Shows a help topic. */ function showHelp(help_topic, no_button) { if (no_button !== true) { $('
') .appendTo('body') .dialog( { draggable : true, resizable : true, height : 745, minHeight : 400, width : 650, minWidth : 330, modal : false, title : 'Ticket Report Help', open : function () { var dialog_object = $(this); dialog_object.html("
"); var jqxhr = $.ajax( { type : 'GET', url : '{{ url('forms/ticket-report/' . $info['report']->id . '/help') }}?topic=' + help_topic, dataType : 'html' }) .done(function (returned_data) { dialog_object.html(returned_data); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert ("There was an error looking up help information.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }) .complete(function () { }); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); } else { $('
') .appendTo('body') .css({'z-index':'2000 !important'}) .dialog( { draggable : false, resizable : false, height : 745, minHeight : 745, width : 650, modal : true, dialogClass : 'no-close', title : 'New Ticket Report Created', open : function () { var dialog_object = $(this); dialog_object.html("
"); var jqxhr = $.ajax( { type : 'GET', url : '{{ url('forms/ticket-report/' . $info['report']->id . '/help') }}?topic=' + help_topic, dataType : 'html' }) .done(function (returned_data) { dialog_object.html(returned_data); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert ("There was an error looking up help information.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }) .complete(function () { $('.close_first_view_button', dialog_object) .button() .click(function () { dialog_object.dialog("close"); }); // Shake action items function shakeTheseActionImages (object) { var direction; if ($(object).has('[data-direction]')) { var direction = $(object).attr('data-direction'); } if (typeof direction == 'undefined') { var direction = 'left'; } $(object).effect("shake", {direction : direction, distance : 5, times : 1}, 600, function () { $(this).delay(Math.floor(Math.random() * 4000) + 2000); shakeTheseActionImages($(this)); }); } var img = $('img.action_item', dialog_object); img.position({my:"center center", at : "right+30 center", of : ".close_first_view_button"}); shakeTheseActionImages(img); }); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); } } /* * Help button */ $('.help_button') .button({'icons':{'primary':'ui-icon-help'}}) .css({'font-size':'9pt'}) .click(function(event) { var object = $(this); event.preventDefault(); var topic = object.attr('data-topic'); showHelp(topic); object.blur(); }); /* * Special help buttons */ $('[name="category_help"]') .hover(function () { $(this).css({'cursor':'pointer'}); }, function () { }) .click(function(event) { var object = $(this); var topic = object.attr('data-topic'); showHelp(topic); }); /* * Close button */ $('.close_button') .button({'icons':{'primary':'ui-icon-circle-close'}}) .css({'font-size':'9pt', 'margin-left':'10px'}); /* * Add staff contact button */ $('.add_staff_contact') .button({ icons : { primary : 'ui-icon-plusthick'}}) .css({'font-size' : '9pt'}) .tooltip() .click(function () { var button_obj = $(this); var school_id = $(button_obj).attr('data-school-id'); var school_district_id = ''; $('
') .appendTo('body') .dialog( { dialogClass: 'add_staff_contact_dialog', resizable: false, height: 430, width: 700, modal: true, title: 'Add Staff Contact', buttons: [ { text : "Create Contact", 'class' : "float_left", icons : { primary : 'ui-icon-disk'}, click : function() { // Submit the form $('form', $(this)).submit(); $(this).dialog("close"); return true; } }, { text : "Cancel", 'class' : "float_right", 'autofocus' : true, icons : { primary : 'ui-icon-cancel'}, click : function() { $(this).dialog( "close" ); $(this).remove(); return false; } } ], open : function () { function checkRole() { var value = $('#role').val(); if (value == 'Prin.' || value == 'AD' || value == 'AT' || value == 'Doc.' || value == 'Supt.') { $('#is_on_rosters').val(1); } else { $('#is_on_rosters').val(0); } } var dialog_object = $(this); dialog_object.html("
"); var jqxhr = $.ajax( { type : 'GET', url : 'http://www.osaa.org/schools/add-staff', data : { 'school_id' : school_id, 'school_district_id' : school_district_id}, dataType : 'html' }) .done(function (data) { dialog_object.html(data); $('
') .html('

Once you create a new contact, your form will automatically reload.
') .appendTo($('form', dialog_object)); $('#role option[value="Book"]').attr('selected', 'selected'); $('#role').on('change', function () { checkRole(); }); checkRole(); @if (Auth::check() and Auth::user()->isOsaaUser()) $('#is_on_rosters').removeAttr('disabled'); @endif }).fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); console.log(errorData); dialog_object.html('

' + errorData.error.type + '

' + errorData.error.message + '

Line ' + errorData.error.line + ' in ' + errorData.error.file); if (dialog_object.html() == '') { dialog_object.html('There was an error.'); } }); $('.add_staff_contact_dialog .ui-dialog-title').css('font-size', '11pt'); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); $(this).parent().find('[autofocus]').focus(); } }); }); /* * Add other expense button */ $('[data-action="add-other-expense"]') .button({'icons':{'primary':'ui-icon-plusthick'}}) .css({'font-size':'9pt'}) .click(function(event) { event.preventDefault(); var button = $(this); $('
') .appendTo('body') .dialog( { modal : true, draggable : true, resizable : false, height : 415, width : 600, title : 'Add Other Expense', buttons: [ { text : "Add", 'class' : "float_left", icons : { primary : 'ui-icon-plusthick'}, click : function() { var dialog_object = $(this); var description = ($('[name="description"]', dialog_object).val()).trim(); if (description == '') { alert('In order to add an other expense to this form, you must provide a short description of the expense.'); return; } var amount = ($('[name="amount"]', dialog_object).val()).trim(); if (amount == '' || isNaN(amount) || amount <= 0) { alert('In order to add an other expense to this form, you must provide a valid dollar amount for the expense.'); return; } var data = { 'description' : description, 'amount' : amount, 'ticket_report_id' : {{ $info['report']->id }} }; $('
') .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .css('width', '225px') .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 ui-di buttons') .html('
Updating...

Please wait, this may take a while to process...
'); // Submit the change var jqxhr = $.ajax( { type : 'POST', url : '{{ url('/forms/ticket-report/' . $info['report']->id . '/other-expense/add') }}', data : data, dataType : 'html' }) .done(function (data) { // Reload of refresh is specified window.location.assign("{{ url('/forms/ticket-report/' . $info['report']->id . '/edit?matchup=' . $info['matchup']->id) }}#other-expenses"); location.reload(); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert ("There was an error saving changes.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }); } }, { text : "Cancel", 'class' : "float_right", 'data-autofocus' : "true", icons : { primary : 'ui-icon-cancel'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var dialog_object = $(this); var html = '
'; html += ''; html += 'Add an Other Expense
Approval must be granted in advance by the OSAA for any expense that is beyond your normal expenses to host a league game. These might include, but would not be limited to, field rental, additional security or police, portable bleacher rental, portable restrooms.

Do not combine expenses; list each other expenses separately.'; html += '

Other Expense (32 characters max)
'; html += '*Describe the extra expense.

'; html += 'Amount
'; html += '$*How much was the expense?

'; html += 'Note: Receipts must be attached for these other expenses.'; html += '
'; dialog_object.html(html); $('input[data-format="money"]', dialog_object).keypress(function(event) { var field = $(this); var value = field.val(); var key = String.fromCharCode(event.which); // Only allow numeric characters and periods if (key.match(/[^0-9\.]/i) != null) { return false; } }).on('blur', function() { /* The following will be converted to their float values * 5000.25 * $5000.25 * $5,000.25 * 5,000.25 */ var field = $(this); var value = (field.val()).trim(); if (value == "") { value = 0; } if (isNaN(value)) { value = value.replace(/[\$,]/g, ''); if (value == "") { value = 0; } if (value == "") { value = 0; } } var amount = parseFloat(value); field.val(amount.toFixed(2)); }); $('input[name="description"]', dialog_object).focus(); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); }); /* * Delete other expense button */ $('[data-action="delete-other-expense"]') .click(function(event) { event.preventDefault(); var button = $(this); var row = button.parents('tr'); var index = row.attr('data-index'); row.addClass('ui-state-error'); $('
') .appendTo('body') .dialog( { modal : true, draggable : false, resizable : false, height : 250, width : 400, title : 'Delete Expense', buttons: [ { text : "Delete", 'class' : "float_left", icons : { primary : 'ui-icon-circle-minus'}, click : function() { var dialog_object = $(this); var data = { 'index' : index, 'ticket_report_id' : {{ $info['report']->id }} }; $('
') .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .css('width', '225px') .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 ui-di buttons') .html('
Updating...

Please wait, this may take a while to process...
'); // Submit the change var jqxhr = $.ajax( { type : 'POST', url : '{{ url('/forms/ticket-report/' . $info['report']->id . '/other-expense') }}/' + index + '/delete', data : data, dataType : 'html' }) .done(function (data) { // Reload of refresh is specified window.location.assign("{{ url('/forms/ticket-report/' . $info['report']->id . '/edit?matchup=' . $info['matchup']->id) }}#other-expenses"); location.reload(); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert ("There was an error saving changes.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }); } }, { text : "Cancel", 'class' : "float_right", 'data-autofocus' : "true", icons : { primary : 'ui-icon-cancel'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var dialog_object = $(this); var html = '
'; html += ''; html += 'Delete This Expense
Are you sure you want to remove this other expense from your form?'; html += '
'; dialog_object.html(html); $('[data-autofocus]').focus(); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); }, close : function () { row.removeClass('ui-state-error'); var dialog_object = $(this); $(dialog_object).remove(); button.blur(); } }); }); /* * Add ticket gate */ $('[data-action="add-gate"]') .button({'icons':{'primary':'ui-icon-plusthick'}}) .css({'font-size':'9pt'}) .click(function(event) { event.preventDefault(); var button = $(this); var button_row = button.parents('tr'); var table = button_row.parents('table'); var gate = table.attr('data-gate'); var rate = parseFloat(table.attr('data-rate')); $('
') .appendTo('body') .dialog( { modal : true, draggable : true, resizable : false, height : 435, width : 615, title : 'Add ' + gate.charAt(0).toUpperCase() + gate.slice(1) + ' Ticket Sale', buttons: [ { text : "Add", 'class' : "float_left", icons : { primary : 'ui-icon-plusthick'}, click : function() { var dialog_object = $(this); var start = ($('[name="start"]', dialog_object).val()).trim(); if (start == '') { alert('In order to add this ticket sales record to the form, you must provide the event\'s starting ticket number.'); return; } var end = ($('[name="end"]', dialog_object).val()).trim(); if (end == '') { alert('In order to add this ticket sales record to the form, you must provide the event\'s ending ticket number.'); return; } var number = ($('[name="number"]', dialog_object).val()).trim(); if (number == '' || isNaN(number) || number <= 0) { alert('In order to add this ticket sales record to the form, you must provide the number of tickets sold.'); return; } var data = { 'gate' : gate, 'start' : start, 'end' : end, 'number' : number, 'ticket_report_id' : {{ $info['report']->id }} }; $('
') .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .css('width', '225px') .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 ui-di buttons') .html('
Updating...

Please wait, this may take a while to process...
'); // Submit the change var jqxhr = $.ajax( { type : 'POST', url : '{{ url('/forms/ticket-report/' . $info['report']->id . '/gate-sale/add') }}', data : data, dataType : 'html' }) .done(function (data) { // Reload of refresh is specified window.location.assign("{{ url('/forms/ticket-report/' . $info['report']->id . '/edit?matchup=' . $info['matchup']->id) }}#" + gate + "-tickets"); location.reload(); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert ("There was an error saving changes.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }); } }, { text : "Cancel", 'class' : "float_right", 'data-autofocus' : "true", icons : { primary : 'ui-icon-cancel'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var dialog_object = $(this); var html = '
'; html += ''; html += 'Add a Group of ' + gate.charAt(0).toUpperCase() + gate.slice(1) + ' Ticket Sales
Provide the following information to record a group of ' + gate + ' ticket sales.'; html += '

Event Begin # (16 characters max)
'; html += '*What was the starting ticket number?

'; html += 'Event Ending # (16 characters max)
'; html += '*What was the ending ticket number?

'; html += '
'; html += 'Number Sold
'; html += '*How many tickets were sold?
'; html += '
Ticket Price
'; html += '$' + rate.toFixed(2) + '
'; html += '
Sub-Total
'; html += '$0.00
'; html += '


'; html += 'Note: The OSAA ' + gate + ' ticket price for the {{ $info['round_type']->name }} Round is $' + rate.toFixed(2) + ' per ticket.'; if (gate == "reserved") { html += ' Regardless of what the school charges for reserved tickets, the OSAA must receive this regular adult ticket price.'; } html += '
'; dialog_object.html(html); $('input[data-format="integer"]', dialog_object).keypress(function(event) { var field = $(this); var value = field.val(); var key = String.fromCharCode(event.which); // Only allow numeric characters and periods if (key.match(/[^0-9]/i) != null) { return false; } }).on('blur change keyup', function() { var field = $(this); var value = field.val(); if (value == "" || isNaN(value)) { value = 0; } var number = parseInt(value); var amount = (number * rate).toFixed(2); $('[name="data-ticket-total"]', dialog_object).html(amount); }); $('input[name="start"]', dialog_object).focus(); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); }); /* * Edit ticket gate */ $('[data-action="edit-gate"]') .click(function(event) { event.preventDefault(); var button = $(this); var button_row = button.parents('tr'); var table = button_row.parents('table'); var gate = table.attr('data-gate'); var rate = parseFloat(table.attr('data-rate')); var start = ($('td[data-field="start"]', button_row).text()).trim(); var end = ($('td[data-field="end"]', button_row).text()).trim(); var number = ($('td[data-field="number"]', button_row).text()).trim(); var index = button_row.attr('data-index'); button_row.addClass('ui-state-error'); $('
') .appendTo('body') .dialog( { modal : true, draggable : true, resizable : false, height : 435, width : 615, title : 'Edit ' + gate.charAt(0).toUpperCase() + gate.slice(1) + ' Ticket Sale', buttons: [ { text : "Save", 'class' : "float_left", icons : { primary : 'ui-icon-disk'}, click : function() { var dialog_object = $(this); var start = ($('[name="start"]', dialog_object).val()).trim(); if (start == '') { alert('In order to save this ticket sales record to the form, you must provide the event\'s starting ticket number.'); return; } var end = ($('[name="end"]', dialog_object).val()).trim(); if (end == '') { alert('In order to save this ticket sales record to the form, you must provide the event\'s ending ticket number.'); return; } var number = ($('[name="number"]', dialog_object).val()).trim(); if (number == '' || isNaN(number) || number <= 0) { alert('In order to save this ticket sales record to the form, you must provide the number of tickets sold.'); return; } var data = { 'gate' : gate, 'index' : index, 'start' : start, 'end' : end, 'number' : number, 'ticket_report_id' : {{ $info['report']->id }} }; $('
') .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .css('width', '225px') .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 ui-di buttons') .html('
Updating...

Please wait, this may take a while to process...
'); // Submit the change var jqxhr = $.ajax( { type : 'POST', url : '{{ url('/forms/ticket-report/' . $info['report']->id . '/gate-sale') }}/' + gate + '/' + index + '/edit', data : data, dataType : 'html' }) .done(function (data) { // Reload of refresh is specified window.location.assign("{{ url('/forms/ticket-report/' . $info['report']->id . '/edit?matchup=' . $info['matchup']->id) }}#" + gate + "-tickets"); location.reload(); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert ("There was an error saving changes.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }); } }, { text : "Cancel", 'class' : "float_right", 'data-autofocus' : "true", icons : { primary : 'ui-icon-cancel'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var dialog_object = $(this); var html = '
'; html += ''; html += 'Edit a Group of ' + gate.charAt(0).toUpperCase() + gate.slice(1) + ' Ticket Sales
Edit the following information that records a group of ' + gate + ' ticket sales.'; html += '

Event Begin # (16 characters max)
'; html += '*What was the starting ticket number?

'; html += 'Event Ending # (16 characters max)
'; html += '*What was the ending ticket number?

'; html += '
'; html += 'Number Sold
'; html += '*How many tickets were sold?
'; html += '
Ticket Price
'; html += '$' + rate.toFixed(2) + '
'; html += '
Sub-Total
'; html += '$0.00
'; html += '


'; html += 'Note: The OSAA ' + gate + ' ticket price for the {{ $info['round_type']->name }} Round is $' + rate.toFixed(2) + ' per ticket.'; if (gate == "reserved") { html += ' Regardless of what the school charges for reserved tickets, the OSAA must receive this regular adult ticket price.'; } html += '
'; dialog_object.html(html); $('input[data-format="integer"]', dialog_object).keypress(function(event) { var field = $(this); var value = field.val(); var key = String.fromCharCode(event.which); // Only allow numeric characters and periods if (key.match(/[^0-9]/i) != null) { return false; } }).on('blur change keyup', function() { var field = $(this); var value = field.val(); if (value == "" || isNaN(value)) { value = 0; } var number = parseInt(value); var amount = (number * rate).toFixed(2); $('[name="data-ticket-total"]', dialog_object).html(amount); }); $('[name="data-ticket-total"]', dialog_object).html((parseFloat(rate) * parseInt(number)).toFixed(2)); $('input[name="start"]', dialog_object).focus(); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); }, close : function () { button_row.removeClass('ui-state-error'); var dialog_object = $(this); $(dialog_object).remove(); button.blur(); } }); }); /* * Delete ticket gate */ $('[data-action="delete-gate"]') .click(function(event) { event.preventDefault(); var button = $(this); var button_row = button.parents('tr'); var table = button_row.parents('table'); var gate = table.attr('data-gate'); var index = button_row.attr('data-index'); button_row.addClass('ui-state-error'); $('
') .appendTo('body') .dialog( { modal : true, draggable : false, resizable : false, height : 250, width : 400, title : 'Delete ' + gate.charAt(0).toUpperCase() + gate.slice(1) + ' Ticket Sale', buttons: [ { text : "Delete", 'class' : "float_left", icons : { primary : 'ui-icon-circle-minus'}, click : function() { var dialog_object = $(this); var data = { 'index' : index, 'gate' : gate, 'ticket_report_id' : {{ $info['report']->id }} }; $('
') .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .css('width', '225px') .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 ui-di buttons') .html('
Updating...

Please wait, this may take a while to process...
'); // Submit the change var jqxhr = $.ajax( { type : 'POST', url : '{{ url('/forms/ticket-report/' . $info['report']->id . '/gate-sale') }}/' + gate + '/' + index + '/delete', data : data, dataType : 'html' }) .done(function (data) { // Reload of refresh is specified window.location.assign("{{ url('/forms/ticket-report/' . $info['report']->id . '/edit?matchup=' . $info['matchup']->id) }}#" + gate + "-tickets"); location.reload(); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert ("There was an error saving changes.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }); } }, { text : "Cancel", 'class' : "float_right", 'data-autofocus' : "true", icons : { primary : 'ui-icon-cancel'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var dialog_object = $(this); var html = '
'; html += ''; html += 'Delete This Ticket Sale
Are you sure you want to remove this row from your form?'; html += '
'; dialog_object.html(html); $('[data-autofocus]').focus(); $('.ui-dialog-buttonpane').css('padding', '0 0.5em').css('font-size', '9pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); }, close : function () { button_row.removeClass('ui-state-error'); var dialog_object = $(this); $(dialog_object).remove(); button.blur(); } }); }); /* Status Log * * Shows the ejection log when link is clicked. */ $('[name="status_log"]') .click(function(event) { event.preventDefault(); var link = $(this); var data = { created_at : "{{ date('D n/j/y g:ia', strtotime($info['report']->created_at)) }}", updated_at : "{{ date('D n/j/y g:ia', strtotime($info['report']->updated_at)) }}", submitted_at : "{{ (!is_null($info['report']->submitted_at)) ? date('D n/j/y g:ia', strtotime($info['report']->submitted_at)) : '- -' }}", done_at : "{{ (!is_null($info['report']->done_at)) ? date('D n/j/y g:ia', strtotime($info['report']->done_at)) : '- -' }}" }; var html = '
'; html += '
Last Updated:
' + data.updated_at + '
'; html += '
Report Created:
' + data.created_at + '
'; html += '
Report Submitted:
' + data.submitted_at + '
'; html += '
Report Finished:
' + data.done_at + '
'; html += ''; @foreach ($info['status_history'] as $i => $log) @if (($i % 2) == 0) html += ''; @else html += ''; @endif html += ''; html += ''; html += ''; @endforeach html += '
{{ date('n/j/y g:ia', strtotime($log->updated_at)) }}{{ $log->status }}{{ str_replace('\'', '\\\'', $log->user) }}
{{ str_replace("\n", '
', str_replace('\'', '"', $log->notes)) }}
'; $('
') .appendTo('body') .dialog( { resizable: false, height: 'auto', width: 550, modal: false, title: 'Form Status Log', open : function () { var dialog_object = $(this); dialog_object.html(html); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); }) .hover(function() { $(this).css({'cursor':'pointer'}); }, function() { $(this).css({'cursor':''}); }) .tooltip({'content':'Click to view detailed status history.','items':'.status_path'}); /* * Form Behavior */ // Number fields $('input[data-format="number"]').keypress(function(event) { var field = $(this); var value = field.val(); var key = String.fromCharCode(event.which); // Only allow numeric characters and periods if (key.match(/[^0-9]/i) != null) { return false; } }); /* * Custom tooltip items */ $('[data-tooltip]').each(function () { var item = $(this); var help = item.attr('data-tooltip'); item.tooltip({'content' : help, 'items' : item}); }); // Disable preview buttons $('[data-button-disabled="disabled"]').button('disable'); // Disable input if not WORK status @if (!Helpers::strEqual($info['report']->status, 'WORK')) $('input[type="text"]') .attr('readonly', 'readonly') .attr('disabled', 'disabled'); @endif @stop @section('page_functions') Help @if (!Auth::user()->isOsaaUser()) Close @else Close @endif @stop @section('main_content') {{-- Success Bar --}} @if (Session::has('success'))
{{ Session::get('success') }}
@endif {{-- Action Area --}}
Form Actions
Ticket Report Form Status and Progression
Help @foreach ($info['action_items'] as $action => $action_info) @if ($action_info['enabled'] or $action_info['preview']) {{ $action_info['text'] }} @endif @endforeach @if (count($info['status_path']) > 0)
@foreach ($info['status_path'] as $step => $action_info) @if ($action_info['show']) @if ($action_info['trail']) @if ($action_info['complete'] or $action_info['current']) @else @endif @endif @if ($action_info['current'])
@elseif ($action_info['complete'])
@else
@endif {{ $step }}
@endif @endforeach
@endif
{{-- Work in Progress --}} @if (Helpers::strEqual($info['report']->status, 'WORK'))
This ticket report is incomplete. @if (Helpers::strEqual($info['event']->event_status, 'DONE')) This contest is done. @elseif (Helpers::strEqual($info['event']->event_status, 'LIVE')) This report cannot be submitted until a score is entered for this contest. @else This report cannot be submitted until after the contest is finished. @endif
{{-- Submitted --}} @elseif (Helpers::strEqual($info['report']->status, 'SUBT'))
This report has been submitted and is under OSAA review.
@endif {{-- Errors --}} @if (Session::has('errors'))
@foreach ($errors->all() as $error) {{ $error }} @endforeach
@endif {{-- Instructions --}} @if (Helpers::strEqual($info['report']->status, 'WORK'))

Instructions

You can check to see if you have provided all of the required information by clicking the Run Check button at the top of the form. Once you have provided all of the required information, click Submit to generate a printable version of this form. If you have any questions, please contact OSAA Business Operations Manager Candy Posey, {{ Helpers::obfuscateEmailLink('candyp@osaa.org') }} or (503) 682-6722 x225.
Next Steps
  1. Ensure the contest information is correct.
  2. Input approved event expenses for reimbursement.
  3. Input ticket sales information.
  4. Check your form prior to submitting.
@elseif (Helpers::strEqual($info['report']->status, 'SUBT'))

Instructions

Your form has been submitted and a printable version has been generated. Print off the form and mail it to the OSAA office with a check. Once the OSAA office receives all of your information, a reimbursement check will be mailed to your school and this report will be marked as finished. If you have any questions, please contact OSAA Business Operations Manager Candy Posey, {{ Helpers::obfuscateEmailLink('candyp@osaa.org') }} or (503) 682-6722 x225.
Next Steps
  1. Print off your form.
  2. Principal or Athletic Director sign the printed form.
  3. Mail the form and a check for gate sales to the OSAA office.
@elseif (Helpers::strEqual($info['report']->status, 'DONE'))

Information

This form has been marked as finished. The OSAA office has received all of the required information and has mailed a reimbursement check to your school. No further action is required for this report. If you have any questions, please contact OSAA Business Operations Manager Candy Posey, {{ Helpers::obfuscateEmailLink('candyp@osaa.org') }} or (503) 682-6722 x225.
@endif

Required fields are indicated with a red asterisk, *.
{{-- Ticket Report Form --}} {{-- Bookkeeper / Accountant Information --}}

{{ $info['school']->short_name }} Bookkeeper/Accountant

@if (is_null($info['book'])) There is no school staff contact specified as the Bookkeeper/Accountant for {{ $info['school']->name }}. If there are questions about this report, the OSAA office will contact the Athletic Director:

@if (is_null($info['ad'])) No AD Listed @else {{ $info['ad']->getDisplayName() }}
{{ $info['ad']->getDisplayRole() }}
{{ $info['ad']->getDisplayEmail() }}
{{ $info['ad']->getDisplayPhone() }} @endif
{{ $info['school']->name }}
{{ $info['address']->line_1 }}
@if (!Helpers::strIsEmpty($info['address']->line_2)) {{ $info['address']->line_2 }}
@endif {{ $info['address']->city }}, {{ $info['address']->state }} {{ $info['address']->zip }}
@else If there are questions about this report, the OSAA office will contact the Bookkeeper/Accountant for {{ $info['school']->name }}:

{{ $info['book']->getDisplayName() }}
{{ $info['book']->getDisplayRole() }}
{{ $info['book']->getDisplayEmail() }}
{{ $info['book']->getDisplayPhone() }}
{{ $info['school']->name }}
{{ $info['address']->line_1 }}
@if (!Helpers::strIsEmpty($info['address']->line_2)) {{ $info['address']->line_2 }}
@endif {{ $info['address']->city }}, {{ $info['address']->state }} {{ $info['address']->zip }}
@endif


{{-- Contest Information --}}

Contest Information

Sport:
{{ Helpers::getActivityName($info['report']->activity) }}
Division:
{{ $info['contest']->division }}
Round:
{{ $info['round_type']->name }} ({{ $info['round_type']->slug }})
Date:
{{ date('l n/j/Y', strtotime($info['event']->start_at)) }}


Home Team:
{{ $info['contest']->home_team_name }}
Away Team:
{{ $info['contest']->away_team_name }}



{{-- Expenses --}}

Reimbursement for Event Management Expenses

  • Approved event management expenses include staff to sell tickets, staff to take tickets at the gate, PA announcers, clock/scoreboard operators, score bookkeepers, and supervisory staff.
  • Approval must be granted in advance by the OSAA for any expense that is beyond your normal expenses to host a league game. These might include, but would not be limited to, field rental, additional security or police, portable bleacher rental, portable restrooms. Receipts must be attached for these other expenses.
  • Programs and game films are not reimbursable expenses.
  • Expenses are not to be withheld from ticket sales.
  • The OSAA will pay officials through local officials associations.

@foreach ($info['config']->data->expenses as $position => $data) @endforeach
Position Number Rate Total
{{ $data->name }} {{ Form::text($position . '_number', $info['expense_data']->{ $position }, array('data-autosave' => true, 'data-field' => 'expense_data->' . $position, 'data-type' => 'INT', 'data-original' => $info['expense_data']->{ $position }, 'data-required' => true, 'data-format' => 'number', 'data-max-value' => $data->limits->{ $info['report']->activity}[1], 'data-title' => $data->name, 'maxlength' => 2, 'style' => 'width: 35px; font-size: 12pt; margin-left: 5px; text-align: center;')) }} ${{ number_format($data->rate, 2) }} each ${{ number_format($data->rate * intval($info['expense_data']->{ $position }), 2) }}
Sub-Total $

Other Approved Expenses

others) >= 4 or !Helpers::strEqual($info['report']->status, 'WORK')) data-button-disabled="disabled" @endif>Add Other Expense

@if (count($info['expense_data']->others) > 0) @foreach ($info['expense_data']->others as $index => $other_expense) @endforeach
Description Total
{{ $other_expense->name }} ${{ number_format($other_expense->amount, 2) }} @if (Helpers::strEqual($info['report']->status, 'WORK')) @else @endif
Sub-Total $ {{ number_format($other_expense_total, 2) }}
@else There are no other expenses added to this report. @endif

This amount is NOT deducted from total ticket sales.
Total Expenses
$


{{-- Sales --}}

Ticket Sales

  • The OSAA auditor has requested a record of beginning and ending ticket numbers.
  • Schools will be held responsible for tickets sold and cash received.
  • Only schools offering reserved seating for regular season games may sell reserved seats for playoff games. Schools cannot increase the price of reserved seats for the playoffs. Regardless of what the school charges, the OSAA must receive the regular adult ticket price for that round. If schools have not had reserved seating during regular season play, they may not institute such a policy for playoffs.
@foreach ($info['config']->data->tickets as $property)
Fatal error: Class 'Helpers' not found in /home/osaa/web_app/dev/app/views/ticket_report/edit_report.blade.php on line 2781