108 lines
5.0 KiB
C#
108 lines
5.0 KiB
C#
|
|
using System;
|
|||
|
|
using System.Drawing;
|
|||
|
|
using System.Collections;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using DevExpress.XtraReports.UI;
|
|||
|
|
using BeWo.Report.ReportObjects;
|
|||
|
|
using BeWo.Report;
|
|||
|
|
|
|||
|
|
namespace BeWo.WohnhelferRemscheidReports
|
|||
|
|
{
|
|||
|
|
public partial class SettlementReport2 : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
|
|||
|
|
{
|
|||
|
|
public SettlementReport2()
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void SetReportDataSource(Settlement2RO pRO)
|
|||
|
|
{
|
|||
|
|
if (String.IsNullOrEmpty(pRO.Notice))
|
|||
|
|
{
|
|||
|
|
lblNotice.Visible = false;
|
|||
|
|
}
|
|||
|
|
decimal rateFactor = 1;
|
|||
|
|
|
|||
|
|
foreach (var ii in pRO.InvoiceItems)
|
|||
|
|
{
|
|||
|
|
if (ii.RateFactor.HasValue)
|
|||
|
|
{
|
|||
|
|
rateFactor = (100 + ii.RateFactor.Value) / 100;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
pRO.RateFactor = (double)rateFactor;
|
|||
|
|
if (pRO.RateFactorText2 == "1,2")
|
|||
|
|
{
|
|||
|
|
pRO.RateFactorText2 = "1,20";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
foreach (var ii in pRO.InvoiceItems)
|
|||
|
|
{
|
|||
|
|
ii.DetailDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}", ii.PeriodStartDate, ii.PeriodEndDate);
|
|||
|
|
ii.DetailDescription += String.Format(": {0:0.##} FLS {1}x {2:c}", ii.UnitCount, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", ii.AmountPerUnit);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//if (pRO.DifferentHourlyRateCount == 3)
|
|||
|
|
//{
|
|||
|
|
// //Erbrachte Leistungen (FLS) - bis [HourlyRateOldEndDateString] <20> [HourlyRateOldString] <20>
|
|||
|
|
|
|||
|
|
// pRO.Abrechnungstext1 = String.Format("{0} bis {1}",
|
|||
|
|
// pRO.AccountingStartDateString, pRO.HourlyRate3EndDateString);
|
|||
|
|
|
|||
|
|
// pRO.Abrechnungstext1 += String.Format(": {0:0.##} FLS {1}x {2:c}",
|
|||
|
|
// pRO.GeleisteteFLSMitStundensatz3, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRate3);
|
|||
|
|
|
|||
|
|
// //[AccountingStartDateString] - [HourlyRate3EndDateString] sind [RecordedFLSWithHourlyRate3String] Std. x [HourlyRate3String] <20> =";
|
|||
|
|
|
|||
|
|
// pRO.Betrag1 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatz3 * (decimal)pRO.RateFactor * pRO.HourlyRate3);
|
|||
|
|
|
|||
|
|
|
|||
|
|
// pRO.Abrechnungstext2 = String.Format("{0} bis {1}",
|
|||
|
|
// pRO.HourlyRateOldStartDateString, pRO.HourlyRateOldEndDateString);
|
|||
|
|
// pRO.Abrechnungstext2 += String.Format(": {0:0.##} FLS {1}x {2:c}",
|
|||
|
|
// pRO.GeleisteteFLSMitStundensatzAlt, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRateOld);
|
|||
|
|
|
|||
|
|
// pRO.Betrag2 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatzAlt * (decimal)pRO.RateFactor * pRO.HourlyRateOld);
|
|||
|
|
|
|||
|
|
|
|||
|
|
// pRO.Abrechnungstext3 = String.Format("{0} bis {1}",
|
|||
|
|
// pRO.HourlyRateNewStartDateString, pRO.AccountingEndDateString);
|
|||
|
|
// pRO.Abrechnungstext3 += String.Format(": {0:0.##} FLS {1}x {2:c}",
|
|||
|
|
// pRO.GeleisteteFLSMitStundensatzAktuell, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRateNew);
|
|||
|
|
|
|||
|
|
// pRO.Betrag3 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatzAktuell * (decimal)pRO.RateFactor * pRO.HourlyRateNew);
|
|||
|
|
//}
|
|||
|
|
//else if (pRO.DifferentHourlyRateCount == 2)
|
|||
|
|
//{
|
|||
|
|
|
|||
|
|
// pRO.Abrechnungstext2 = String.Format("{0} bis {1}",
|
|||
|
|
// pRO.AccountingStartDateString, pRO.HourlyRateOldEndDateString);
|
|||
|
|
// pRO.Abrechnungstext2 += String.Format(": {0:0.##} FLS {1}x {2:c}",
|
|||
|
|
// pRO.GeleisteteFLSMitStundensatzAlt, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRateOld);
|
|||
|
|
|
|||
|
|
// pRO.Betrag2 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatzAlt * (decimal)pRO.RateFactor * pRO.HourlyRateOld);
|
|||
|
|
|
|||
|
|
|
|||
|
|
// pRO.Abrechnungstext3 = String.Format("{0} bis {1}",
|
|||
|
|
// pRO.HourlyRateNewStartDateString, pRO.AccountingEndDateString);
|
|||
|
|
// pRO.Abrechnungstext3 += String.Format(": {0:0.##} FLS {1}x {2:c}",
|
|||
|
|
// pRO.GeleisteteFLSMitStundensatzAktuell, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRateNew);
|
|||
|
|
|
|||
|
|
// pRO.Betrag3 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatzAktuell * (decimal)pRO.RateFactor * pRO.HourlyRateNew);
|
|||
|
|
//}
|
|||
|
|
//else
|
|||
|
|
//{
|
|||
|
|
// pRO.Abrechnungstext3 = String.Format("{0} bis {1}",
|
|||
|
|
// pRO.AccountingStartDateString, pRO.AccountingEndDateString);
|
|||
|
|
// pRO.Abrechnungstext3 += String.Format(": {0:0.##} FLS {1}x {2:c}",
|
|||
|
|
// pRO.GeleisteteFLSMitStundensatzAktuell, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRateNew);
|
|||
|
|
|
|||
|
|
// pRO.Betrag3 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatzAktuell * (decimal)pRO.RateFactor * pRO.HourlyRateNew);
|
|||
|
|
//}
|
|||
|
|
|
|||
|
|
|
|||
|
|
this.bindingSource1.DataSource = pRO;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|