106 lines
4.6 KiB
C#
106 lines
4.6 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using BeWo.Report;
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
using DevExpress.XtraReports.UI;
|
|
|
|
namespace AsSozialeDienstleistungenEV
|
|
{
|
|
public partial class ServiceInvoiceReport : XtraReport, IBeWoReport<ServiceInvoiceRO>
|
|
{
|
|
public ServiceInvoiceReport()
|
|
{
|
|
this.InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
|
{
|
|
SetzeAdresse(pRO);
|
|
|
|
// Standard für BeWo ist unverändert - hier werden nur andere Fälle geprüft
|
|
// Unterschiedliche Label je nach Leistungskategorie bzw. für AOK
|
|
if (pRO.RecipientOrganisation.Contains("AOK")) //Krankenkassen
|
|
{
|
|
lblIkNr.Visible = true;
|
|
lblUstg.Visible = true;
|
|
lblBetreff.Text = "Abrechnung pflegerische Betreuungsmaßnahme";
|
|
lblAz.Text = lblAz.Text.Replace("AZ", "KV.Nr.:");
|
|
}
|
|
else if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0)
|
|
{
|
|
foreach (var p in pRO.ServiceInvoicePeriods)
|
|
{
|
|
if (p.ServiceInvoiceItems != null && p.ServiceInvoiceItems.Count > 0)
|
|
{
|
|
if (p.ServiceInvoiceItems.Any(i => i.ServiceDescription.Contains("Vormund")))
|
|
{
|
|
lblBetreff.Text = "Abrechnung Vormundschaften";
|
|
lblAnlage.Text = "Anlage: Nachweis";
|
|
}
|
|
else if (p.ServiceInvoiceItems.Any(i => i.ServiceDescription.Contains("Haushaltsnahe")))
|
|
{
|
|
lblBetreff.Text = "Abrechnung Haushaltsnahe Dienstleistungen - Abrechnung nach § 45";
|
|
}
|
|
else if (p.ServiceInvoiceItems.Any(i => i.ServiceDescription.Contains("Familienhilfe") || i.ServiceDescription.Contains("Erziehungsbeistand")))
|
|
{
|
|
lblBetreff.Text = "Abrechnung Erziehungsbeistandsschaft";
|
|
}
|
|
else if (p.ServiceInvoiceItems.Any(i => i.ServiceDescription.Contains("Umgangspflegschaften")))
|
|
{
|
|
lblBetreff.Text = "Abrechnung für Umgangspflegschaften";
|
|
}
|
|
else if (p.ServiceInvoiceItems.Any(i => i.ServiceDescription.Contains("ambulante Eingliederungshilfe")))
|
|
{
|
|
lblBetreff.Text = "Abrechnung für ambulante Eingliederungshilfe";
|
|
}
|
|
else if (p.ServiceInvoiceItems.Any(i => i.ServiceDescription.Contains("Sonstiges")))
|
|
{
|
|
lblBetreff.Text = "Hilfe für junge Volljährige in Form von ambulanter Eingliederungshilfe gem. § 41 i.V.m. § 35a Abs.2 Nr. 1 SGB VIII";
|
|
}
|
|
else if (pRO.RecipientOrganisation.Contains("Weiden")) // spezielles Jugendamt
|
|
{
|
|
lblBetreff.Text = "Abrechnung Ambulante Hilfen";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
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();
|
|
}
|
|
}
|
|
} |