GKV - kaufmännisches Runden
This commit is contained in:
@@ -182,8 +182,8 @@ namespace Dakota.Models.Blocke
|
|||||||
|
|
||||||
private void CalculateSums()
|
private void CalculateSums()
|
||||||
{
|
{
|
||||||
var gesamtbrutto = BlockAbrechnungspositions.Sum(pos => pos.AnzahlEinheit * pos.EinzelbetragAbrechnungsposition);
|
var gesamtbrutto = BlockAbrechnungspositions.Sum(pos => Math.Round(pos.AnzahlEinheit * pos.EinzelbetragAbrechnungsposition, 2, MidpointRounding.AwayFromZero));
|
||||||
var gesamtproz = BlockAbrechnungspositions.Sum(pos => pos.AnzahlEinheit * pos.BetragZuzahlung);
|
var gesamtproz = BlockAbrechnungspositions.Sum(pos => Math.Round(pos.AnzahlEinheit * pos.BetragZuzahlung, 2, MidpointRounding.AwayFromZero));
|
||||||
var diff = gesamtbrutto - gesamtproz;
|
var diff = gesamtbrutto - gesamtproz;
|
||||||
var pauschaler = Math.Min(10, diff);
|
var pauschaler = Math.Min(10, diff);
|
||||||
var gesamtgesetz = gesamtproz + pauschaler;
|
var gesamtgesetz = gesamtproz + pauschaler;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Dakota.Models.Infos;
|
using Dakota.Models.Infos;
|
||||||
using Dakota.Models.Segmente;
|
using Dakota.Models.Segmente;
|
||||||
using Dakota.Models.Segmente.SLLA;
|
using Dakota.Models.Segmente.SLLA;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
@@ -138,7 +139,7 @@ namespace Dakota.Models.Blocke
|
|||||||
{
|
{
|
||||||
var gesamtbrutto = BlockEinsätze
|
var gesamtbrutto = BlockEinsätze
|
||||||
.SelectMany(e => e.Positionen)
|
.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);
|
SegmentSLLABES.GesamtbetragBrutto.SetValue(gesamtbrutto);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user