BetreuWoReports: Auf Spitzabrechnung UA und QA (FLS) unterscheiden, Fehlkontakt-Support

This commit is contained in:
2024-09-17 10:36:34 +02:00
parent 2f52fa156c
commit 84b1a8bb17
2 changed files with 192 additions and 30 deletions

View File

@@ -31,6 +31,7 @@ namespace BeWo.Report.DefaultReports
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Spitzabrechnung));
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
@@ -40,7 +41,7 @@ namespace BeWo.Report.DefaultReports
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.lblHeader = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.RecipientPostCodeAndTown = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel_RecipientStreet = new DevExpress.XtraReports.UI.XRLabel();
@@ -102,12 +103,21 @@ namespace BeWo.Report.DefaultReports
this.xrTableRow37 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell59 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell60 = new DevExpress.XtraReports.UI.XRTableCell();
this.Zwischensumme = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable6 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow12 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow10 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.GroupHeader2 = new DevExpress.XtraReports.UI.GroupHeaderBand();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -132,7 +142,7 @@ namespace BeWo.Report.DefaultReports
// xrTable1
//
this.xrTable1.BorderColor = System.Drawing.SystemColors.ControlLight;
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 397.6615F);
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 386.6615F);
this.xrTable1.Name = "xrTable1";
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.rowErbrachteLeistung});
@@ -173,7 +183,7 @@ namespace BeWo.Report.DefaultReports
this.xrLabel6.Multiline = true;
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(642F, 67F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(650F, 57.625F);
this.xrLabel6.StylePriority.UseBackColor = false;
this.xrLabel6.StylePriority.UseFont = false;
this.xrLabel6.Text = resources.GetString("xrLabel6.Text");
@@ -203,21 +213,21 @@ namespace BeWo.Report.DefaultReports
this.xrLabel4.Text = "[CustomerReferenceNumberAndDate]";
this.xrLabel4.WordWrap = false;
//
// xrLabel3
// lblHeader
//
this.xrLabel3.BackColor = System.Drawing.Color.Transparent;
this.xrLabel3.CanShrink = true;
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
this.lblHeader.BackColor = System.Drawing.Color.Transparent;
this.lblHeader.CanShrink = true;
this.lblHeader.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 238.9583F);
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(650F, 16F);
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.Text = "Abrechnung Betreuungsleistungen für [Salutation2] [CustomerFirstName] [CustomerLa" +
this.lblHeader.LocationFloat = new DevExpress.Utils.PointFloat(0F, 238.9583F);
this.lblHeader.Name = "lblHeader";
this.lblHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblHeader.SizeF = new System.Drawing.SizeF(650F, 16F);
this.lblHeader.StylePriority.UseBackColor = false;
this.lblHeader.StylePriority.UseFont = false;
this.lblHeader.Text = "Abrechnung Betreuungsleistungen für [Salutation2] [CustomerFirstName] [CustomerLa" +
"stName]";
this.xrLabel3.WordWrap = false;
this.lblHeader.WordWrap = false;
//
// xrLabel2
//
@@ -513,14 +523,14 @@ namespace BeWo.Report.DefaultReports
this.xrLabel_RecipientStreet,
this.RecipientPostCodeAndTown,
this.xrLabel2,
this.xrLabel3,
this.lblHeader,
this.xrLabel4,
this.xrLabel5,
this.xrLabel6,
this.xrTable1,
this.xrLabel8});
this.GroupHeader1.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.GroupHeader1.HeightF = 414.6615F;
this.GroupHeader1.HeightF = 403.6615F;
this.GroupHeader1.Name = "GroupHeader1";
this.GroupHeader1.StylePriority.UseFont = false;
//
@@ -556,7 +566,9 @@ namespace BeWo.Report.DefaultReports
// DetailReport
//
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail1});
this.Detail1,
this.Zwischensumme,
this.GroupHeader2});
this.DetailReport.DataMember = "InvoiceItems";
this.DetailReport.DataSource = this.bindingSource1;
this.DetailReport.Level = 0;
@@ -569,6 +581,8 @@ namespace BeWo.Report.DefaultReports
this.Detail1.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.Detail1.HeightF = 17F;
this.Detail1.Name = "Detail1";
this.Detail1.SortFields.AddRange(new DevExpress.XtraReports.UI.GroupField[] {
new DevExpress.XtraReports.UI.GroupField("PeriodStartDate", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending)});
this.Detail1.StylePriority.UseFont = false;
//
// xrTable4
@@ -594,7 +608,7 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell52.BorderColor = System.Drawing.SystemColors.ControlLight;
this.xrTableCell52.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell52.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceItems.DetailDescription")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceItems.AbrechnungsText")});
this.xrTableCell52.Name = "xrTableCell52";
this.xrTableCell52.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell52.StylePriority.UseBorderColor = false;
@@ -629,7 +643,7 @@ namespace BeWo.Report.DefaultReports
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable5});
this.GroupFooter1.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.GroupFooter1.HeightF = 132F;
this.GroupFooter1.HeightF = 126F;
this.GroupFooter1.Name = "GroupFooter1";
this.GroupFooter1.StylePriority.UseFont = false;
//
@@ -646,7 +660,7 @@ namespace BeWo.Report.DefaultReports
this.xrTableRow35,
this.xrTableRow36,
this.xrTableRow37});
this.xrTable5.SizeF = new System.Drawing.SizeF(650F, 132F);
this.xrTable5.SizeF = new System.Drawing.SizeF(650F, 126F);
this.xrTable5.StylePriority.UseBorderColor = false;
//
// xrTableRow30
@@ -811,7 +825,7 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell59,
this.xrTableCell60});
this.xrTableRow37.Name = "xrTableRow37";
this.xrTableRow37.Weight = 0.15D;
this.xrTableRow37.Weight = 0.12D;
//
// xrTableCell59
//
@@ -842,6 +856,98 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell60.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell60.Weight = 0.21685899000901443D;
//
// Zwischensumme
//
this.Zwischensumme.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable6});
this.Zwischensumme.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.Zwischensumme.HeightF = 26F;
this.Zwischensumme.Name = "Zwischensumme";
this.Zwischensumme.StylePriority.UseFont = false;
this.Zwischensumme.Visible = false;
//
// xrTable6
//
this.xrTable6.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable6.Name = "xrTable6";
this.xrTable6.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow12,
this.xrTableRow10});
this.xrTable6.SizeF = new System.Drawing.SizeF(650F, 26F);
this.xrTable6.StylePriority.UseFont = false;
//
// xrTableRow12
//
this.xrTableRow12.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell1,
this.xrTableCell10});
this.xrTableRow12.Name = "xrTableRow12";
this.xrTableRow12.Weight = 0.40476190476190466D;
//
// xrTableCell1
//
this.xrTableCell1.BorderColor = System.Drawing.SystemColors.ControlLight;
this.xrTableCell1.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell1.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell1.StylePriority.UseBorderColor = false;
this.xrTableCell1.StylePriority.UseBorders = false;
this.xrTableCell1.StylePriority.UseFont = false;
this.xrTableCell1.StylePriority.UsePadding = false;
this.xrTableCell1.Text = "Zwischensumme [ItemDescription]:";
this.xrTableCell1.Weight = 2.3494227482722359D;
//
// xrTableCell10
//
this.xrTableCell10.BorderColor = System.Drawing.SystemColors.ControlLight;
this.xrTableCell10.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceItems.GrossAmountTotal")});
this.xrTableCell10.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell10.StylePriority.UseBorderColor = false;
this.xrTableCell10.StylePriority.UseBorders = false;
this.xrTableCell10.StylePriority.UseFont = false;
this.xrTableCell10.StylePriority.UsePadding = false;
this.xrTableCell10.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0:c}";
xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
this.xrTableCell10.Summary = xrSummary1;
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell10.Weight = 0.65057725172776437D;
//
// xrTableRow10
//
this.xrTableRow10.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell7});
this.xrTableRow10.Name = "xrTableRow10";
this.xrTableRow10.Weight = 0.21428571428571425D;
//
// xrTableCell7
//
this.xrTableCell7.BorderColor = System.Drawing.SystemColors.ControlLight;
this.xrTableCell7.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell7.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell7.StylePriority.UseBorderColor = false;
this.xrTableCell7.StylePriority.UseBorders = false;
this.xrTableCell7.StylePriority.UseFont = false;
this.xrTableCell7.StylePriority.UsePadding = false;
this.xrTableCell7.Weight = 3D;
//
// GroupHeader2
//
this.GroupHeader2.GroupFields.AddRange(new DevExpress.XtraReports.UI.GroupField[] {
new DevExpress.XtraReports.UI.GroupField("RateFactor", DevExpress.XtraReports.UI.XRColumnSortOrder.Descending)});
this.GroupHeader2.HeightF = 0F;
this.GroupHeader2.Name = "GroupHeader2";
//
// Spitzabrechnung
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -869,6 +975,7 @@ namespace BeWo.Report.DefaultReports
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -880,7 +987,7 @@ namespace BeWo.Report.DefaultReports
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
private DevExpress.XtraReports.UI.XRLabel lblHeader;
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
private DevExpress.XtraReports.UI.XRLabel RecipientPostCodeAndTown;
private DevExpress.XtraReports.UI.XRLabel xrLabel_RecipientStreet;
@@ -946,5 +1053,13 @@ namespace BeWo.Report.DefaultReports
private DevExpress.XtraReports.UI.XRTableCell xrTableCell30;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow24;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell31;
private DevExpress.XtraReports.UI.GroupFooterBand Zwischensumme;
private DevExpress.XtraReports.UI.XRTable xrTable6;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow12;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow10;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader2;
}
}

View File

@@ -1,10 +1,6 @@
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using BS.Shared.Extensions;
namespace BeWo.Report.DefaultReports
{
@@ -17,8 +13,59 @@ namespace BeWo.Report.DefaultReports
public void SetReportDataSource(Settlement2RO pRO)
{
this.bindingSource1.DataSource = pRO;
decimal rateFactor = 1;
bool containsALS = false;
bool containsFLS = false;
foreach (var ii in pRO.InvoiceItems)
{
if (ii.RateFactor.HasValue)
{
rateFactor = (100 + ii.RateFactor.Value) / 100;
}
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
{
Zwischensumme.Visible = true;
ii.AbrechnungsText = ii.AbrechnungsText.Replace("FLS", "Std.");
ii.ItemDescription = "Fehlkontakte";
}
else if (ii.ItemDescription.IsNullOrEmpty())
{
ii.ItemDescription = "Fachleistungsstunden";
}
if (ii.UnitDescription != null)
{
if (ii.UnitDescription.StartsWith("UA"))
{
containsALS = true;
}
else if (ii.UnitDescription.StartsWith("QA"))
{
containsFLS = true;
}
}
}
if (containsALS)
{
lblHeader.Text = lblHeader.Text.Replace("Betreuungsleistungen", "Betreuungsleistungen (UA)");
}
if (containsFLS)
{
lblHeader.Text = lblHeader.Text.Replace("Betreuungsleistungen", "Betreuungsleistungen (QA)");
}
else
{
// Zwischensumme nur bei Fachleistungen
Zwischensumme.Visible = false;
}
pRO.RateFactor = (double) rateFactor;
this.bindingSource1.DataSource = pRO;
}
}
}