Skip to content

Commit

Permalink
Fix: begrens gradering tilkommet inntekt til 1
Browse files Browse the repository at this point in the history
  • Loading branch information
tendestad committed Aug 28, 2023
1 parent c5cb067 commit 0adf119
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ private BigDecimal andelBeholdtEtterGradertMotTilkommetInntekt(Beregningsgrunnla
var graderingMotTotal = bortfalt.divide(totaltGrunnlag, 10, RoundingMode.HALF_UP);
grunnlag.setInntektsgraderingFraBruttoBeregningsgrunnlag(graderingMotTotal.multiply(BigDecimal.valueOf(100)));

return bortfalt.divide(totaltGradertGrunnlag, 10, RoundingMode.HALF_UP);
BigDecimal andel = bortfalt.divide(totaltGradertGrunnlag, 10, RoundingMode.HALF_UP);
return andel.compareTo(BigDecimal.ONE) < 0 ? andel : BigDecimal.ONE;
}

private BigDecimal finnBortfaltInntekt(BeregningsgrunnlagPeriode grunnlag) {
Expand Down

0 comments on commit 0adf119

Please sign in to comment.