DiakoniewerkEssen/Reporting - Druck von BeWo67 als Seite 2

This commit is contained in:
2026-04-01 11:56:12 +02:00
parent aaaaaa06ff
commit e63b93acdf
2 changed files with 101 additions and 18 deletions

View File

@@ -76,5 +76,85 @@ namespace DiakonieWerkEssen.Reporting
return masterReport ?? new XtraReport();
}
public override XtraReport CreateServiceInvoiceReportMitQb(long invoiceBaseOid)
{
var serviceInvoice = DAOFactory.SearchDAO.GetServiceInvoiceByInvoiceBaseOid(invoiceBaseOid);
var dc = MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(serviceInvoice);
String reportId = serviceInvoice.InvoiceBase.InvoiceId;
if (String.IsNullOrEmpty(reportId))
{
// Falls InvoiceId nicht existiert
// Gehe jede peroide von ServiceInvoice - ServiceInvoicePeriodList durch
foreach (var period in serviceInvoice.ServiceInvoicePeriodList)
{
if (String.IsNullOrEmpty(reportId) && period.SupportConceptApprovalPeriod != null)
{
// Falls periode - SupportConecptApprovalPeriod nicht leer ist, füge
reportId = period.SupportConceptApprovalPeriod.CostBearer2SupportConcept.CostBearer.ID;
if (String.IsNullOrEmpty(reportId) && period.SupportConceptApprovalPeriod.CostBearer2SupportConcept.CostBearer.IsSingleInvoicePerCustomer)
{
reportId = "Sammelrechnung";
}
}
foreach (var item in period.InvoiceItemList)
{
if (String.IsNullOrEmpty(reportId) && item.SupportConceptApprovalPeriodOid.HasValue)
{
var approvalPeriod =
DAOFactory.GenericDAO.LoadByID<SupportConceptApprovalPeriod>(item.SupportConceptApprovalPeriodOid.Value);
if (approvalPeriod.CostBearer2SupportConcept != null)
{
reportId = approvalPeriod.CostBearer2SupportConcept.CostBearer.ID;
if (String.IsNullOrEmpty(reportId) && approvalPeriod.CostBearer2SupportConcept.CostBearer.IsSingleInvoicePerCustomer)
{
reportId = "Sammelrechnung";
}
}
}
}
}
IBeWoReport<ServiceInvoiceRO> invoiceReport = FindReportImp<ServiceInvoiceRO>(reportId);
invoiceReport.SetReportDataSource(ServiceInvoiceRO.Create(dc));
((XtraReport)invoiceReport).CreateDocument();
var qb = CreateBelegeForInvoice(serviceInvoice.InvoiceBase);
AddReportPagesToMaster(invoiceReport as XtraReport, qb);
return invoiceReport as XtraReport;
}
else if (reportId == "BeWo67")
{
var ro = ServiceInvoiceRO.Create(dc);
var seite1 = new DiakonieWerkEssen.ServiceInvoiceReport();
seite1.SetReportDataSource(ro);
seite1.CreateDocument();
var seite2 = new RechnungBeWo67();
seite2.SetReportDataSource(ro);
seite2.CreateDocument();
seite1.Pages.AddRange(seite2.Pages);
var qb = CreateBelegeForInvoice(serviceInvoice.InvoiceBase);
AddReportPagesToMaster(seite1, qb);
return seite1;
}
else
{
IBeWoReport<ServiceInvoiceRO> invoiceReport = FindReportImp<ServiceInvoiceRO>(reportId);
invoiceReport.SetReportDataSource(ServiceInvoiceRO.Create(dc));
((XtraReport)invoiceReport).CreateDocument();
var qb = CreateBelegeForInvoice(serviceInvoice.InvoiceBase);
AddReportPagesToMaster(invoiceReport as XtraReport, qb);
return invoiceReport as XtraReport;
}
}
}
}

View File

@@ -45,6 +45,7 @@ namespace DiakonieWerkEssen
this.xrLabel22 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrLabel24 = new DevExpress.XtraReports.UI.XRLabel();
this.lblGP = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel();
@@ -92,7 +93,6 @@ namespace DiakonieWerkEssen
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.lblNotice = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel24 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
@@ -116,7 +116,6 @@ namespace DiakonieWerkEssen
//
// ruleRateFactorNull
//
this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?";
this.ruleRateFactorNull.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False;
this.ruleRateFactorNull.Name = "ruleRateFactorNull";
//
@@ -252,6 +251,21 @@ namespace DiakonieWerkEssen
this.Page1.Name = "Page1";
this.Page1.StylePriority.UseFont = false;
//
// xrLabel24
//
this.xrLabel24.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] {
new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[OrganisationDebitorNumber]")});
this.xrLabel24.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrLabel24.LocationFloat = new DevExpress.Utils.PointFloat(420.0415F, 170F);
this.xrLabel24.Name = "xrLabel24";
this.xrLabel24.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
this.xrLabel24.SizeF = new System.Drawing.SizeF(256.9583F, 23F);
this.xrLabel24.StylePriority.UseFont = false;
this.xrLabel24.StylePriority.UsePadding = false;
this.xrLabel24.StylePriority.UseTextAlignment = false;
this.xrLabel24.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrLabel24.TextFormatString = "Kostenträger: {0}";
//
// lblGP
//
this.lblGP.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] {
@@ -528,6 +542,8 @@ namespace DiakonieWerkEssen
// xrLabel14
//
this.xrLabel14.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
this.xrLabel14.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] {
new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[CustomerBirthdate]")});
this.xrLabel14.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(433.916F, 316.6798F);
@@ -536,6 +552,7 @@ namespace DiakonieWerkEssen
this.xrLabel14.SizeF = new System.Drawing.SizeF(183.0417F, 17F);
this.xrLabel14.StylePriority.UseBorders = false;
this.xrLabel14.StylePriority.UseFont = false;
this.xrLabel14.TextFormatString = "{0:dd.MM.yyyy}";
//
// xrLabel16
//
@@ -723,6 +740,7 @@ namespace DiakonieWerkEssen
this.xrTableCell45.StylePriority.UsePadding = false;
this.xrTableCell45.StylePriority.UseTextAlignment = false;
this.xrTableCell45.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell45.TextFormatString = "{0:0.00 €}";
this.xrTableCell45.Weight = 0.43442356433034046D;
//
// xrTableCell47
@@ -791,21 +809,6 @@ namespace DiakonieWerkEssen
this.lblNotice.Text = resources.GetString("lblNotice.Text");
this.lblNotice.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleJustify;
//
// xrLabel24
//
this.xrLabel24.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] {
new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[OrganisationDebitorNumber]")});
this.xrLabel24.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrLabel24.LocationFloat = new DevExpress.Utils.PointFloat(420.0415F, 170F);
this.xrLabel24.Name = "xrLabel24";
this.xrLabel24.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
this.xrLabel24.SizeF = new System.Drawing.SizeF(256.9583F, 23F);
this.xrLabel24.StylePriority.UseFont = false;
this.xrLabel24.StylePriority.UsePadding = false;
this.xrLabel24.StylePriority.UseTextAlignment = false;
this.xrLabel24.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrLabel24.TextFormatString = "Kostenträger: {0}";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
@@ -824,7 +827,7 @@ namespace DiakonieWerkEssen
this.Font = new DevExpress.Drawing.DXFont("Verdana", 10F);
this.Margins = new DevExpress.Drawing.DXMargins(74.99997F, 39F, 179.125F, 80.8671F);
this.PageHeight = 1169;
this.PageWidth = 826;
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
this.Version = "23.2";
xrWatermark1.Id = "Watermark1";