-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot.html
128 lines (114 loc) · 8.02 KB
/
boot.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!doctype html>
<html lang="da-DK">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Løn beregner - Kontrollere om din udbetalte løn stemmer overens. Beregn løn i forhold til atp, pension, bidrag, trækprocent, osv">
<meta name="keywords" content="løn, bruttoløn, brutto, nettoløn, netto, atp, pension, Arbejdsmarkedsbidrag, Arbejdsmarkedets, Tillægspension, udbetalling, udbetalt, udegn, lommeregner, hvad får jeg i løn, hvad får jeg udbetalt, månedsløn, skattetræk, trækprocent ">
<meta name="author" content="Poul Lynge Larsen">
<title>Løn beregner</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<meta name="theme-color" content="#7952b3">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
.icon-list {padding-left: 0; list-style: none;}
.icon-list li {display: flex; align-items: flex-start; margin-bottom: .25rem;}
.icon-list li::before {display: block; flex-shrink: 0; width: 1.5em; height: 1.5em; margin-right: .5rem; content: "";
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23212529' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z'/%3E%3C/svg%3E") no-repeat center center / 100% auto;
}
</style>
</head>
<body class="bg-light bg-gradient">
<div class="col-lg-6 mx-auto p-3 py-md-5">
<header class="d-flex align-items-center pb-3 mb-5 border-bottom">
<a href="/" class="d-flex align-items-center text-dark text-decoration-none">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" class="me-2" viewBox="0 0 118 94" role="img"><title>Bootstrap</title><path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z" fill="currentColor"></path></svg>
<span class="fs-4">Løn beregner</span>
</a>
</header>
<main>
<div class="input-group mb-3">
<label for="input_bruttoloen" class="input-group-text">Løn </label>
<input type="text" class="form-control" id="input_bruttoloen" placeholder="Løn" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" />
<span class="input-group-text">kr</span>
</div>
<div class="input-group mb-3">
<label for="input_fradrag" class="input-group-text">Fradrag </label>
<input type="text" class="form-control" id="input_fradrag" placeholder="Fradrag" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" />
<span class="input-group-text">kr</span>
</div>
<div class="input-group mb-3">
<label for="input_am_bidrag_pro" class="input-group-text">AM bidrag </label>
<input type="text" class="form-control" id="input_am_bidrag_pro" value="8" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" />
<span class="input-group-text">%</span>
</div>
<div class="input-group mb-3">
<label for="input_am_pension_pro" class="input-group-text">AM pension </label>
<input type="text" class="form-control" id="input_am_pension_pro" value="4" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" />
<span class="input-group-text">%</span>
</div>
<div class="input-group mb-3">
<label for="input_atp_pension" class="input-group-text">ATP </label>
<input type="text" class="form-control" id="input_atp_pension" value="90" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" />
<span class="input-group-text">kr</span>
</div>
<div class="input-group mb-3">
<label for="input_traekprocent" class="input-group-text">Trækprocent</label>
<input type="text" class="form-control" id="input_traekprocent" value="37" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" />
<span class="input-group-text">%</span>
</div>
<p class="fs-5 col-md-8">Løn til udbetaling : <strong><span id = "loen_result"></span></strong></p>
<div class="mb-5">
<input type="button" class="btn btn-primary btn-lg px-4" onClick="loen_beregn()" Value="Beregn løn til udbetaling" />
</div>
<hr class="col-3 col-md-2 mb-5">
<div class="col-md-8">
<h2>Om Løn beregner</h2>
<p>Løn beregner er en simpel formular til at udregne ens månedsløn. <br>Du kan bruge den til at kontrollere om beregningerne på din lønseddel er korrekte.</p>
<p>Løn beregner regner kun hele din samlet løn dvs. at den bregner <u>ikke</u> timeløn, arbejdstimer, overabejde, nattearbejde, frokost, godtgørelse, weekendarbejde, bonus og ligne.</p>
</div>
</main>
<footer class="pt-5 my-5 text-muted border-top">
Created by Poul Lynge Larsen · © 2021
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
<script>
function loen_beregn() {
// SET VARIABLER FOR HVERT INPUT
var
input_bruttoloen = document.getElementById("input_bruttoloen").value,
input_fradrag = document.getElementById("input_fradrag").value,
input_am_bidrag_pro = document.getElementById("input_am_bidrag_pro").value,
input_am_pension_pro = document.getElementById("input_am_pension_pro").value,
input_atp_pension = document.getElementById("input_atp_pension").value,
input_traekprocent = document.getElementById("input_traekprocent").value;
// ===== MELLEM REGNING =====
// INFO: _kr = kroner (omregn procent til kroner)
// Klargøring a variabler til mellemregning
// Variablerne burde vaere korrekte nu eller kan du selv kontrollere det
var
am_pension = (input_bruttoloen / 100) * input_am_pension_pro,
am_bidrag = (((input_bruttoloen - input_atp_pension) - am_pension) / 100) * input_am_bidrag_pro,
a_indkomst = ((input_bruttoloen - input_atp_pension) - am_pension) - am_bidrag,
skatte_grundlag = a_indkomst - input_fradrag,
skat = (skatte_grundlag / 100) * input_traekprocent,
nettoloen = a_indkomst - skat,
resultat = Math.floor(nettoloen);
// Indsæt resultat i ID
document.getElementById("loen_result").innerHTML = new Intl.NumberFormat('da-DK').format(resultat) + ' Kr.';
}
</script>
</body>
</html>