61 lines
2.0 KiB
C#
61 lines
2.0 KiB
C#
using System;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
using BS.Shared.Core;
|
|
|
|
namespace CaritasUnna.Neu
|
|
{
|
|
[IDSpecificClass(Identifier = "LWLWohnungslosenhilfe")]
|
|
public partial class SpitzabrechnungWLH2 : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
|
|
{
|
|
public SpitzabrechnungWLH2()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(Settlement2RO pRO)
|
|
{
|
|
var nettoGesamt = 0m;
|
|
foreach (var item in pRO.InvoiceItems)
|
|
{
|
|
nettoGesamt += item.AmountTotal.Value;
|
|
}
|
|
cellZwischensumme.Text = String.Format("{0:c}", nettoGesamt);
|
|
cellFahrtzeiten.Text = String.Format("{0:c}", nettoGesamt / 100 * 20);
|
|
cellAusfallzeiten.Text = String.Format("{0:c}", nettoGesamt / 100 * 5);
|
|
|
|
ortDatum.Text = string.Format("Unna, {0}", DateTime.Now.ToShortDateString());
|
|
|
|
//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, !hasRatefactor ? "" : "x " + pRO.RateFactorText2 + " ",
|
|
// // ii.AmountPerUnit);
|
|
|
|
// if (ii.RateFactor.HasValue)
|
|
// {
|
|
// ii.UnitCount *= (ii.RateFactor.Value + 100) / 100;
|
|
// }
|
|
// }
|
|
//}
|
|
|
|
//ortDatum.Text = string.Format("Unna, {0}", DateTime.Now.ToShortDateString());
|
|
|
|
|
|
bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
}
|