-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TFP-5185: Fase 2 - automatisering av tilfeller hvor mors aktivitet er…
… godkjent og under 75% uten gradering og samtidig uttak.
- Loading branch information
1 parent
25d4417
commit 5268cb7
Showing
4 changed files
with
40 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...drepenger/regler/uttak/fastsetteperiode/UtbetalingsgradMorsStillingsprosentUtregning.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package no.nav.foreldrepenger.regler.uttak.fastsetteperiode; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.Objects; | ||
|
||
import no.nav.foreldrepenger.regler.uttak.fastsetteperiode.grunnlag.MorsStillingsprosent; | ||
import no.nav.foreldrepenger.regler.uttak.fastsetteperiode.grunnlag.SamtidigUttaksprosent; | ||
import no.nav.foreldrepenger.regler.uttak.fastsetteperiode.grunnlag.Utbetalingsgrad; | ||
|
||
class UtbetalingsgradMorsStillingsprosentUtregning implements UtbetalingsgradUtregning { | ||
|
||
private final MorsStillingsprosent morsStillingsprosent; | ||
private final SamtidigUttaksprosent annenpartSamtidigUttaksprosent; | ||
|
||
public UtbetalingsgradMorsStillingsprosentUtregning(MorsStillingsprosent morsStillingsprosent, | ||
SamtidigUttaksprosent annenpartSamtidigUttaksprosent) { | ||
Objects.requireNonNull(annenpartSamtidigUttaksprosent); | ||
this.morsStillingsprosent = morsStillingsprosent; | ||
this.annenpartSamtidigUttaksprosent = annenpartSamtidigUttaksprosent; | ||
} | ||
|
||
@Override | ||
public Utbetalingsgrad resultat() { | ||
var samtidigUttakPgaMor = BigDecimal.valueOf(100).subtract(annenpartSamtidigUttaksprosent.decimalValue()); | ||
return new Utbetalingsgrad(samtidigUttakPgaMor.min(morsStillingsprosent.decimalValue())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters