Skip to content

Commit 6958303

Browse files
committed
TSFF-1101: Vekter ikke-yrkesaktive likt som aktive i beregning av utbetalingsgrad
1 parent 0d98d39 commit 6958303

File tree

3 files changed

+28
-29
lines changed

3 files changed

+28
-29
lines changed

regler/src/main/kotlin/no/nav/pleiepengerbarn/uttak/regler/BeregnUtbetalingsgrader.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ enum class Arbeidstype(val kode: String) {
2626
}
2727

2828
val GRUPPE_SOM_SKAL_SPESIALHÅNDTERES = setOf(
29-
Arbeidstype.IKKE_YRKESAKTIV,
3029
Arbeidstype.IKKE_YRKESAKTIV_UTEN_ERSTATNING,
3130
Arbeidstype.KUN_YTELSE
3231
)
3332
private val AKTIVITETS_GRUPPER = listOf(
3433
setOf(
3534
Arbeidstype.ARBEIDSTAKER,
35+
Arbeidstype.IKKE_YRKESAKTIV,
3636
Arbeidstype.FRILANSER,
3737
Arbeidstype.SELVSTENDIG_NÆRINGSDRIVENDE
3838
),

regler/src/test/kotlin/no/nav/pleiepengerbarn/uttak/regler/BeregnGraderTest.kt

+20-21
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ internal class BeregnGraderTest {
2121
private val IKKE_YRKESAKTIV_UTEN_ERSTATNING = Arbeidsforhold(type = Arbeidstype.IKKE_YRKESAKTIV_UTEN_ERSTATNING.kode)
2222
private val INAKTIV = Arbeidsforhold(type = Arbeidstype.INAKTIV.kode)
2323
private val DAGPENGER = Arbeidsforhold(type = Arbeidstype.DAGPENGER.kode)
24-
private val KUN_YTELSE = Arbeidsforhold(type = Arbeidstype.KUN_YTELSE.kode)
2524
private val FRILANS = Arbeidsforhold(type = Arbeidstype.FRILANSER.kode)
2625
private val PERIODE = LukketPeriode("2023-01-01/2023-01-31")
2726
private val NYE_REGLER_UTBETALINGSGRAD_DATO = LocalDate.parse("2023-06-01")
@@ -404,8 +403,8 @@ internal class BeregnGraderTest {
404403

405404
grader4.assert(
406405
Årsak.AVKORTET_MOT_INNTEKT,
407-
Prosent(80),
408-
IKKE_YRKESAKTIV to Prosent(80).setScale(2, RoundingMode.HALF_UP),
406+
Prosent(92),
407+
IKKE_YRKESAKTIV to Prosent(100).setScale(2, RoundingMode.HALF_UP),
409408
ARBEIDSGIVER1 to Prosent(100),
410409
FRILANS to Prosent(0)
411410
)
@@ -783,9 +782,9 @@ internal class BeregnGraderTest {
783782

784783
grader.assert(
785784
Årsak.AVKORTET_MOT_INNTEKT,
786-
Prosent(50),
785+
Prosent(75),
787786
ARBEIDSGIVER1 to Prosent(50),
788-
IKKE_YRKESAKTIV to Prosent(50)
787+
IKKE_YRKESAKTIV to Prosent(100)
789788
)
790789
}
791790

@@ -810,8 +809,8 @@ internal class BeregnGraderTest {
810809
grader.assert(
811810
Årsak.GRADERT_MOT_TILSYN,
812811
Prosent(53),
813-
ARBEIDSGIVER1 to Prosent(53),
814-
IKKE_YRKESAKTIV to Prosent(53)
812+
ARBEIDSGIVER1 to Prosent(40),
813+
IKKE_YRKESAKTIV to Prosent(66)
815814
)
816815
}
817816

@@ -836,8 +835,8 @@ internal class BeregnGraderTest {
836835
grader.assert(
837836
Årsak.GRADERT_MOT_TILSYN,
838837
Prosent(53),
839-
ARBEIDSGIVER1 to Prosent(53),
840-
IKKE_YRKESAKTIV to Prosent(53)
838+
ARBEIDSGIVER1 to Prosent(40),
839+
IKKE_YRKESAKTIV to Prosent(66)
841840
)
842841
}
843842

@@ -862,10 +861,10 @@ internal class BeregnGraderTest {
862861

863862
grader.assert(
864863
Årsak.AVKORTET_MOT_INNTEKT,
865-
Prosent(63),
864+
Prosent(75),
866865
ARBEIDSGIVER1 to Prosent(50),
867866
ARBEIDSGIVER2 to Prosent(75),
868-
IKKE_YRKESAKTIV to Prosent(62.5)
867+
IKKE_YRKESAKTIV to Prosent(100)
869868
)
870869
}
871870

@@ -916,10 +915,10 @@ internal class BeregnGraderTest {
916915

917916
grader.assert(
918917
Årsak.AVKORTET_MOT_INNTEKT,
919-
Prosent(80),
918+
Prosent(87),
920919
ARBEIDSGIVER1 to Prosent(60),
921920
DAGPENGER to Prosent(100),
922-
IKKE_YRKESAKTIV to Prosent(80)
921+
IKKE_YRKESAKTIV to Prosent(100)
923922
)
924923
}
925924

@@ -944,10 +943,10 @@ internal class BeregnGraderTest {
944943

945944
grader.assert(
946945
Årsak.AVKORTET_MOT_INNTEKT,
947-
Prosent(80),
946+
Prosent(87),
948947
ARBEIDSGIVER1 to Prosent(60),
949948
INAKTIV to Prosent(100),
950-
IKKE_YRKESAKTIV to Prosent(80)
949+
IKKE_YRKESAKTIV to Prosent(100)
951950
)
952951
}
953952

@@ -973,11 +972,11 @@ internal class BeregnGraderTest {
973972

974973
grader.assert(
975974
Årsak.AVKORTET_MOT_INNTEKT,
976-
Prosent(67),
975+
Prosent(75),
977976
ARBEIDSGIVER1 to Prosent(60),
978977
ARBEIDSGIVER2 to Prosent(40),
979978
DAGPENGER to Prosent(100),
980-
IKKE_YRKESAKTIV to Prosent(66.67).setScale(2, RoundingMode.HALF_UP)
979+
IKKE_YRKESAKTIV to Prosent(100).setScale(2, RoundingMode.HALF_UP)
981980
)
982981
}
983982

@@ -1003,10 +1002,10 @@ internal class BeregnGraderTest {
10031002
)
10041003

10051004
grader.assert(
1006-
Årsak.FOR_LAV_TAPT_ARBEIDSTID,
1007-
NULL_PROSENT,
1008-
ARBEIDSGIVER1 to NULL_PROSENT,
1009-
IKKE_YRKESAKTIV to NULL_PROSENT
1005+
Årsak.AVKORTET_MOT_INNTEKT,
1006+
BigDecimal(55),
1007+
ARBEIDSGIVER1 to BigDecimal(10),
1008+
IKKE_YRKESAKTIV to BigDecimal(100)
10101009
)
10111010
}
10121011

server/src/test/kotlin/no/nav/pleiepengerbarn/uttak/server/UttakplanApiTest.kt

+7-7
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ class UttakplanApiTest(@Autowired val restTemplate: TestRestTemplate) {
122122

123123
uttaksplan.assertOppfylt(
124124
perioder = listOf(LukketPeriode("2023-05-29/2023-05-31")),
125-
grad = Prosent(50),
125+
grad = Prosent(75),
126126
gradPerArbeidsforhold = mapOf(
127-
IKKE_YRKESAKTIV to Prosent(50),
127+
IKKE_YRKESAKTIV to Prosent(100),
128128
ARBEIDSFORHOLD1 to Prosent(50)
129129
),
130130
oppfyltÅrsak = Årsak.AVKORTET_MOT_INNTEKT,
@@ -493,7 +493,7 @@ class UttakplanApiTest(@Autowired val restTemplate: TestRestTemplate) {
493493
// perioden hvor kun IKKE_YRKESAKTIV har blitt overstyrt
494494
uttaksplan.assertOppfylt(
495495
perioder = listOf(LukketPeriode("2020-01-06/2020-01-08")),
496-
grad = Prosent(50),
496+
grad = Prosent(75),
497497
gradPerArbeidsforhold = mapOf(
498498
IKKE_YRKESAKTIV to BigDecimal.ZERO,
499499
ARBEIDSFORHOLD1 to Prosent(50)
@@ -506,9 +506,9 @@ class UttakplanApiTest(@Autowired val restTemplate: TestRestTemplate) {
506506
// perioden hvor ingen aktiviteter har blitt overstyrt
507507
uttaksplan.assertOppfylt(
508508
perioder = listOf(LukketPeriode("2020-01-09/2020-01-10")),
509-
grad = Prosent(50),
509+
grad = Prosent(75),
510510
gradPerArbeidsforhold = mapOf(
511-
IKKE_YRKESAKTIV to Prosent(50),
511+
IKKE_YRKESAKTIV to Prosent(100),
512512
ARBEIDSFORHOLD1 to Prosent(50)
513513
),
514514
oppfyltÅrsak = Årsak.AVKORTET_MOT_INNTEKT,
@@ -563,9 +563,9 @@ class UttakplanApiTest(@Autowired val restTemplate: TestRestTemplate) {
563563

564564
uttaksplan.assertOppfylt(
565565
perioder = listOf(LukketPeriode("2023-05-29/2023-05-31")),
566-
grad = Prosent(75),
566+
grad = Prosent(91),
567567
gradPerArbeidsforhold = mapOf(
568-
IKKE_YRKESAKTIV to Prosent(75),
568+
IKKE_YRKESAKTIV to Prosent(100),
569569
ARBEIDSFORHOLD1 to Prosent(75)
570570
),
571571
oppfyltÅrsak = Årsak.AVKORTET_MOT_INNTEKT,

0 commit comments

Comments
 (0)