39 lines
1.4 KiB
C#
39 lines
1.4 KiB
C#
using System;
|
|
using BeWo.Report;
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
using DevExpress.XtraReports.UI;
|
|
|
|
namespace AutismusLeben
|
|
{
|
|
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 (pRO.InvoiceNumber.Length > 2)
|
|
pRO.InvoiceNumber = String.Format("3{0:MM}{0:yy}0{1}", end, pRO.InvoiceNumber);
|
|
else
|
|
pRO.InvoiceNumber = String.Format("3{0:MM}{0:yy}00{1}", end, pRO.InvoiceNumber);
|
|
|
|
lblSchlusssatz.Text = string.Format("Zahlbar bis {0:dd.MM.yyyy} ohne Abzug.\nUmsatzsteuerfrei gemäß §4 Nr. 18 UStG.", pRO.InvoiceDateTime.Value.AddDays(14));
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
} |