Files
BeWoPlaner/ReportImp/KomMitBewo/SettlementReport2.cs

57 lines
1.5 KiB
C#
Raw Permalink Normal View History

2019-08-09 16:44:13 +02:00
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.DataContracts;
using DevExpress.XtraPrinting.Native;
namespace KommMit
{
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
{
public Spitzabrechnung()
{
InitializeComponent();
}
public void SetReportDataSource(Settlement2RO pRO)
{
2019-11-14 16:13:41 +01:00
pRO.ApprovedFLS = pRO.ApprovedFLS.Replace("FLS", "").Trim();
2019-08-09 16:44:13 +02:00
bool hasRatefactor = false;
if (!String.IsNullOrWhiteSpace(pRO.RateFactorText2))
{
hasRatefactor = true;
}
if (pRO.InvoiceItems != null)
{
foreach (var ii in pRO.InvoiceItems)
{
2023-04-26 17:00:03 +02:00
ii.ItemDescription = "Fachleistungsstunden";
ii.UnitDescription = String.Format("{0} {1:c}", !hasRatefactor ? "" : pRO.RateFactorText2 + "x ", ii.AmountPerUnit);
if (pRO.FehlkontakteString != null && ii.RateFactor == 0)
{
Zwischensumme.Visible = true;
ii.ItemDescription = "Fehlkontakte";
ii.UnitDescription = String.Format("{0:c}", ii.AmountPerUnit);
}
2019-08-09 16:44:13 +02:00
}
2023-04-26 17:00:03 +02:00
2019-08-09 16:44:13 +02:00
}
this.bindingSource1.DataSource = pRO;
}
}
}