Bugfix for matcher order

This commit is contained in:
2016-08-01 13:38:01 +02:00
parent bef78693be
commit ecbdb5be21
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.tilman</groupId>
<artifactId>next-transactions</artifactId>
<version>1.5.4</version>
<version>1.5.5</version>
<parent>
<groupId>org.springframework.boot</groupId>
+3 -3
View File
@@ -465,13 +465,12 @@ transactionControllers.controller('ImportListCtrl', [ '$scope', '$resource', '$l
}
for (i = 0; i < $scope.csv.length; i++) {
var matched = false;
var j = 0;
while (!matched && j < $scope.matchers.length) {
while (j < $scope.matchers.length) {
var match = true;
if (match && $scope.matchers[j].dateMatcher)
if ($scope.matchers[j].dateMatcher)
match = $scope.matchers[j].dateMatcher($scope.csv[i][1]);
if (match && $scope.matchers[j].typeMatcher)
match = $scope.matchers[j].typeMatcher($scope.csv[i][2]);
@@ -487,6 +486,7 @@ transactionControllers.controller('ImportListCtrl', [ '$scope', '$resource', '$l
if ($scope.categories[k].name == $scope.matchers[j].targetCategory.name)
$scope.csv[i].targetCategory = $scope.categories[k];
}
break;
}
j++;
@@ -42,7 +42,7 @@
</table>
</div>
<div class="row" style="margin-top: 4ex; text-align: center;">
<textarea ng-model='csvInput' name="csvText" cols="220" rows="30" style="font-family: monospace; font-size: 70%;" disabled></textarea>
<textarea ng-model='csvInput' name="csvText" cols="220" rows="30" style="font-family: monospace; font-size: 70%;"></textarea>
</div>
<!-- div class="row" style="margin-top: 4ex;">
<table class="importTable">