Skip to content

Commit

Permalink
Merge branch 'main' into grunnlag-barnetilsyn
Browse files Browse the repository at this point in the history
  • Loading branch information
s148719 committed Dec 5, 2024
2 parents f4ac86c + e202f7e commit 032a831
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ class InntektService(
it.datoFom = it.bestemDatoFomForOffentligInntekt()
it.datoTom = it.bestemDatoTomForOffentligInntekt()
}

val manuelleInntekterSomErFjernet = behandling.inntekter.filter { !it.taMed && it.kilde == Kilde.MANUELL }
behandling.inntekter.removeAll(manuelleInntekterSomErFjernet)
}

@Transactional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,19 @@ class InntektServiceMockTest {
inntektService.rekalkulerPerioderInntekter(behandling.id!!)

val inntekter = behandling.inntekter.toList()

inntekter.shouldHaveSize(3)
assertSoftly(inntekter[0]) {
taMed shouldBe false
datoFom shouldBe null
datoTom shouldBe null
}
assertSoftly(inntekter[1]) {
taMed shouldBe true
datoFom shouldBe LocalDate.parse("2023-08-01")
datoTom shouldBe LocalDate.parse("2024-07-31")
}
assertSoftly(inntekter[2]) {
assertSoftly(inntekter[1]) {
taMed shouldBe true
datoFom shouldBe virkningstidspunkt
datoTom shouldBe LocalDate.parse("2024-07-31")
}
assertSoftly(inntekter[3]) {
assertSoftly(inntekter[2]) {
taMed shouldBe true
datoFom shouldBe LocalDate.parse("2024-01-01")
datoTom shouldBe null
Expand Down

0 comments on commit 032a831

Please sign in to comment.