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;
|
2023-04-21 13:59:00 +02:00
|
|
|
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)
|
|
|
|
|
{
|
2023-04-21 13:59:00 +02:00
|
|
|
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;
|
2023-04-21 13:59:00 +02:00
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
|
|
2023-04-21 13:59:00 +02:00
|
|
|
this.bindingSource1.DataSource = pRO;
|
2016-06-27 01:45:38 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|