').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-dialog-buttons')
.html('
Working...

Please wait, this may take a while to process.
');
// Submit the change
var jqxhr = $.ajax(
{
type : 'POST',
url : '{{ url('/forms/bia/update-form') }}',
data : data,
dataType : 'html'
})
.done(function (data)
{
console.log('Update was successful.');
// Reload
location.reload();
})
.fail(function (jqXHR, status, error)
{
var response = jqXHR.responseText;
var errorData = $.parseJSON(response);
console.log(errorData);
alert ("There was an error updating the record.\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);
dialog_object.html('
Use this window to update this form\'s status.
Received- All of the paperwork is in order
- No further information is needed from the assessor
- The next phase is processing payment for this form
Insufficient- The form needs additional information or this form in incomplete
- The assessor will be able to edit the form and resubmit
- Once resubmitted, the from\'s status will change from INSF to PEND
- Please provide a specific note below that will be sent to the assessor
After the form\'s status is changed, an e-mail will be sent to the assessor to this effect.');
$('.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);
row.css({'background-color':original_background_color});
$(dialog_object).remove();
}
});
}
else
{
$('
')
.appendTo('body')
.dialog(
{
draggable : true,
resizable : false,
modal : true,
height : 200,
width : 400,
title : 'Unable to Mark Payment',
buttons: [
{
text : "Ok",
'class' : "float_right",
'data-autofocus' : "true",
icons : { primary : 'ui-icon-check'},
click : function()
{
// Close the dialog box
$(this).dialog("close");
}
}
],
open : function ()
{
var dialog_object = $(this);
dialog_object.html('
You cannot mark this record for a payment because this record because it has not been marked as received.');
$('.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);
row.css({'background-color':original_background_color});
$(dialog_object).remove();
}
});
}
});
// Gray out deleted forms
$('tr[data-status="DEL"]')
.css({'color' : '#aaaaaa'});
/*
* Make the table sortable
*/
// Up and down sorting arrows
var down_arrow = '{{ asset('/images/icons/bullet_arrow_up.png') }}';
var up_arrow = '{{ asset('/images/icons/bullet_arrow_down.png') }}';
// Bind a click event to table headers that are sortable
$('thead').on('click', 'th[data-sortable="true"]', function()
{
// Remove any sorting images
$('th[data-sortable="true"] img').remove();
// Get the table and the set of rows
var table = $(this).parents('table').eq(0);
var rows = table.find('tr:gt(0)').toArray().sort(comparer($(this).index()));
// Figure out sorting directions
this.asc = !this.asc;
var arrow = down_arrow;
if (!this.asc)
{
rows = rows.reverse();
arrow = up_arrow;
}
// Recreate rows
for (var i = 0; i < rows.length; i++)
{
table.append(rows[i]);
}
// Show sorting arrow
$(this).append('

');
// Recolor the rows
colorRows();
});
// Bind hover events to the table headers that are sortable
$('thead').on('mouseover', 'th[data-sortable="true"]', function ()
{
$(this).css('cursor', 'pointer');
});
$('thead').on('mouseout', 'th[data-sortable="true"]', function ()
{
$(this).css('cursor', 'auto');
});
// Compare string values
function comparer(index)
{
return function(a, b)
{
var valA = getCellValue(a, index);
var valB = getCellValue(b, index);
return $.isNumeric(valA) && $.isNumeric(valB) ? valA - valB : valA.localeCompare(valB);
}
}
// Get a table cell's value
function getCellValue(row, index)
{
var value = $(row).children('td').eq(index).html();
// Remove dollar signs and commas from dollar amounts to help enforce numeric comparison
if (value.match(/\$/))
{
value = value.replace(/(\$|,)/g, '');
}
return value;
}
// Show/hide rows according to the view preferences
var pref = $.parseJSON('{{ json_encode($info['view']) }}');
function viewPreferences()
{
$('tbody tr').each(function ()
{
var row = $(this);
var status = row.attr('data-status');
if (!pref[status])
{
row.hide();
}
else
{
row.show();
}
});
colorRows();
}
viewPreferences();
$('.status_step')
.hover(function()
{
$(this).css({'cursor' : 'pointer',
'color' : '#E87A00'});
},
function()
{
$(this).css({'cursor' : 'pointer',
'color' : ''});
})
.click(function()
{
var item = $(this);
var status = item.attr('data-status');
var visible = pref[status];
pref[status] = !visible;
if (pref[status])
{
item.addClass('show');
}
else
{
item.removeClass('show');
item.css({'color' : '#cccccc'});
}
// Save this user's view preferences
var jqxhr = $.ajax(
{
type : 'POST',
url : '{{ url('account/set-osaa-preference') }}',
data : { 'preference' : 'bia_visible_status',
'settings' : pref},
dataType : 'html'
})
.done(function (data)
{
console.log('Preferences were successfully saved.');
})
.fail(function (jqXHR, status, error)
{
var response = jqXHR.responseText;
var errorData = $.parseJSON(response);
console.log(errorData);
});
viewPreferences();
})
.each(function()
{
var item = $(this);
var status = item.attr('data-status');
var visible = pref[status];
if (visible)
{
item.addClass('show');
}
else
{
item.removeClass('show');
item.css({'color' : '#cccccc'});
}
});
// Assessor info
$('.assessor')
.hover(function ()
{
$(this).css({'cursor' : 'pointer',
'color' : '#005fa9',
'text-decoration' : 'underline'});
},
function ()
{
$(this).css({'color' : '',
'text-decoration' : ''});
})
.click(function()
{
var item = $(this);
var assessor_name = item.text();
var row = item.parents('tr');
var record = row.attr('data-record');
$('
')
.appendTo('body')
.dialog(
{
modal : false,
draggable : true,
resizable : true,
height : 250,
width : 500,
title : assessor_name + ', BIA Assessor Information',
open : function ()
{
var dialog_object = $(this);
dialog_object.html("
");
var jqxhr = $.ajax(
{
type : 'GET',
url : '{{ url('forms/bia/') }}/' + record + '/assessor-info',
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 assessor information.\n\nThis page will be reloaded.");
location.reload();
})
.complete(function ()
{
});
},
close : function ()
{
var dialog_object = $(this);
$(dialog_object).remove();
}
});
});
@stop
@section('page_functions')
{{--
Help--}}
Payments & Reports
@stop
@section('main_content')
{{-- Success Bar --}}
@if (Session::has('success'))
{{ Session::get('success') }}
@endif
{{-- Errors --}}
@if (Session::has('errors'))
@foreach ($errors->all() as $error)
{{ $error }}
@endforeach
@endif
{{ Session::get('year') }}-{{ intval(substr(Session::get('year'), 2, 2)) + 1 }} Reconciliation Report Forms
{{-- Form Status --}}
Form Count by Status
@foreach ($info['status_counts'] as $status => $count)
{{ $count }}
{{ $status }}
@endforeach
@if (count($info['forms']) > 0)
| ID # |
Status |
Assessor |
Total - $ |
Created At |
Received At |
Paid At |
|
@foreach ($info['forms'] as $form)
| {{ $form->id }} |
{{ $form->status }} |
{{ $form->user->getDisplayFullName() }} |
${{ number_format($form->total_amount, 2) }} |
{{ $form->created_at }} |
{{ $form->received_at }} |
{{ $form->paid_at }} |
@if (Helpers::strEqual($form->status, array('PEND', 'INSF', 'RECD', 'DONE')))
@endif
@if (!Helpers::strEqual($form->status, 'DEL'))
@endif
@if (Helpers::strEqual($form->status, array('PEND', 'INSF')))
@endif
@if (Helpers::strEqual($form->status, array('RECD')))
@endif
@if (Helpers::strEqual($form->status, 'DEL'))
@else
@endif
|
@endforeach
@else
There are no BIA Assessment Reconciliation Report forms on record to display.
@endif
@stop