Skip to content

Commit 56a1127

Browse files
committed
NY: inntektsfilter "Skattepliktig godtgjørelse særavtale utland"
DAG-855
1 parent 6485acf commit 56a1127

File tree

6 files changed

+25
-5
lines changed

6 files changed

+25
-5
lines changed

dp-inntekt-api/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ buildscript {
1818
repositories {
1919
mavenCentral()
2020
maven("https://packages.confluent.io/maven/")
21+
maven("https://github-package-registry-mirror.gc.nav.no/cached/maven-release")
2122
}
2223

2324
application {
@@ -31,7 +32,8 @@ val expediaGraphqlVersion = "6.4.0"
3132
dependencies {
3233
implementation(project(":dp-inntekt-grpc"))
3334

34-
implementation(Dagpenger.Events)
35+
implementation("com.github.navikt:dagpenger-events:20230831.d11fdb")
36+
implementation("com.github.navikt:dagpenger-streams:20230831.f3d785")
3537

3638
implementation(Ktor2.Server.library("netty"))
3739
implementation(Ktor2.Server.library("auth"))
@@ -64,7 +66,6 @@ dependencies {
6466
implementation(Moshi.moshiAdapters)
6567
implementation(Moshi.moshiKotlin)
6668

67-
implementation(Dagpenger.Streams)
6869
implementation(Kafka.clients)
6970

7071
implementation(Kotlin.Logging.kotlinLogging)

dp-inntekt-api/src/main/kotlin/no/nav/dagpenger/inntekt/inntektskomponenten/v1/InntektkomponentResponse.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,4 +397,8 @@ enum class InntektBeskrivelse {
397397
@Json(name = "skattepliktigPersonalrabatt")
398398
@JsonProperty("skattepliktigPersonalrabatt")
399399
SKATTEPLIKTIG_PERSONALRABATT,
400+
401+
@Json(name = "skattepliktigGodtgjoerelseSaeravtaleUtland")
402+
@JsonProperty("skattepliktigGodtgjoerelseSaeravtaleUtland")
403+
SKATTEPLIKTIG_GODTGJOERELSE_SAERAVTALE_UTLAND,
400404
}

dp-inntekt-api/src/main/kotlin/no/nav/dagpenger/inntekt/klassifiserer/KlassifisertPostering.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ private fun isArbeidsInntekt(posteringsType: PosteringsType): Boolean {
9595
PosteringsType.L_ANNET_IKKE_SKATTEPLIKTIG,
9696
PosteringsType.L_ANNET_UTLANDET,
9797
PosteringsType.L_ANNET_KONKURS,
98-
PosteringsType.L_HONORAR_AKKORD_PROSENT_PROVISJON_H
99-
98+
PosteringsType.L_HONORAR_AKKORD_PROSENT_PROVISJON_H,
99+
PosteringsType.L_SKATTEPLIKTIG_GODTGJOERELSE_SAERAVTALE_UTLAND
100100
)
101101
return arbeidsPosteringsTyper.contains(posteringsType)
102102
}

dp-inntekt-api/src/main/kotlin/no/nav/dagpenger/inntekt/mapping/PosteringsTypeMapping.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ private val posteringsTypeMapping = biMapOf(
117117
PosteringsTypeGrunnlag(InntektType.LOENNSINNTEKT, InntektBeskrivelse.TREKK_I_LOENN_FOR_FERIE, SpesielleInntjeningsforhold.LOENN_VED_ARBEIDSMARKEDSTILTAK) to PosteringsType.L_TREKK_I_LØNN_FOR_FERIE_T,
118118
PosteringsTypeGrunnlag(InntektType.LOENNSINNTEKT, InntektBeskrivelse.TIPS, null) to PosteringsType.L_TIPS,
119119
PosteringsTypeGrunnlag(InntektType.LOENNSINNTEKT, InntektBeskrivelse.SKATTEPLIKTIG_PERSONALRABATT, null) to PosteringsType.L_SKATTEPLIKTIG_PERSONALRABATT,
120+
PosteringsTypeGrunnlag(InntektType.LOENNSINNTEKT, InntektBeskrivelse.SKATTEPLIKTIG_GODTGJOERELSE_SAERAVTALE_UTLAND, null) to PosteringsType.L_SKATTEPLIKTIG_GODTGJOERELSE_SAERAVTALE_UTLAND,
120121
PosteringsTypeGrunnlag(InntektType.LOENNSINNTEKT, InntektBeskrivelse.ANNET, SpesielleInntjeningsforhold.LOENN_OG_ANNEN_GODTGJOERELSE_SOM_IKKE_ER_SKATTEPLIKTIG) to PosteringsType.L_ANNET_IKKE_SKATTEPLIKTIG,
121122
PosteringsTypeGrunnlag(InntektType.LOENNSINNTEKT, InntektBeskrivelse.ANNET, SpesielleInntjeningsforhold.LOENN_UTBETALT_FRA_DEN_NORSKE_STAT_OPPTJENT_I_UTLANDET) to PosteringsType.L_ANNET_UTLANDET,
122123
PosteringsTypeGrunnlag(InntektType.LOENNSINNTEKT, InntektBeskrivelse.ANNET, SpesielleInntjeningsforhold.LOENN_VED_KONKURS_ELLER_STATSGARANTI_OSV) to PosteringsType.L_ANNET_KONKURS

dp-inntekt-api/src/test/kotlin/no/nav/dagpenger/inntekt/klassifiser/KlassifiserPosteringTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ internal class KlassifiserPosteringTest {
8282
PosteringsType.L_ANNET_IKKE_SKATTEPLIKTIG,
8383
PosteringsType.L_ANNET_UTLANDET,
8484
PosteringsType.L_ANNET_KONKURS,
85-
PosteringsType.L_HONORAR_AKKORD_PROSENT_PROVISJON_H
85+
PosteringsType.L_HONORAR_AKKORD_PROSENT_PROVISJON_H,
86+
PosteringsType.L_SKATTEPLIKTIG_GODTGJOERELSE_SAERAVTALE_UTLAND
8687
)
8788

8889
val spesifisertInntekt = createTestSpesifisertInntekt(arbeidsPosteringsTyper)

dp-inntekt-api/src/test/kotlin/no/nav/dagpenger/inntekt/mapping/PosteringsTypeMappingTest.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,19 @@ internal class PosteringsTypeMappingTest {
527527
assertEquals(posteringsTypeInfo, toPosteringsTypeGrunnlag(posteringsType))
528528
}
529529

530+
@Test
531+
fun `test posteringstype-mapping for Skattepliktig godtgjørelse særavtale utland"`() {
532+
val posteringsType = PosteringsType.L_SKATTEPLIKTIG_GODTGJOERELSE_SAERAVTALE_UTLAND
533+
val posteringsTypeInfo = PosteringsTypeGrunnlag(
534+
InntektType.LOENNSINNTEKT,
535+
InntektBeskrivelse.SKATTEPLIKTIG_GODTGJOERELSE_SAERAVTALE_UTLAND,
536+
null
537+
)
538+
539+
assertEquals(posteringsType, toPosteringsType(posteringsTypeInfo))
540+
assertEquals(posteringsTypeInfo, toPosteringsTypeGrunnlag(posteringsType))
541+
}
542+
530543
@Test
531544
fun `test posteringstype-mapping for Sluttvederlag`() {
532545
val posteringsType = PosteringsType.L_SLUTTVEDERLAG

0 commit comments

Comments
 (0)