Skip to content

Commit b74d914

Browse files
authored
Merge pull request #135 from deeplex/feature/abrechnungsresultate
Feature/abrechnungsresultate
2 parents 5f45ee0 + 403c161 commit b74d914

44 files changed

Lines changed: 7824 additions & 89 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet-postgres
33
{
4-
"name": "C# (.NET) and PostgreSQL",
5-
"dockerComposeFile": "docker-compose.yml",
6-
"service": "app",
4+
"name": "C# (.NET) and PostgreSQL",
5+
"dockerComposeFile": "docker-compose.yml",
6+
"service": "app",
77
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
88
"features": {
99
"ghcr.io/devcontainers/features/node:1": {
1010
"version": "lts"
1111
}
1212
},
13-
"postCreateCommand": "dotnet restore",
14-
13+
"postCreateCommand": "dotnet tool install --global dotnet ef && dotnet restore",
1514
"customizations": {
1615
"vscode": {
17-
"extensions": ["svelte.svelte-vscode", "mhutchie.git-graph", "eamodio.gitlens"]
16+
"extensions": [
17+
"svelte.svelte-vscode",
18+
"mhutchie.git-graph",
19+
"eamodio.gitlens"
20+
]
1821
}
19-
}
20-
22+
}
2123
// Features to add to the dev container. More info: https://containers.dev/features.
2224
// "features": {},
23-
2425
// Configure tool-specific properties.
2526
// "customizations": {},
26-
2727
// Use 'forwardPorts' to make a list of ports inside the container available locally.
2828
// "forwardPorts": ["app:5254"],
2929
// "portsAttributes": {
3030
// "5001": {
3131
// "protocol": "https"
3232
// }
3333
// }
34-
35-
// Use 'postCreateCommand' to run commands after the container is created.
36-
// "postCreateCommand": "dotnet --info",
37-
34+
// Use 'postCreateCommand' to run commands after the container is created.
35+
// "postCreateCommand": "dotnet --info",
3836
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
3937
// "remoteUser": "root"
40-
}
38+
}

Deeplex.Saverwalter.BetriebskostenabrechnungService/PersonenZeitanteil.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,19 @@ public static List<PersonenZeitanteil> GetPersonenZeitanteile(
9494

9595
private static List<DateOnly> getTimestampsOfPersonenAnzahlChanges(List<Vertrag> vertraege, Zeitraum zeitraum)
9696
{
97+
var personenzahl = 0;
9798
var begins = vertraege
9899
.SelectMany(e => e.Versionen)
100+
.OrderBy(e => e.Beginn)
101+
.Where(e =>
102+
{
103+
var filter = e.Personenzahl != personenzahl;
104+
personenzahl = e.Personenzahl;
105+
return filter;
106+
})
99107
.Select(e => e.Beginn)
100108
.ToList();
109+
101110
var ends = vertraege
102111
.Where(e => e.Ende != null)
103112
.Select(e => e.Ende is DateOnly d ? d.AddDays(1) : new DateOnly())

0 commit comments

Comments
 (0)