-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
apps/etterlatte-beregning/src/main/kotlin/avkorting/Avkorting.kt
Outdated
Show resolved
Hide resolved
apps/etterlatte-beregning/src/main/kotlin/avkorting/Avkorting.kt
Outdated
Show resolved
Hide resolved
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 -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(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
There was a problem hiding this comment.
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
apps/etterlatte-beregning/src/main/kotlin/avkorting/AvkortingTidligAlderspensjonService.kt
Outdated
Show resolved
Hide resolved
apps/etterlatte-beregning/src/main/kotlin/avkorting/AvkortingValider.kt
Outdated
Show resolved
Hide resolved
apps/etterlatte-beregning/src/main/kotlin/avkorting/AvkortingValider.kt
Outdated
Show resolved
Hide resolved
… grunnlag for løpende avkorting og etteroppgjør
936e5f4
to
78b8817
Compare
No description provided.