forked from gnibeil/simplekolecalc
rm replacing decimal separator
as html5 input type takes care of this already
This commit is contained in:
parent
7c31eb5458
commit
b864880c5c
@ -6,7 +6,6 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>Bei Eingaben werden Komma und Punkt als Dezimaltrennzeichen betrachtet.</p>
|
|
||||||
<table>
|
<table>
|
||||||
<tr><td>Ausgangsbetrag:</td><td><input type="radio" name="b" value="e" id="bb" class="bb" checked="checked"/><label for="bb">Brutto</label><input type="radio" name="b" value="b" id="bn" class="bb"/><label for="bn">Netto</label><input type="radio" name="b" value="k" id="bk" class="bb"/><label for="bk">KoLe</label></td></tr>
|
<tr><td>Ausgangsbetrag:</td><td><input type="radio" name="b" value="e" id="bb" class="bb" checked="checked"/><label for="bb">Brutto</label><input type="radio" name="b" value="b" id="bn" class="bb"/><label for="bn">Netto</label><input type="radio" name="b" value="k" id="bk" class="bb"/><label for="bk">KoLe</label></td></tr>
|
||||||
<tr><td>Brutto</td><td><input type="number" step="0.01" id="e" value="100.00"/> €</td></tr>
|
<tr><td>Brutto</td><td><input type="number" step="0.01" id="e" value="100.00"/> €</td></tr>
|
||||||
@ -28,7 +27,7 @@
|
|||||||
var s = document.getElementById('b');
|
var s = document.getElementById('b');
|
||||||
|
|
||||||
function getFormFloat(f){
|
function getFormFloat(f){
|
||||||
return parseFloat(f.value.replace(/,/g, '.').replace(/ /g, ''));
|
return parseFloat(f.value);
|
||||||
}
|
}
|
||||||
function roundCents(f){
|
function roundCents(f){
|
||||||
return Math.round( f * 100 ) / 100;
|
return Math.round( f * 100 ) / 100;
|
||||||
|
Loading…
Reference in New Issue
Block a user