Skip to content

Commit

Permalink
Grunnlag maks godkjent beløp (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
ugur93 authored Sep 10, 2024
1 parent 36fe788 commit 2dd6210
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ enum class Grunnlagstype {
// Særbidrag
SÆRBIDRAG_KATEGORI,
UTGIFT_DIREKTE_BETALT,
UTGIFT_MAKS_GODKJENT_BELØP,
UTGIFTSPOSTER,

SLUTTBEREGNING_FORSKUDD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ val List<BaseGrunnlag>.utgiftDirekteBetalt get() =
Grunnlagstype.UTGIFT_DIREKTE_BETALT,
).firstOrNull()?.innholdTilObjekt<UtgiftDirekteBetaltGrunnlag>()

val List<BaseGrunnlag>.utgiftMaksGodkjentBeløp get() =
filtrerBasertPåEgenReferanse(
Grunnlagstype.UTGIFT_MAKS_GODKJENT_BELØP,
).firstOrNull()?.innholdTilObjekt<UtgiftMaksGodkjentBeløpGrunnlag>()

val List<BaseGrunnlag>.utgiftsposter get() =
filtrerBasertPåEgenReferanse(
Grunnlagstype.UTGIFTSPOSTER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2dd6210

Please sign in to comment.