From b2444f3669247a26d26b9d07298edc573909b423 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Mon, 12 Jun 2023 17:28:11 +0200 Subject: [PATCH] BeWoWalzPaiva/SettlementReport2.cs --- ReportImp/BeWoWalzPaiva/SettlementReport2.cs | 100 +++++++++---------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/ReportImp/BeWoWalzPaiva/SettlementReport2.cs b/ReportImp/BeWoWalzPaiva/SettlementReport2.cs index 987f12ff9..864593ad9 100644 --- a/ReportImp/BeWoWalzPaiva/SettlementReport2.cs +++ b/ReportImp/BeWoWalzPaiva/SettlementReport2.cs @@ -1,43 +1,43 @@ -using System; -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Text.RegularExpressions; -using BeWo.Data.Access; -using BeWo.Data.Entities; -using BeWo.Report; -using BeWo.Report.ReportObjects; -using BS.Shared.DataContracts; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Report; +using BeWo.Report.ReportObjects; +using BS.Shared.DataContracts; using BS.Shared.Extensions; -namespace BeWoWalzPaiva -{ - public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport - { - public Spitzabrechnung() - { - InitializeComponent(); - } - - public void SetReportDataSource(Settlement2RO pRO) - { - bool hasRatefactor = false; - - if (String.IsNullOrEmpty(pRO.Notice)) - { - lblNotice.Visible = false; - } - - if (!String.IsNullOrWhiteSpace(pRO.RateFactorText2)) - { - hasRatefactor = true; - if (pRO.RateFactorText2 == "1,2") - { - pRO.RateFactorText2 = "1,20"; - } - } - - if (pRO.InvoiceItems != null) - { - foreach (var ii in pRO.InvoiceItems) +namespace BeWoWalzPaiva +{ + public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport + { + public Spitzabrechnung() + { + InitializeComponent(); + } + + public void SetReportDataSource(Settlement2RO pRO) + { + bool hasRatefactor = false; + + if (String.IsNullOrEmpty(pRO.Notice)) + { + lblNotice.Visible = false; + } + + if (!String.IsNullOrWhiteSpace(pRO.RateFactorText2)) + { + hasRatefactor = true; + if (pRO.RateFactorText2 == "1,2") + { + pRO.RateFactorText2 = "1,20"; + } + } + + if (pRO.InvoiceItems != null) + { + foreach (var ii in pRO.InvoiceItems) { if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0) { @@ -47,19 +47,19 @@ namespace BeWoWalzPaiva ii.DetailDescription = Regex.Replace(ii.DetailDescription, ii.ItemDescription, "Fehlkontakte"); } ii.ItemDescription = "Fehlkontakte"; - } + } else { - ii.DetailDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} FLS {3}x {4:c}", - ii.PeriodStartDate, ii.PeriodEndDate, - ii.UnitCount, !hasRatefactor ? "" : "x " + pRO.RateFactorText2 + " ", + ii.DetailDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} FLS {3}x {4:c}", + ii.PeriodStartDate, ii.PeriodEndDate, + ii.UnitCount, !hasRatefactor ? "" : "x " + pRO.RateFactorText2 + " ", ii.AmountPerUnit); - } - } - } - - this.bindingSource1.DataSource = pRO; - } - - } -} + } + } + } + + this.bindingSource1.DataSource = pRO; + } + + } +}