Bugfix for autoselection of creditor

This commit is contained in:
2016-08-04 16:33:30 +02:00
parent b8a7a6e7e4
commit 58fe6217eb
2 changed files with 3 additions and 13 deletions
+2 -12
View File
@@ -26,7 +26,7 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$routePara
// get outstandings (expenses and withdrawals) for all users of the account
var promises = new Array($scope.accountUsers.length);
for (i = 0; i < $scope.accountUsers.length; i++) {
var resource = $resource('/api/transactions/search/outstandings', { accountId: $scope.account.id, userId: $scope.accountUsers[i].id }).get();
var resource = $resource('/api/transactions/search/outstandings', { accountId: $scope.account.id, userId: $scope.accountUsers[i].id, size: 500 }).get();
promises[i] = resource.$promise;
}
@@ -106,13 +106,7 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$routePara
// if this is selected to be a withdrawal, preselect the current user and disable "no creditor" radio button
if ($scope.transaction.category.name === 'Private Entnahme') {
var userLabels = document.getElementsByClassName('userLabel');
for (i = 0; i < userLabels.length; i++) {
if (userLabels[i].innerHTML.indexOf($scope.userinfo.name) >= 0) {
userLabels[i].getElementsByTagName('INPUT')[0].checked = true;
}
}
$scope.transaction.creditor = $scope.userinfo._links.self.href;
document.getElementById('noCreditorRadioButton').disabled = true;
}
else {
@@ -465,13 +459,9 @@ transactionControllers.controller('ImportListCtrl', [ '$scope', '$resource', '$l
}
console.log('$scope.csv.length: ' + $scope.csv.length);
for (i = 0; i < $scope.csv.length; i++) {
var j = 0;
console.log($scope.csv[i]);
while (j < $scope.matchers.length) {
var match = true;