71 lines
3.0 KiB
C#
71 lines
3.0 KiB
C#
using System;
|
|
using System.Text;
|
|
using BeWo.Report;
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
namespace VereinZurIntegrationChemnitz
|
|
{
|
|
public partial class RechnungEigenanteil : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<InvoiceCustomerRO>
|
|
{
|
|
public RechnungEigenanteil()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(InvoiceCustomerRO pRO)
|
|
{
|
|
StringBuilder sb = new StringBuilder();
|
|
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && !String.IsNullOrEmpty(pRO.RecipientOrganisation.Trim()))
|
|
{
|
|
sb.AppendLine(pRO.RecipientOrganisation);
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientDivision.Trim()))
|
|
{
|
|
sb.AppendLine(pRO.RecipientDivision);
|
|
}
|
|
if ((!String.IsNullOrEmpty(pRO.RecipientFirstName) && !String.IsNullOrEmpty(pRO.RecipientFirstName.Trim()))
|
|
|| (!String.IsNullOrEmpty(pRO.RecipientLastName) && !String.IsNullOrEmpty(pRO.RecipientLastName.Trim())))
|
|
{
|
|
sb.AppendLine(String.Format("{0} {1}", pRO.RecipientFirstName, pRO.RecipientLastName).Trim());
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientStreet) && !String.IsNullOrEmpty(pRO.RecipientStreet.Trim()))
|
|
{
|
|
sb.AppendLine(pRO.RecipientStreet);
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientPostCode) && !String.IsNullOrEmpty(pRO.RecipientPostCode.Trim()))
|
|
{
|
|
sb.Append(pRO.RecipientPostCode);
|
|
sb.Append(" ");
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientTown) && !String.IsNullOrEmpty(pRO.RecipientTown.Trim()))
|
|
{
|
|
sb.Append(pRO.RecipientTown);
|
|
}
|
|
lblAddress.Text = sb.ToString();
|
|
|
|
if (pRO.RecipientSalutation == "Sehr geehrte Damen und Herren,")
|
|
pRO.RecipientSalutation = "Guten Tag,";
|
|
|
|
|
|
if (pRO.InvoiceBase.Type == BS.Shared.InvoiceType.CustomerEquity)
|
|
{
|
|
var abrechnungstext1 = string.Format("mit einem Schreiben vom Kommunalen Sozialverband Sachsen wurden wir in Kenntnis gesetzt, dass " +
|
|
"für den Zeitraum vom {0} die Leistungen der Sozialen Teilhabe für das Leistungsangebot \"weitere besondere Wohnform\" bewilligt sind. \n\n" +
|
|
"Für den o.g. Zeitraum ist durch Sie ein Eigenbetrag zu den Fachleistungen der Eingliederungshilfe in Höhe von {1} monatlich an " +
|
|
"uns zu zahlen.\n\nFür die Monat {2:MMMM} bis {3:MMMM yyyy} stellen wir Ihnen hiermit eine Rechnung von ",
|
|
pRO.Notice, pRO.InvoiceItems[0].UnitPrice, pRO.AccountingPeriodStart, pRO.AccountingPeriodEnd);
|
|
|
|
var abrechnungstext2 = string.Format("Ab {0:MMMM yyyy} bitten wir Sie, den Eigenbetrag in Höhe von {1} bis Ende des Leistungszeitraums " +
|
|
"selbstständig monatlich an die oben genannte Kontoverbindung zu überweisen.\n\nDieses Schreiben gilt gleichzeitig als Nachweis " +
|
|
"zur Vorlage beim Finanzamt.", pRO.AccountingPeriodEnd.Value.AddMonths(1), pRO.InvoiceItems[0].UnitPrice);
|
|
|
|
lblAbrechnungstext1.Text = abrechnungstext1;
|
|
lblAbrechnungstext2.Text = abrechnungstext2;
|
|
}
|
|
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
}
|