51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
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;
|
|
|
|
namespace BeWoGuen
|
|
{
|
|
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
|
|
{
|
|
public Spitzabrechnung()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(Settlement2RO pRO)
|
|
{
|
|
bool isDefaultSpitzabrechnung = false;
|
|
|
|
bool hasRatefactor = 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)
|
|
{
|
|
ii.ItemDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} FLS {3}x {4:c}",
|
|
ii.PeriodStartDate, ii.PeriodEndDate,
|
|
ii.UnitCount, ii.RateFactor == 0 ? "" : "x " + pRO.RateFactorText2 + " ",
|
|
ii.AmountPerUnit);
|
|
}
|
|
}
|
|
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
}
|
|
}
|