Upload of project files
This commit is contained in:
parent
314197835f
commit
d85891b3c7
4 changed files with 8853 additions and 0 deletions
46
bootstrap.min.css
vendored
Normal file
46
bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
8652
css/styles.css
Normal file
8652
css/styles.css
Normal file
File diff suppressed because it is too large
Load diff
66
js/taxcalc.js
Normal file
66
js/taxcalc.js
Normal file
|
@ -0,0 +1,66 @@
|
|||
document.querySelector('#tax-form').onchange = function(){
|
||||
|
||||
var assessment = Number(document.getElementById('assessmentValue').value);
|
||||
var assessclass = document.getElementById('assessmentClass').value;
|
||||
var muniRate = 0;
|
||||
var schoolRate = 0;
|
||||
var seniorsRate = 0;
|
||||
var totalRate = 0;
|
||||
|
||||
|
||||
// referenceArray = [<MunicipalRate>, <SchoolRate>,<SeniorsRate>,<TotalRate>];
|
||||
// var resRates = [5.2150, 2.3714, 0.1013, 7.6877], resRatesFlt = resRates.map(Number);
|
||||
// var nonresRates = [13.0211, 3.6711, 0.1013, 16.7935], nonresRatesFlt = nonresRates.map(Number);
|
||||
// var farmRates = [25.4555, 2.5682, 0.1024, 28.1261], farmRatesFlt = farmRates.map(Number);
|
||||
// var mandeRates = [7.7145, 0.0000, 0.1024, 7.8169],mandeRatesFlt = mandeRates.map(Number);
|
||||
|
||||
var resRates2021 = [5.2549, 2.6220, 0.1047, 7.8334];
|
||||
var nonresRates2021 = [13.8958, 4.1267, 0.1047, 18.0402];
|
||||
var farmRates2021 = [37.4025, 2.6220, 0.1047, 39.9810];
|
||||
var mandeRates2021 = [13.8958, 0.0000, 0.1047, 14.0005];
|
||||
|
||||
if (assessclass == 1) {
|
||||
muniRate = resRates2021[0];
|
||||
schoolRate = resRates2021[1];
|
||||
seniorsRate = resRates2021[2];
|
||||
totalRate = resRates2021[3];
|
||||
} else if (assessclass == 2) {
|
||||
muniRate = nonresRates2021[0];
|
||||
schoolRate = nonresRates2021[1];
|
||||
seniorsRate = nonresRates2021[2];
|
||||
totalRate = nonresRates2021[3];
|
||||
} else if (assessclass == 3) {
|
||||
muniRate = farmRates2021[0];
|
||||
schoolRate = farmRates2021[1];
|
||||
seniorsRate = farmRates2021[2];
|
||||
totalRate = farmRates2021[3];
|
||||
} else if (assessclass == 4) {
|
||||
muniRate = mandeRates2021[0];
|
||||
schoolRate = mandeRates2021[1];
|
||||
seniorsRate = mandeRates2021[2];
|
||||
totalRate = mandeRates2021[3];
|
||||
}
|
||||
|
||||
var municipalValue = (muniRate / 1000) * assessment;
|
||||
var schoolValue = (schoolRate / 1000) * assessment;
|
||||
var seniorsValue = (seniorsRate / 1000) * assessment;
|
||||
var totalValue = (totalRate / 1000) * assessment;
|
||||
|
||||
console.log(municipalAmount);
|
||||
console.log(schoolAmount);
|
||||
console.log(seniorsAmount);
|
||||
console.log(totalAmount);
|
||||
|
||||
var municipalAmount = document.querySelector('#municipalAmount');
|
||||
var schoolAmount = document.querySelector('#schoolAmount');
|
||||
var seniorsAmount = document.querySelector('#seniorsAmount');
|
||||
var totalAmount = document.querySelector('#totalAmount');
|
||||
|
||||
|
||||
municipalAmount.value = municipalValue.toFixed(2);
|
||||
schoolAmount.value = schoolValue.toFixed(2);
|
||||
seniorsAmount.value = seniorsValue.toFixed(2);
|
||||
totalAmount.value = totalValue.toFixed(2);
|
||||
|
||||
document.getElementById('results').style.display='block';
|
||||
}
|
89
taxcalc.html
Normal file
89
taxcalc.html
Normal file
|
@ -0,0 +1,89 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Tip Calculator</title>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
|
||||
|
||||
</head>
|
||||
<body class="bg-dark">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6 mx-auto">
|
||||
<div class="card card-body text-center mt-5">
|
||||
<h1 class="heading display-5 pb-3">Tax Estimate Calculator</h1>
|
||||
<form id="tax-form">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<label for="assessmentClass">Choose an Assessment Class: </label>
|
||||
<select id="assessmentClass" name="assessmentClass">
|
||||
<option disabled selected value> select an option</option>
|
||||
<option value="1">Residential</option>
|
||||
<option value="2">Non-Residential</option>
|
||||
<option value="3">Farm Land</option>
|
||||
<option value="4">M & E</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">$</span>
|
||||
<input type="number" class="form-control" id="assessmentValue" placeholder="Assessment or Estimated Value">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<hr>
|
||||
|
||||
<script src="js/taxcalc.js"></script>
|
||||
|
||||
<!-- RESULTS -->
|
||||
<div id="results" class="pt-4">
|
||||
<h5>Estimated Tax Amounts</h5>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Municipal Tax</span>
|
||||
<input type="number" class="form-control" id="municipalAmount" style="direction:rtl; font-family:monospace;" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Alberta School Foundation</span>
|
||||
<input type="number" class="form-control" id="schoolAmount" style="direction:rtl; font-family:monospace;" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Cypress View Seniors Levy</span>
|
||||
<input type="number" class="form-control" id="seniorsAmount" style="direction:rtl; font-family:monospace;" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Total Tax Amount</span>
|
||||
<input type="number" class="form-control" id="totalAmount" style="direction:rtl; font-family:monospace;" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Optional JavaScript -->
|
||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue