MH: LH Bad Kreuznach hoffentlich letzter Fix

This commit is contained in:
2023-08-08 11:45:48 +02:00
parent c293430c0f
commit 45bf29d765
2 changed files with 91 additions and 60 deletions

View File

@@ -50,9 +50,10 @@ namespace LebenshilfeBadKreuznach
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell28 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell48 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.lblKlientKrank = new DevExpress.XtraReports.UI.XRLabel();
this.lblKlientUrlaub = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel26 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel27 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel24 = new DevExpress.XtraReports.UI.XRLabel();
@@ -96,12 +97,13 @@ namespace LebenshilfeBadKreuznach
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
this.hours = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -343,10 +345,6 @@ namespace LebenshilfeBadKreuznach
this.xrTableCell48.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter;
this.xrTableCell48.Weight = 0.41216655261008683D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// formattingRuleStartDate
//
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
@@ -357,8 +355,8 @@ namespace LebenshilfeBadKreuznach
// ReportHeader
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel11,
this.xrLabel9,
this.lblKlientKrank,
this.lblKlientUrlaub,
this.xrLabel26,
this.xrLabel27,
this.xrLabel24,
@@ -375,6 +373,42 @@ namespace LebenshilfeBadKreuznach
this.ReportHeader.HeightF = 190.4583F;
this.ReportHeader.Name = "ReportHeader";
//
// lblKlientKrank
//
this.lblKlientKrank.BackColor = System.Drawing.Color.Transparent;
this.lblKlientKrank.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.lblKlientKrank.Font = new System.Drawing.Font("Arial", 10F);
this.lblKlientKrank.LocationFloat = new DevExpress.Utils.PointFloat(0F, 162.5416F);
this.lblKlientKrank.Name = "lblKlientKrank";
this.lblKlientKrank.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.lblKlientKrank.SizeF = new System.Drawing.SizeF(1089F, 20F);
this.lblKlientKrank.StylePriority.UseBackColor = false;
this.lblKlientKrank.StylePriority.UseBorders = false;
this.lblKlientKrank.StylePriority.UseFont = false;
this.lblKlientKrank.StylePriority.UsePadding = false;
this.lblKlientKrank.StylePriority.UseTextAlignment = false;
this.lblKlientKrank.Text = "Klient*in war krank ";
this.lblKlientKrank.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.lblKlientKrank.Visible = false;
//
// lblKlientUrlaub
//
this.lblKlientUrlaub.BackColor = System.Drawing.Color.Transparent;
this.lblKlientUrlaub.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.lblKlientUrlaub.Font = new System.Drawing.Font("Arial", 10F);
this.lblKlientUrlaub.LocationFloat = new DevExpress.Utils.PointFloat(0F, 142.5417F);
this.lblKlientUrlaub.Name = "lblKlientUrlaub";
this.lblKlientUrlaub.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.lblKlientUrlaub.SizeF = new System.Drawing.SizeF(1089F, 20F);
this.lblKlientUrlaub.StylePriority.UseBackColor = false;
this.lblKlientUrlaub.StylePriority.UseBorders = false;
this.lblKlientUrlaub.StylePriority.UseFont = false;
this.lblKlientUrlaub.StylePriority.UsePadding = false;
this.lblKlientUrlaub.StylePriority.UseTextAlignment = false;
this.lblKlientUrlaub.Text = "Klient*in war im Urlaub ";
this.lblKlientUrlaub.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.lblKlientUrlaub.Visible = false;
//
// xrLabel26
//
this.xrLabel26.BackColor = System.Drawing.Color.Gainsboro;
@@ -826,7 +860,7 @@ namespace LebenshilfeBadKreuznach
this.xrTableAbwesenheiten.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow3,
this.xrTableRow4});
this.xrTableAbwesenheiten.SizeF = new System.Drawing.SizeF(230F, 40F);
this.xrTableAbwesenheiten.SizeF = new System.Drawing.SizeF(398.3333F, 40F);
this.xrTableAbwesenheiten.StylePriority.UseBorders = false;
this.xrTableAbwesenheiten.StylePriority.UseFont = false;
this.xrTableAbwesenheiten.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
@@ -836,7 +870,8 @@ namespace LebenshilfeBadKreuznach
this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell16,
this.xrTableCell17,
this.xrTableCell18});
this.xrTableCell18,
this.xrTableCell1});
this.xrTableRow3.Name = "xrTableRow3";
this.xrTableRow3.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTableRow3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
@@ -883,7 +918,8 @@ namespace LebenshilfeBadKreuznach
this.xrTableRow4.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell19,
this.xrTableCell20,
this.xrTableCell21});
this.xrTableCell21,
this.xrTableCell5});
this.xrTableRow4.Name = "xrTableRow4";
this.xrTableRow4.Weight = 1D;
//
@@ -963,39 +999,28 @@ namespace LebenshilfeBadKreuznach
this.hours.Expression = "Round([Minutes]/60,2)";
this.hours.Name = "hours";
//
// xrLabel9
// bindingSource1
//
this.xrLabel9.BackColor = System.Drawing.Color.Transparent;
this.xrLabel9.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel9.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(0F, 142.5417F);
this.xrLabel9.Name = "xrLabel9";
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(1089F, 20F);
this.xrLabel9.StylePriority.UseBackColor = false;
this.xrLabel9.StylePriority.UseBorders = false;
this.xrLabel9.StylePriority.UseFont = false;
this.xrLabel9.StylePriority.UsePadding = false;
this.xrLabel9.StylePriority.UseTextAlignment = false;
this.xrLabel9.Text = "Klient*in war im Urlaub ";
this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// xrLabel11
// xrTableCell1
//
this.xrLabel11.BackColor = System.Drawing.Color.Transparent;
this.xrLabel11.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel11.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(0F, 162.5416F);
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(1089F, 20F);
this.xrLabel11.StylePriority.UseBackColor = false;
this.xrLabel11.StylePriority.UseBorders = false;
this.xrLabel11.StylePriority.UseFont = false;
this.xrLabel11.StylePriority.UsePadding = false;
this.xrLabel11.StylePriority.UseTextAlignment = false;
this.xrLabel11.Text = "Klient*in war krank ";
this.xrLabel11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.StylePriority.UseFont = false;
this.xrTableCell1.StylePriority.UseTextAlignment = false;
this.xrTableCell1.Text = "Art";
this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell1.Weight = 0.2125420510791497D;
//
// xrTableCell5
//
this.xrTableCell5.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.StylePriority.UseFont = false;
this.xrTableCell5.StylePriority.UseTextAlignment = false;
this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell5.Weight = 0.2125420510791497D;
//
// Quittierungsbeleg
//
@@ -1024,8 +1049,8 @@ namespace LebenshilfeBadKreuznach
this.Version = "17.1";
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -1096,7 +1121,9 @@ namespace LebenshilfeBadKreuznach
private DevExpress.XtraReports.UI.XRLabel xrLabel12;
private DevExpress.XtraReports.UI.XRLabel lblBg1;
private DevExpress.XtraReports.UI.XRLabel xrLabel10;
private DevExpress.XtraReports.UI.XRLabel xrLabel9;
private DevExpress.XtraReports.UI.XRLabel xrLabel11;
private DevExpress.XtraReports.UI.XRLabel lblKlientUrlaub;
private DevExpress.XtraReports.UI.XRLabel lblKlientKrank;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
}
}

View File

@@ -12,6 +12,7 @@ using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Services;
using DevExpress.XtraReports.UI;
@@ -148,22 +149,22 @@ namespace LebenshilfeBadKreuznach
{
if (abs.Key.ToLower() == "klient urlaub")
{
lblKlientUrlaub.Visible = true;
foreach (var u in abs.Value)
{
lblKlientUrlaub.Text += u.Start.Value.Date == u.End.Value.Date ? string.Format("am {0:dd.MM.yyyy}", u.Start) : string.Format("vom {0:dd.MM.yyyy} bis {1:dd.MM.yyyy}", u.Start, u.End);
if (abs.Value.Last() != u)
lblKlientUrlaub.Text += ", ";
}
}
else if (abs.Key.ToLower() == "klient krank")
{
lblKlientKrank.Visible = true;
foreach (var u in abs.Value)
{
lblKlientKrank.Text += u.Start.Value.Date == u.End.Value.Date ? string.Format("am {0:dd.MM.yyyy}", u.Start) : string.Format("vom {0:dd.MM.yyyy} bis {1:dd.MM.yyyy}", u.Start, u.End);
if (abs.Value.Last() != u)
lblKlientKrank.Text += ", ";
}
}
}
@@ -203,8 +204,8 @@ namespace LebenshilfeBadKreuznach
row.Cells[1].Text = "unbekannt";
}
row.Cells[2].Text = String.Format("{0:0}", days);
row.Cells[3].Text = at.Reason.Description;
row.Cells[2].Text = days != null ? String.Format("{0:0}", days) : "";
row.Cells[3].Text = at.Reason != null && !at.Reason.Description.IsNullOrEmpty() ? at.Reason.Description : "";
index++;
}
}
@@ -242,17 +243,20 @@ namespace LebenshilfeBadKreuznach
if (scap.StartDate <= pRO.EndDate && scap.EndDate >= pRO.StartDate)
{
var bewilligt = calc.GetApprovedHoursPerWeek(scap, pRO.SupportConceptCostBearer.CostBearer.CostRatePeriods) ?? 0;
if (scap.ServiceCategory.Name.StartsWith("BG1"))
if (scap.ServiceCategory != null)
{
std.BG1 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("BG2"))
{
std.BG2 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("Gruppe"))
{
std.Gruppe += bewilligt;
if (scap.ServiceCategory.Name.StartsWith("BG1"))
{
std.BG1 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("BG2"))
{
std.BG2 += bewilligt;
}
else if (scap.ServiceCategory.Name.StartsWith("Gruppe"))
{
std.Gruppe += bewilligt;
}
}
}