Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ny grunnlagstype DELBEREGNING_BOFORHOLD #298

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import no.nav.bidrag.transport.behandling.felles.grunnlag.BostatusPeriode
import no.nav.bidrag.transport.behandling.felles.grunnlag.DelberegningBarnIHusstand
import no.nav.bidrag.transport.behandling.felles.grunnlag.DelberegningBidragsevne
import no.nav.bidrag.transport.behandling.felles.grunnlag.DelberegningBidragspliktigesAndel
import no.nav.bidrag.transport.behandling.felles.grunnlag.DelberegningBoforhold
import no.nav.bidrag.transport.behandling.felles.grunnlag.DelberegningSumInntekt
import no.nav.bidrag.transport.behandling.felles.grunnlag.DelberegningUtgift
import no.nav.bidrag.transport.behandling.felles.grunnlag.DelberegningVoksneIHustand
Expand Down Expand Up @@ -492,6 +493,11 @@ fun Grunnlagsreferanse.toTree(
"Delberegning voksne i husstand(${voksneIHusstand.periode.fom.toCompactString()})"
}

Grunnlagstype.DELBEREGNING_BOFORHOLD -> {
val voksneIHusstand = grunnlag.innholdTilObjekt<DelberegningBoforhold>()
"Delberegning voksne i husstand(${voksneIHusstand.periode.fom.toCompactString()})"
}

else ->
if (grunnlag.erPerson()) {
"${grunnlag.type}(${grunnlag.innholdTilObjekt<Person>().fødselsdato.toCompactString()})"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ enum class Grunnlagstype {
DELBEREGNING_TILLEGGSSTØNAD,
DELBEREGNING_NETTO_TILSYNSUTGIFT,

DELBEREGNING_BOFORHOLD,

@Deprecated(
"Bruk DELBEREGNING_BIDRAGSPLIKTIGES_ANDEL i stedet",
replaceWith = ReplaceWith("DELBEREGNING_BIDRAGSPLIKTIGES_ANDEL"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ data class DelberegningVoksneIHustand(
val borMedAndreVoksne: Boolean,
) : Delberegning

data class DelberegningBoforhold(
override val periode: ÅrMånedsperiode,
val antallBarn: Double,
val borMedAndreVoksne: Boolean,
) : Delberegning

data class DelberegningBidragspliktigesAndel(
override val periode: ÅrMånedsperiode,
@JsonAlias("andelFaktor", "andelProsent")
Expand Down
Loading