Skip to content

Commit

Permalink
Merge pull request #689 from OpenOlitor/fix/Rechnungen_displayed_mult…
Browse files Browse the repository at this point in the history
…iple_times

Rechnungen_displayed_multiple_times
  • Loading branch information
mcmpp authored Aug 1, 2024
2 parents 53c87a7 + 0d7a20c commit bb7cf73
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 bb7cf73

Please sign in to comment.