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