update 1902111151

This commit is contained in:
vkservicesllc
2019-02-11 11:51:37 -05:00
parent 7fbde343c2
commit 6ecaca50d6
3 changed files with 31588 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Local Payroll and Expenses Report</title>
</head>
<body>
<table id="table"></table>
<script src="script.js" charset="utf-8"></script>
</body>
</html>

View File

@@ -0,0 +1,19 @@
function getReportFromServer() {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
if (xhr.status >= 200 && xhr.status < 400) {
var repObj = JSON.parse(xhr.responseText),
repKeys = Object.keys(repObj);
var table = document.getElementById('table'),
content = '<tr><th>Week</th><th>Total Payroll</th><th>Total Expense</th></tr>';
for (var i = 0; i < repKeys.length; i++) {
content += '<tr><th>' + repKeys[i] + '</th>';
content += '<td>' + repObj[repKeys[i]].payroll.total + '</td>';
content += '<td>' + repObj[repKeys[i]].expense.total + '</td></tr>'
}
table.innerHTML = content;
}
}
xhr.open('GET', 'Report.json', true);
xhr.send();
}