Skip to content

Commit

Permalink
Venter med å hente inntekt for forrige år til det er klart
Browse files Browse the repository at this point in the history
  • Loading branch information
olekvernberg committed Jan 2, 2024
1 parent d14961d commit 066ac05
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class SigrunService(val sigrunClient: SigrunClient, val fagsakPersonService: Fag
fun hentInntektForAlleÅrMedInntekt(fagsakPersonId: UUID): List<PensjonsgivendeInntektVisning> {
val aktivIdent = fagsakPersonService.hentAktivIdent(fagsakPersonId)

val inntektsår = (YearMonth.now().year - 1) downTo 2017
val tilOgMedÅr = if (YearMonth.now().month.value < 6) YearMonth.now().year - 2 else YearMonth.now().year - 1
val inntektsår = tilOgMedÅr downTo 2017

val pensjonsgivendeInntektList = inntektsår.map {
sigrunClient.hentPensjonsgivendeInntekt(aktivIdent, it).mapTilPensjonsgivendeInntektVisning(it)
Expand Down

0 comments on commit 066ac05

Please sign in to comment.