GKV - kaufmännisches Runden

This commit is contained in:
2026-07-31 12:17:57 +02:00
parent a9bbd22a52
commit 289d276415
2 changed files with 4 additions and 3 deletions

View File

@@ -182,8 +182,8 @@ namespace Dakota.Models.Blocke
private void CalculateSums()
{
var gesamtbrutto = BlockAbrechnungspositions.Sum(pos => pos.AnzahlEinheit * pos.EinzelbetragAbrechnungsposition);
var gesamtproz = BlockAbrechnungspositions.Sum(pos => pos.AnzahlEinheit * pos.BetragZuzahlung);
var gesamtbrutto = BlockAbrechnungspositions.Sum(pos => Math.Round(pos.AnzahlEinheit * pos.EinzelbetragAbrechnungsposition, 2, MidpointRounding.AwayFromZero));
var gesamtproz = BlockAbrechnungspositions.Sum(pos => Math.Round(pos.AnzahlEinheit * pos.BetragZuzahlung, 2, MidpointRounding.AwayFromZero));
var diff = gesamtbrutto - gesamtproz;
var pauschaler = Math.Min(10, diff);
var gesamtgesetz = gesamtproz + pauschaler;

View File

@@ -1,6 +1,7 @@
using Dakota.Models.Infos;
using Dakota.Models.Segmente;
using Dakota.Models.Segmente.SLLA;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -138,7 +139,7 @@ namespace Dakota.Models.Blocke
{
var gesamtbrutto = BlockEinsätze
.SelectMany(e => e.Positionen)
.Sum(p => p.AnzahlEinheit * p.EinzelbetragAbrechnungsposition);
.Sum(p => Math.Round(p.AnzahlEinheit * p.EinzelbetragAbrechnungsposition, 2, MidpointRounding.AwayFromZero));
SegmentSLLABES.GesamtbetragBrutto.SetValue(gesamtbrutto);
}