Files
BeWoPlaner/ReportImp/Humanitas/ServiceInvoiceReport.cs

45 lines
1.6 KiB
C#
Raw Normal View History

2019-07-12 17:36:37 +02:00
using System;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using DevExpress.XtraReports.UI;
namespace Humanitas
{
public partial class ServiceInvoiceReport : XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public ServiceInvoiceReport()
{
this.InitializeComponent();
}
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
DateTime start = pRO.AccountingPeriodStart;
DateTime end = pRO.AccountingPeriodEnd;
if (start.Month == end.Month && start.Year == end.Year)
{
lblAbrechnungszeitraum.Text = String.Format("hiermit berechnen wir f<>r den Monat {0:MMMM yyyy} folgende erbrachte T<>tigkeiten:", start);
}
else
{
lblAbrechnungszeitraum.Text = String.Format("hiermit berechnen wir f<>r den Zeitraum {0:MMMM yyyy} - {1:MMMM yyyy} folgende erbrachte T<>tigkeiten:", start, end);
}
if (!String.IsNullOrWhiteSpace(pRO.RecipientOrganisation) &&
pRO.RecipientOrganisation.StartsWith("Landeshauptstadt D<>sseldorf - Jugendamt"))
{
lblAbrechnung.Text = String.Format("Rechnung f<>r ambulante Hilfen gem. <20> 41 SGB VIII i.V.m. <20> 35a (SGB VIII) (Eingliederungshilfe) f<>r {0} {1}, AZ.: {2}", pRO.CustomerSalutation, pRO.CustomerName, pRO.CustomerReferenceNumber);
foreach (var sip in pRO.ServiceInvoicePeriods)
{
foreach (var ii in sip.ServiceInvoiceItems)
{
ii.ServiceDescription = "ambulante Hilfen";
}
}
}
this.bindingSource1.DataSource = pRO;
}
}
}