From 2dd6210312ba538e02b93832cef5ba23c84b1527 Mon Sep 17 00:00:00 2001 From: Ugur Alpay Cenar Date: Tue, 10 Sep 2024 15:22:08 +0200 Subject: [PATCH] =?UTF-8?q?Grunnlag=20maks=20godkjent=20bel=C3=B8p=20(#234?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nav/bidrag/domene/enums/grunnlag/Grunnlagstype.kt | 1 + .../behandling/felles/grunnlag/GrunnlagExtensions.kt | 5 +++++ .../behandling/felles/grunnlag/S\303\246rbidrag.kt" | 11 +++++++++++ 3 files changed, 17 insertions(+) diff --git a/bidrag-domene/src/main/kotlin/no/nav/bidrag/domene/enums/grunnlag/Grunnlagstype.kt b/bidrag-domene/src/main/kotlin/no/nav/bidrag/domene/enums/grunnlag/Grunnlagstype.kt index 0d9b4c6..17e6658 100644 --- a/bidrag-domene/src/main/kotlin/no/nav/bidrag/domene/enums/grunnlag/Grunnlagstype.kt +++ b/bidrag-domene/src/main/kotlin/no/nav/bidrag/domene/enums/grunnlag/Grunnlagstype.kt @@ -52,6 +52,7 @@ enum class Grunnlagstype { // Særbidrag SÆRBIDRAG_KATEGORI, UTGIFT_DIREKTE_BETALT, + UTGIFT_MAKS_GODKJENT_BELØP, UTGIFTSPOSTER, SLUTTBEREGNING_FORSKUDD, diff --git a/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/felles/grunnlag/GrunnlagExtensions.kt b/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/felles/grunnlag/GrunnlagExtensions.kt index 4ac0c18..b8d5432 100644 --- a/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/felles/grunnlag/GrunnlagExtensions.kt +++ b/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/felles/grunnlag/GrunnlagExtensions.kt @@ -162,6 +162,11 @@ val List.utgiftDirekteBetalt get() = Grunnlagstype.UTGIFT_DIREKTE_BETALT, ).firstOrNull()?.innholdTilObjekt() +val List.utgiftMaksGodkjentBeløp get() = + filtrerBasertPåEgenReferanse( + Grunnlagstype.UTGIFT_MAKS_GODKJENT_BELØP, + ).firstOrNull()?.innholdTilObjekt() + val List.utgiftsposter get() = filtrerBasertPåEgenReferanse( Grunnlagstype.UTGIFTSPOSTER, diff --git "a/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/felles/grunnlag/S\303\246rbidrag.kt" "b/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/felles/grunnlag/S\303\246rbidrag.kt" index a5a732c..5980aa0 100644 --- "a/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/felles/grunnlag/S\303\246rbidrag.kt" +++ "b/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/felles/grunnlag/S\303\246rbidrag.kt" @@ -37,3 +37,14 @@ data class UtgiftDirekteBetaltGrunnlag( @Schema(description = "Beløp som er overført direkte til BM. Kan være 0 eller høyere") val beløpDirekteBetalt: BigDecimal, ) : GrunnlagInnhold + +data class UtgiftMaksGodkjentBeløpGrunnlag( + @Schema( + description = + "Maks godkjent beløp som settes manuelt og som legger på maksimalgrense for godkjent beløp." + + " Kan være lik eller lavere enn total godkjent beløp", + ) + val beløp: BigDecimal, + @Schema(description = "Begrunnelse på hvorfor maks godkjent beløp er satt") + val kommentar: String, +) : GrunnlagInnhold