MH: BetreutesWohnenWoellReports RateFaktor Spitzabrechnung

This commit is contained in:
2024-09-19 14:12:59 +02:00
parent 22487c35bd
commit ab8b36bcb1
2 changed files with 28 additions and 7 deletions

View File

@@ -0,0 +1 @@
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@@ -6,6 +6,7 @@ using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using BS.Shared.Extensions;
using System.Linq;
namespace BeWo.BetreutesWohnenWoellReports
{
@@ -21,13 +22,32 @@ namespace BeWo.BetreutesWohnenWoellReports
decimal rateFactor = 1;
bool assistenzRechnung = false;
foreach (var ii in pRO.InvoiceItems)
if (pRO.InvoiceItems.Any(ii => ii.RateFactor.HasValue))
{
if (ii.RateFactor.HasValue)
if (pRO.InvoiceItems.Any(ii => ii.RateFactor.Value == 20))
{
rateFactor = (100 + ii.RateFactor.Value) / 100;
rateFactor = 1.2m;
pRO.RateFactorText2 = String.Format("{0:0.00}", rateFactor);
}
else if (pRO.InvoiceItems.Any(ii => ii.RateFactor.Value == 0))
{
rateFactor = 1m;
pRO.RateFactorText2 = String.Format("{0:0.00}", rateFactor);
}
}
else
{
rateFactor = 1m;
pRO.RateFactorText2 = String.Format("{0:0.00}", rateFactor);
}
foreach (var ii in pRO.InvoiceItems)
{
//if (ii.RateFactor.HasValue)
//{
// rateFactor = (100 + ii.RateFactor.Value) / 100;
// pRO.RateFactorText2 = String.Format("{0:0.00}", rateFactor);
//}
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
{