diff --git a/pom.xml b/pom.xml
index 15bcf1b..39b2987 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
de.tilman
next-transactions
- 1.4.0
+ 1.5.0
org.springframework.boot
diff --git a/src/main/resources/static/app/controllers.js b/src/main/resources/static/app/controllers.js
index f39872e..87bdb74 100644
--- a/src/main/resources/static/app/controllers.js
+++ b/src/main/resources/static/app/controllers.js
@@ -392,6 +392,7 @@ transactionControllers.controller('ImportListCtrl', [ '$scope', '$resource', '$l
$scope.processCSV = function () {
$scope.account = ImportService.getAccount();
$scope.categories = ImportService.getCategories();
+ $scope.csvInput = ImportService.getCSV();
$scope.csv = Papa.parse(ImportService.getCSV()).data;
var matcherData = $resource('/api/matchers/search/listForAccount', { projection: 'full', accountId: $scope.account.id }).get();
@@ -464,9 +465,6 @@ transactionControllers.controller('ImportListCtrl', [ '$scope', '$resource', '$l
$scope.importTransaction = function(line) {
if (line.targetCategory) {
- console.log(line[1]);
- console.log(line[1].substr(6,4) + "-" + line[1].substr(3,2) + "-" + line[1].substr(0,2));
-
var newTransaction = new Transaction({
"account" : $scope.account._links.self.href,
"amount" : line[4].replace(',', '.'),
@@ -481,6 +479,15 @@ transactionControllers.controller('ImportListCtrl', [ '$scope', '$resource', '$l
console.log(transaction);
line.submittedTransactionLink = transaction._links.self.href;
line.submittedTransactionId = transaction.id;
+
+ // delete from CSV
+ var descriptionPos = $scope.csvInput.search(line[3]);
+ var lineStart = $scope.csvInput.lastIndexOf('\n', descriptionPos);
+ var lineEnd = $scope.csvInput.indexOf('\n', descriptionPos);
+ if (lineEnd < 0)
+ lineEnd = $scope.csvInput.length;
+ $scope.csvInput = $scope.csvInput.substring(0, lineStart) + $scope.csvInput.substring(lineEnd, $scope.csvInput.length);
+
});
}
}
diff --git a/src/main/resources/static/app/import-list.html b/src/main/resources/static/app/import-list.html
index 979d3ef..3c7358a 100644
--- a/src/main/resources/static/app/import-list.html
+++ b/src/main/resources/static/app/import-list.html
@@ -41,7 +41,10 @@
-
\ No newline at end of file
diff --git a/src/main/resources/static/app/import.html b/src/main/resources/static/app/import.html
index ec6b8c1..507fac1 100644
--- a/src/main/resources/static/app/import.html
+++ b/src/main/resources/static/app/import.html
@@ -7,7 +7,7 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file