Skip to content

Commit

Permalink
Rechnungen_displayed_multiple_times
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmpp committed Jul 30, 2024
1 parent 53c87a7 commit 0d7a20c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions app/scripts/rechnungen/overview/rechnungenoverview.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,14 +520,8 @@ angular.module('openolitor-admin').controller('RechnungenOverviewController', [

$scope.loading = true;

$scope.allKunden = KundenOverviewModel.query(
{
f: $scope.search.filterQuery,
},
function () {
$scope.tableParams.reload();
$scope.loading = false;
RechnungenOverviewModel.query(
KundenOverviewModel.query( { }, function (allKunden) {
$scope.entries = RechnungenOverviewModel.query(
{
f: $scope.search.filterQuery,
g: /^\d+$/.test($scope.geschaeftsjahr)
Expand All @@ -537,14 +531,14 @@ angular.module('openolitor-admin').controller('RechnungenOverviewController', [
},
function (rechnungen) {
angular.forEach(rechnungen, function (rechnung) {
var kunde = lodash.find($scope.allKunden, {
var kunde = lodash.find(allKunden, {
id: rechnung.kundeId,
});
if (kunde) {
rechnung.kundeBezeichnung = kunde.bezeichnung;
}
$scope.entries.push(rechnung);
});
$scope.allKunden = allKunden;
$scope.tableParams.reload();
$scope.loading = false;
}
Expand Down

0 comments on commit 0d7a20c

Please sign in to comment.