2024-08-07 15:19:25 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using BeWo.Report;
|
|
|
|
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
|
|
|
|
|
|
|
|
using DevExpress.XtraReports.UI;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ZukunftLeben
|
|
|
|
|
|
{
|
|
|
|
|
|
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);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-27 09:23:49 +02:00
|
|
|
|
foreach (var sip in pRO.ServiceInvoicePeriods)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in sip.ServiceInvoiceItems)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (item.ServiceDescription != "Fehlkontakt")
|
|
|
|
|
|
{
|
|
|
|
|
|
item.ServiceDescription = "Fachleistungsstunde";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-21 15:28:21 +02:00
|
|
|
|
SetzeAdresse(pRO);
|
|
|
|
|
|
|
2025-10-10 09:54:43 +02:00
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && pRO.RecipientOrganisation.ToLower() != "selbstzahler")
|
|
|
|
|
|
lblSteuerbefreiung.Visible = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (String.IsNullOrEmpty(pRO.Notice))
|
|
|
|
|
|
lblBemerkung.Visible = false;
|
|
|
|
|
|
|
2024-08-07 15:19:25 +02:00
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void SetzeAdresse(ServiceInvoiceRO pRO)
|
|
|
|
|
|
{
|
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && pRO.RecipientOrganisation.ToLower() != "selbstzahler")
|
|
|
|
|
|
{
|
|
|
|
|
|
sb.AppendLine(pRO.RecipientOrganisation);
|
|
|
|
|
|
}
|
|
|
|
|
|
//if (!String.IsNullOrEmpty(pRO.RecipientAddressLine1))
|
|
|
|
|
|
//{
|
|
|
|
|
|
// sb.AppendLine(pRO.RecipientAddressLine1);
|
|
|
|
|
|
//}
|
|
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
|
|
|
|
|
|
{
|
|
|
|
|
|
sb.AppendLine(pRO.RecipientContactPerson);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientOrganisation) && pRO.RecipientOrganisation.ToLower() != "selbstzahler")
|
|
|
|
|
|
{
|
|
|
|
|
|
sb.AppendLine(pRO.RecipientDivision);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
|
|
|
|
|
|
{
|
|
|
|
|
|
sb.AppendLine(pRO.RecipientPoBox);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
|
|
|
|
|
{
|
|
|
|
|
|
sb.AppendLine(pRO.RecipientStreet);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
|
|
|
|
|
|
{
|
|
|
|
|
|
sb.AppendLine(pRO.RecipientPostCodeAndTown);
|
|
|
|
|
|
}
|
|
|
|
|
|
lblAdresse.Text = sb.ToString();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|