2023-03-28 01:12:30 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2023-03-29 18:10:19 +02:00
|
|
|
<title>Rechner zwischen Brutto-Netto-KoLe</title>
|
2023-07-11 19:46:09 +02:00
|
|
|
<link rel="stylesheet" href="https://wtf-eg.de/css/style.css"/>
|
2023-03-28 01:12:30 +02:00
|
|
|
<style>
|
2023-03-29 17:59:11 +02:00
|
|
|
<!--
|
|
|
|
@media only screen {
|
|
|
|
}
|
2023-03-29 19:00:35 +02:00
|
|
|
-->
|
2023-03-29 17:59:11 +02:00
|
|
|
@media only screen and (max-width: 600px){
|
|
|
|
body #wrap { font-size: 2.1em; }
|
2023-03-29 19:00:35 +02:00
|
|
|
input[type='number'],input+label { display: block;}
|
2023-03-29 17:59:11 +02:00
|
|
|
}
|
|
|
|
@media only screen and (min-width: 768px){
|
2023-03-29 19:00:35 +02:00
|
|
|
label {
|
|
|
|
display:inline-block;
|
|
|
|
width: 12ex;
|
|
|
|
}
|
|
|
|
body #wrap {
|
|
|
|
font-size: 1.2em;
|
|
|
|
}
|
2023-03-29 17:59:11 +02:00
|
|
|
}
|
2023-07-11 20:00:10 +02:00
|
|
|
|
2023-03-29 17:59:11 +02:00
|
|
|
#wrap {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
2023-03-29 19:00:35 +02:00
|
|
|
div fieldset{
|
2023-03-29 17:59:11 +02:00
|
|
|
margin: 0 auto;
|
|
|
|
max-width: 50ex;
|
|
|
|
padding: 2ex;
|
|
|
|
}
|
|
|
|
legend{
|
|
|
|
margin-bottom: 0px;
|
|
|
|
}
|
2023-03-29 19:00:35 +02:00
|
|
|
.radiogroup > legend{
|
|
|
|
min-width: 20ex;
|
|
|
|
display: inline-block;
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
.radiogroup > label{
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
label{ min-width: 20ex; }
|
2023-03-28 01:12:30 +02:00
|
|
|
input[type='number']{text-align:right;}
|
2023-03-29 16:13:41 +02:00
|
|
|
input[readonly='readonly']{background-color:#eee;}
|
2023-03-29 17:59:11 +02:00
|
|
|
h1{
|
|
|
|
font-size: 2em;
|
|
|
|
text-align: center;
|
|
|
|
margin: 1ex auto 2ex auto;
|
|
|
|
}
|
2023-09-23 00:47:17 +02:00
|
|
|
#center_footer {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
2023-03-28 01:12:30 +02:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2023-03-29 17:59:11 +02:00
|
|
|
<div id="#wrap">
|
2023-03-29 18:10:19 +02:00
|
|
|
<h1>Rechner zwischen Brutto-Netto-KoLe</h1>
|
2023-03-29 17:59:11 +02:00
|
|
|
<noscript>
|
|
|
|
Dieser Rechner ist auf JavaScript angewiesen!
|
|
|
|
</noscript>
|
2023-03-29 19:00:35 +02:00
|
|
|
<fieldset>
|
|
|
|
<legend></legend>
|
|
|
|
<section class="radiogroup">
|
2023-07-11 19:46:09 +02:00
|
|
|
<legend>Eingangsgröße</legend><!--
|
2023-05-29 12:28:45 +02:00
|
|
|
--><input accesskey="b" type="radio" name="b" value="e" id="bb" class="bb" checked="checked"/> <label for="bb"><u>B</u>rutto</label><!--
|
|
|
|
--><input accesskey="n" type="radio" name="b" value="b" id="bn" class="bb"/> <label for="bn"><u>N</u>etto</label><!--
|
|
|
|
--><input accesskey="k" type="radio" name="b" value="k" id="bk" class="bb"/> <label for="bk"><u>K</u>oLe</label>
|
2023-03-29 19:00:35 +02:00
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<div>
|
2023-05-29 12:28:45 +02:00
|
|
|
<label for="e">Br<u>u</u>tto</label>
|
2023-07-11 19:46:09 +02:00
|
|
|
<input accesskey="u" type="number" step="0.01" id="e" value="100.00"/> €
|
2023-03-29 19:00:35 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
2023-05-29 12:28:45 +02:00
|
|
|
<label for="u">Umsatzsteuersatz</label>
|
|
|
|
<input type="number" step="0.01" id="u" value="19.00"/> %
|
2023-03-29 19:00:35 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
2023-05-29 12:28:45 +02:00
|
|
|
<label for="us">Umsatzsteuer</label>
|
2023-07-11 19:46:09 +02:00
|
|
|
<input readonly="readonly" type="number" step="0.01" id="us" value="0.00"/> €
|
2023-03-29 19:00:35 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
2023-05-29 12:28:45 +02:00
|
|
|
<label for="n">N<u>e</u>tto</label>
|
2023-07-11 19:46:09 +02:00
|
|
|
<input accesskey="e" type="number" step="0.01" id="n" value="0.00"/> €
|
2023-03-29 19:00:35 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
2023-07-11 19:46:09 +02:00
|
|
|
<label for="ec">Entropie-Tarif</label><!-- ggf. künftig Grundlage wie Handbuch/Dokumentation verlinken -->
|
2023-05-29 12:28:45 +02:00
|
|
|
<select id="ec">
|
2023-07-11 19:46:09 +02:00
|
|
|
<option value="l" accesskey="l" name="low">Umsatz ≤ 1.000 €</option><!-- low: <=1 TEUR -->
|
|
|
|
<option value="h" accesskey="h" name="high">Umsatz > 1.000 €</option><!-- high: >1 TEUR -->
|
2023-05-29 12:28:45 +02:00
|
|
|
<option value="c" accesskey="c" name="custom">nach Vereinbarung</option><!-- custom: separate agreement -->
|
|
|
|
</select>
|
2023-03-29 19:00:35 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
2023-05-29 12:28:45 +02:00
|
|
|
<label for="z">Entropieumlagesatz</label>
|
|
|
|
<input type="number" step="0.01" id="z" value="23.00"/> %
|
2023-03-29 19:00:35 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
2023-05-29 12:28:45 +02:00
|
|
|
<label for="eu">Entropieumlage</label>
|
2023-07-11 19:46:09 +02:00
|
|
|
<input readonly="readonly" type="number" step="0.01" id="eu" value="23.00"/> €
|
2023-05-29 12:28:45 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<label for="k">K<u>o</u>Le</label>
|
2023-07-11 19:46:09 +02:00
|
|
|
<input accesskey="o" type="number" step="0.01" id="k" value="0.00"/> €
|
2023-03-29 19:00:35 +02:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section>
|
2023-05-29 12:28:45 +02:00
|
|
|
<button accesskey="r" id="b" type="button">Be<u>r</u>echnen</button>
|
2023-03-29 19:00:35 +02:00
|
|
|
</section>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
2023-03-28 01:12:30 +02:00
|
|
|
<script>
|
|
|
|
var e=document.getElementById('e');
|
|
|
|
var u=document.getElementById('u');
|
2023-03-29 12:44:05 +02:00
|
|
|
var us=document.getElementById('us');
|
2023-03-28 11:21:14 +02:00
|
|
|
var n=document.getElementById('n');
|
2023-03-28 01:12:30 +02:00
|
|
|
var z=document.getElementById('z');
|
2023-03-29 12:44:05 +02:00
|
|
|
var eu=document.getElementById('eu');
|
2023-03-28 01:12:30 +02:00
|
|
|
var k=document.getElementById('k');
|
2023-05-29 12:28:45 +02:00
|
|
|
var bb=document.getElementById('bb');
|
|
|
|
var bn=document.getElementById('bn');
|
|
|
|
var bk=document.getElementById('bk');
|
2023-03-28 11:21:14 +02:00
|
|
|
var s = document.getElementById('b');
|
2023-05-29 12:28:45 +02:00
|
|
|
var c = document.getElementById('ec');
|
2023-03-28 01:12:30 +02:00
|
|
|
|
2023-03-28 11:21:14 +02:00
|
|
|
function getFormFloat(f){
|
2023-03-28 11:27:14 +02:00
|
|
|
return parseFloat(f.value);
|
2023-03-28 11:21:14 +02:00
|
|
|
}
|
|
|
|
function roundCents(f){
|
2023-03-29 18:14:06 +02:00
|
|
|
return f.toFixed(2);
|
2023-03-28 11:21:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
s.addEventListener('click', function(){
|
2023-03-28 01:12:30 +02:00
|
|
|
if(bk.checked){
|
2023-03-28 11:21:14 +02:00
|
|
|
e.value = roundCents( getFormFloat(k) * ( 1 + getFormFloat(u) / 100 ) / ( 1 - getFormFloat(z) / 100 ) );
|
|
|
|
n.value = roundCents( getFormFloat(k) / ( 1 - getFormFloat(z) / 100 ) );
|
|
|
|
}else if(bb.checked){
|
|
|
|
k.value = roundCents( getFormFloat(e) / ( 1 + getFormFloat(u) / 100 ) * ( 1 - getFormFloat(z) / 100 ) );
|
|
|
|
n.value = roundCents( getFormFloat(e) / ( 1 + getFormFloat(u) / 100 ) );
|
|
|
|
}else if(bn.checked){
|
|
|
|
e.value = roundCents( getFormFloat(n) * ( 1 + getFormFloat(u) / 100 ) );
|
|
|
|
k.value = roundCents( getFormFloat(n) * ( 1 - getFormFloat(z) / 100 ) );
|
2023-03-28 01:12:30 +02:00
|
|
|
}
|
2023-03-29 17:59:11 +02:00
|
|
|
us.value = roundCents(e.value * getFormFloat(u) / 100 );
|
|
|
|
eu.value = roundCents(n.value * getFormFloat(z) / 100 );
|
2023-03-28 01:12:30 +02:00
|
|
|
});
|
2023-03-28 11:21:14 +02:00
|
|
|
e.addEventListener('change', function(){bb.checked = true;});
|
|
|
|
n.addEventListener('change', function(){bn.checked = true;});
|
2023-05-29 12:28:45 +02:00
|
|
|
c.addEventListener('change', function(){
|
|
|
|
var selInd=this.selectedIndex;
|
|
|
|
console.log('Entropie-Tarif: '+selInd+'('+z.disabled+': '+z.value+')');
|
|
|
|
switch(selInd){
|
|
|
|
case 0: //low: <1.000 EUR revenue
|
|
|
|
//23.0 %
|
|
|
|
z.value='23.00';
|
|
|
|
z.disabled=true;
|
|
|
|
break;;
|
|
|
|
case 1: //high: >1.000 EUR revenue
|
|
|
|
//11.5 %
|
|
|
|
z.disabled=true;
|
|
|
|
z.value='11.50';
|
|
|
|
break;;
|
|
|
|
case 2: //custom: according toseparate agreement
|
|
|
|
z.disabled=false;
|
|
|
|
//~ z.focus();
|
|
|
|
break;;
|
|
|
|
}
|
|
|
|
});
|
2023-05-29 13:53:36 +02:00
|
|
|
// set entropy tax to standard value
|
|
|
|
c.selectedIndex=0;
|
|
|
|
z.value='23.00';
|
|
|
|
z.disabled=true;
|
|
|
|
// calc
|
2023-03-28 11:21:14 +02:00
|
|
|
s.click();
|
2023-03-28 01:12:30 +02:00
|
|
|
</script>
|
2023-09-23 00:47:17 +02:00
|
|
|
<div id="center_footer">
|
|
|
|
<p>Der Quellcode befindet unter <a href="https://git.wtf-eg.de/wtf-eg/simplekolecalc">https://git.wtf-eg.de/wtf-eg/simplekolecalc</a>. </p>
|
|
|
|
</div>
|
2023-03-29 17:59:11 +02:00
|
|
|
</div>
|
2023-03-28 01:12:30 +02:00
|
|
|
</body>
|
|
|
|
</html>
|