MH: TeamPfeil QB und Rechnung an neue Regelung angepasst

This commit is contained in:
2026-06-12 13:51:54 +02:00
parent 8d4c6489e4
commit f36cfb5dd5
3 changed files with 88 additions and 37 deletions

View File

@@ -105,31 +105,67 @@ namespace TeamPfeil.Invoicing
// }
//}
int qualiOid;
if (iServiceRecord.ServiceDescription.CategoryName.Contains("1"))
// MH:
// Bis Ende 2025 richtet sich die erbrachte Kategorie nach dem, was dokumentiert wurde.
// AB 2026 wird das abgerechnet, was der MA als Qualifikation hat
// Sonderfall: Im Korridor dokumentiert. Das wird aber nachgeholt
long qualiOid;
if (iServiceRecord.Start.HasValue && iServiceRecord.Start.Value.Date < new DateTime(2026, 01, 01))
{
qualiOid = 2118; //477)
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 1: ";
if (iServiceRecord.ServiceDescription.CategoryName.Contains("1"))
{
qualiOid = 2118; //477)
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 1: ";
}
else if (iServiceRecord.ServiceDescription.CategoryName.Contains("2"))
{
qualiOid = 2119; //478)
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 2: ";
}
else if (iServiceRecord.ServiceDescription.CategoryName.Contains("3"))
{
qualiOid = 2120;
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 3: ";
}
else if (iServiceRecord.ServiceDescription.CategoryName.Contains("4"))
{
qualiOid = 2121;
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 4: ";
}
}
else if (iServiceRecord.ServiceDescription.CategoryName.Contains("2"))
else
{
qualiOid = 2119; //478)
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 2: ";
}
else if (iServiceRecord.ServiceDescription.CategoryName.Contains("3"))
{
qualiOid = 2120;
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 3: ";
}
else if (iServiceRecord.ServiceDescription.CategoryName.Contains("4"))
{
qualiOid = 2120;
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 4: ";
var qualifikation = iServiceRecord.Employee.ValueListEntries.FirstOrDefault(v => v.Value == ValueListEntryType.StaffQualificationsType);
if (qualifikation.Key != null)
{
qualiOid = qualifikation.Key;
if (qualiOid == 2118)
{
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 1: ";
}
else if (qualiOid == 2119)
{
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 2: ";
}
else if (qualiOid == 2120)
{
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 3: ";
}
else if (qualiOid == 2121)
{
stundensatz = GetStundensatz(scap.CostBearer2SupportConcept, qualiOid, iServiceRecord.Start);
invoiceItem.ItemDescription = "Qualifikationsniveau 4: ";
}
}
}
if (stundensatz != 0)

View File

@@ -82,7 +82,7 @@ namespace TeamPfeil
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable4 = new DevExpress.XtraReports.UI.XRTable();
this.tableBuchung = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -116,7 +116,7 @@ namespace TeamPfeil
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tableBuchung)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
@@ -712,7 +712,7 @@ namespace TeamPfeil
// GroupFooter1
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable4,
this.tableBuchung,
this.xrLabel4,
this.lblStd4Kat,
this.xrLabel8,
@@ -736,20 +736,20 @@ namespace TeamPfeil
this.GroupFooter1.KeepTogether = true;
this.GroupFooter1.Name = "GroupFooter1";
//
// xrTable4
// tableBuchung
//
this.xrTable4.BorderColor = System.Drawing.Color.Black;
this.xrTable4.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
this.tableBuchung.BorderColor = System.Drawing.Color.Black;
this.tableBuchung.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTable4.Font = new DevExpress.Drawing.DXFont("Calibri", 10F);
this.xrTable4.LocationFloat = new DevExpress.Utils.PointFloat(0.5002339F, 25F);
this.xrTable4.Name = "xrTable4";
this.xrTable4.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTable4.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.tableBuchung.Font = new DevExpress.Drawing.DXFont("Calibri", 10F);
this.tableBuchung.LocationFloat = new DevExpress.Utils.PointFloat(0.5002339F, 25F);
this.tableBuchung.Name = "tableBuchung";
this.tableBuchung.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.tableBuchung.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2});
this.xrTable4.SizeF = new System.Drawing.SizeF(321.6063F, 25F);
this.xrTable4.StylePriority.UseFont = false;
this.xrTable4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.tableBuchung.SizeF = new System.Drawing.SizeF(321.6063F, 25F);
this.tableBuchung.StylePriority.UseFont = false;
this.tableBuchung.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrTableRow2
//
@@ -1196,7 +1196,7 @@ namespace TeamPfeil
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tableBuchung)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
@@ -1273,7 +1273,7 @@ namespace TeamPfeil
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
private DevExpress.XtraReports.UI.XRTable xrTable4;
private DevExpress.XtraReports.UI.XRTable tableBuchung;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell11;

View File

@@ -130,6 +130,21 @@ namespace TeamPfeil
pRO.Services = servicesBillable;
}
// Ab 01.01.2026 ist die Zeile "Gesamtstunden buchen auf QN" nichtig laut KT, sie kann also ausgeblendet werden.
// Nur für den Fall lasse ich das setzen der Werte unten weiter aktiv, nur falls es doch nochmal relevant wird.
if (pRO.StartDate >= new DateTime(2026, 01, 01))
{
tableBuchung.Visible = false;
xrLabel16.Visible = false;
lblStd1Kat.Visible = false;
xrLabel12.Visible = false;
lblStd2Kat.Visible = false;
xrLabel8.Visible = false;
lblStd3Kat.Visible = false;
xrLabel4.Visible = false;
lblStd4Kat.Visible = false;
}
lblStd1.Text = String.Format("{0:0.00}", qn1Min / 60);
lblStd2.Text = String.Format("{0:0.00}", qn2Min / 60);
lblStd3.Text = String.Format("{0:0.00}", qn3Min / 60);