org.springframework.boot
diff --git a/src/main/java/de/tilman/transactions/domain/Matcher.java b/src/main/java/de/tilman/transactions/domain/Matcher.java
index 4387b82..64020ef 100644
--- a/src/main/java/de/tilman/transactions/domain/Matcher.java
+++ b/src/main/java/de/tilman/transactions/domain/Matcher.java
@@ -5,7 +5,6 @@ import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
-import javax.persistence.OneToOne;
@Entity
public class Matcher {
@@ -24,7 +23,7 @@ public class Matcher {
private String textMatcherCode;
private String amountMatcherCode;
- @OneToOne
+ @ManyToOne
private Category targetCategory;
private String targetDescription;
diff --git a/src/main/resources/static/app/controllers.js b/src/main/resources/static/app/controllers.js
index 4d9d3d0..1a8f280 100644
--- a/src/main/resources/static/app/controllers.js
+++ b/src/main/resources/static/app/controllers.js
@@ -485,6 +485,7 @@ transactionControllers.controller('ImportListCtrl', [ '$scope', '$resource', '$l
if (match) {
$scope.csv[i].targetDescription = $scope.matchers[j].targetDescription;
$scope.csv[i].matcherPosition = $scope.matchers[j].position;
+ $scope.csv[i].creditor = $scope.matchers[j].creditor;
for (k = 0; k < $scope.categories.length; k++) {
if ($scope.categories[k].name == $scope.matchers[j].targetCategory.name)
$scope.csv[i].targetCategory = $scope.categories[k];
@@ -507,9 +508,11 @@ transactionControllers.controller('ImportListCtrl', [ '$scope', '$resource', '$l
"date" : new Date(line[1].substr(6,4) + "-" + line[1].substr(3,2) + "-" + line[1].substr(0,2)),
"description" : line.targetDescription != undefined ? line.targetDescription : '',
"category" : line.targetCategory._links.self.href,
- "creditor" : ""
+ "creditor" : ''
});
+ console.log(newTransaction);
+
newTransaction.$save(function(transaction) {
line.submitted = true;
console.log(transaction);
diff --git a/src/main/resources/static/app/import-list.html b/src/main/resources/static/app/import-list.html
index 357eb9a..4424fde 100644
--- a/src/main/resources/static/app/import-list.html
+++ b/src/main/resources/static/app/import-list.html
@@ -20,7 +20,7 @@
| {{line[1]}} |
{{line[2]}} |
{{line[3]}} |
- {{line[4]}} € |
+ |
|
|