File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
main/kotlin/no/nav/dagpenger/inntekt/api/v1
test/kotlin/no/nav/dagpenger/inntekt/api/v1 Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -176,8 +176,8 @@ fun Route.uklassifisertInntekt(
176
176
post {
177
177
withContext(coroutineContext) {
178
178
val inntektId = call.parameters[" inntektId" ]!!
179
- call
180
- .receive< InntekterDto >()
179
+ val inntekterDto = call.receive< InntekterDto >()
180
+ inntekterDto
181
181
.mapToStoredInntekt(
182
182
inntektId = inntektId,
183
183
).let {
@@ -194,7 +194,10 @@ fun Route.uklassifisertInntekt(
194
194
inntektPersonMapping.kontekstType,
195
195
),
196
196
beregningsdato = inntektPersonMapping.beregningsdato,
197
- ),
197
+ ).apply {
198
+ this .opptjeningsperiode.førsteMåned = inntekterDto.periode.fraOgMed
199
+ this .opptjeningsperiode.sisteAvsluttendeKalenderMåned = inntekterDto.periode.tilOgMed
200
+ },
198
201
inntekt = it.inntekt,
199
202
manueltRedigert =
200
203
ManueltRedigert .from(
Original file line number Diff line number Diff line change @@ -569,6 +569,9 @@ internal class UklassifisertInntektRouteTest {
569
569
storeInntektCommandSlot.captured.inntektparametre.regelkontekst.id shouldBe inntektPersonMapping.kontekstId
570
570
storeInntektCommandSlot.captured.inntektparametre.regelkontekst.type shouldBe inntektPersonMapping.kontekstType
571
571
storeInntektCommandSlot.captured.inntektparametre.beregningsdato shouldBe inntektPersonMapping.beregningsdato
572
+ storeInntektCommandSlot.captured.inntektparametre.opptjeningsperiode.førsteMåned shouldBe YearMonth .of(2000 , 12 )
573
+ storeInntektCommandSlot.captured.inntektparametre.opptjeningsperiode.sisteAvsluttendeKalenderMåned shouldBe
574
+ YearMonth .of(2025 , 4 )
572
575
storeInntektCommandSlot.captured.manueltRedigert.shouldNotBeNull()
573
576
storeInntektCommandSlot.captured.manueltRedigert!! .redigertAv shouldBe TEST_OAUTH_USER
574
577
}
You can’t perform that action at this time.
0 commit comments