Bugfix for amountToNumber()

This commit is contained in:
2016-08-04 21:04:58 +02:00
parent 58fe6217eb
commit f64154e351
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
var transactionControllers = angular.module('transactionControllers', ['ngResource']);
function amountToNumber(amount) {
var number = amount.toString().replace(',', '.');
var number = amount.toString().replace('.', '').replace(',', '.');
if (number.charAt(0) !== '+' && number.charAt(0) !== '-') {
number = '-' + number;
}
@@ -6,8 +6,8 @@
<tr>
<th style="width: 5%;">Wertstellung</th>
<th style="width: 8%;">Typ</th>
<th style="width: 41%;">Text</th>
<th style="width: 5%;">Betrag</th>
<th style="width: 40%;">Text</th>
<th style="width: 6%;">Betrag</th>
<th class="spacer"></th>
<th style="width: 14%;">Kategorie</th>
<th style="width: 14%;">Notiz</th>
@@ -20,7 +20,7 @@
<td>{{line[1]}}</td>
<td>{{line[2]}}</td>
<td>{{line[3]}}</td>
<td align="right">{{line[4]}} </td>
<td align="right">{{line[4]}}&nbsp;</td>
<td class="spacer"></td>
<td>
<select