Files
BeWoPlaner/ReportImp/WegeReports/SettlementReport2.cs

50 lines
1.2 KiB
C#
Raw Normal View History

2016-06-27 01:45:38 +02:00
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using System.Text.RegularExpressions;
2016-06-27 01:45:38 +02:00
namespace BeWo.WegeReports
{
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
{
public Spitzabrechnung()
{
InitializeComponent();
}
public void SetReportDataSource(Settlement2RO pRO)
{
if (String.IsNullOrEmpty(pRO.Notice))
{
lblNotice.Visible = false;
}
2016-06-27 01:45:38 +02:00
decimal rateFactor = 1;
foreach (var ii in pRO.InvoiceItems)
{
if (ii.RateFactor.HasValue)
{
rateFactor = (100 + ii.RateFactor.Value) / 100;
}
if (pRO.FehlkontakteString != null && ii.RateFactor == 0)
{
Zwischensumme.Visible = true;
if (ii.ItemDescription != null)
{
ii.DetailDescription = Regex.Replace(ii.DetailDescription, ii.ItemDescription, "Fehlkontakte");
}
ii.ItemDescription = "Fehlkontakte";
2016-06-27 01:45:38 +02:00
}
}
pRO.RateFactor = (double)rateFactor;
this.bindingSource1.DataSource = pRO;
2016-06-27 01:45:38 +02:00
}
}
}