Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sealed aarsoppgjoer og egen klasse for faktisk inntekt #7252

Merged
merged 5 commits into from
Mar 20, 2025
Merged

Conversation

Bjodn
Copy link
Contributor

@Bjodn Bjodn commented Mar 20, 2025

No description provided.

@Bjodn Bjodn marked this pull request as ready for review March 20, 2025 08:29
@Bjodn Bjodn requested a review from a team as a code owner March 20, 2025 08:29
Copy link
Contributor

@andreasbalevik andreasbalevik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

virkningstidspunkt: YearMonth,
beregning: Beregning?, // Kun null for forbehandling eteroppgjør
sanksjoner: List<Sanksjon>,
): Avkorting {
val virkningstidspunktAar = virkningstidspunkt.year

val oppdaterteOppgjoer =
this.aarsoppgjoer.map { aarsoppgjoer ->
(this.aarsoppgjoer as List<AarsoppgjoerLoepende>).map { aarsoppgjoer ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(this.aarsoppgjoer as List<AarsoppgjoerLoepende>).map { aarsoppgjoer ->
sjekk(this.aarsoppgjoer.none { it is Etteroppgjoer }) {
"Kan ikke beregne avkorting hvis vi har etteroppgjør"
}
val relevanteAarsoppgjoer = this.aarsoppgjoer.filterIsInstance<AarsoppgjoerLoepende>()
val oppdaterteOppgjoer =
relevanteAarsoppgjoer.map { aarsoppgjoer ->

eller noe i den dur? Vet ikke om feilmeldingen er den riktige for akkurat dette tilfellet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Må bli en when is her

@Bjodn Bjodn force-pushed the sealed-aarsoppgjoer branch from 936e5f4 to 78b8817 Compare March 20, 2025 14:54
@Bjodn Bjodn merged commit a452163 into main Mar 20, 2025
4 checks passed
@Bjodn Bjodn deleted the sealed-aarsoppgjoer branch March 20, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants