Bugfix for matcher order
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user