MH: Frauenhaus QB

This commit is contained in:
2025-04-14 12:11:48 +02:00
parent e99e4e4940
commit 7926f4fd45
3 changed files with 88 additions and 30 deletions

View File

@@ -25,12 +25,14 @@ namespace FrauenhausEWFRA
{
var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid);
rootReport.CreateDocument();
if (rootReport.Pages.Count == 0)
rootReport.CreateDocument();
for (int i = 1; i < lROs.Count; i++)
{
var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid);
lNext.CreateDocument();
if (lNext.Pages.Count == 0)
lNext.CreateDocument();
rootReport.Pages.AddRange(lNext.Pages);
}
@@ -79,16 +81,62 @@ namespace FrauenhausEWFRA
private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid)
{
IBeWoReport<ServicesOverviewRO> report = null;
if (ro.Costbearer != null && !ro.Costbearer.Contains("LVR"))
report = new QuittierungsbelegKrankenkassen();
else
report = new Quittierungsbeleg2();
XtraReport report = null;
report.SetReportDataSource(ro);
ServicesOverviewRO lvrRO = ServicesOverviewRO.CopyFromRO(ro);
ServicesOverviewRO kkRO= ServicesOverviewRO.CopyFromRO(ro);
lvrRO.TotalFLMBillable = 0;
kkRO.TotalFLMBillable = 0;
return report as XtraReport;
if (ro.Services != null)
{
foreach (ServicesOverviewRO.ServiceDetail s in ro.Services)
{
if (s.CostBearer != null && !s.CostBearer.Contains("LVR"))
{
kkRO.Services.Add(s);
kkRO.TotalFLMBillable += s.Minutes;
kkRO.TotalFLMBillable += s.Minutes / 60;
}
else if (s.CostBearer != null && s.CostBearer.Contains("LVR"))
{
lvrRO.Services.Add(s);
lvrRO.TotalFLMBillable += s.Minutes;
lvrRO.TotalFLMBillable += s.Minutes / 60;
}
}
}
report = AddReportToReport<QuittierungsbelegKrankenkassen>(report, kkRO);
report = AddReportToReport<Quittierungsbeleg2>(report, lvrRO);
if (report == null)
report = new XtraReport();
return report;
}
}
private XtraReport AddReportToReport<T>(XtraReport report, ServicesOverviewRO ro) where T : XtraReport, IBeWoReport<ServicesOverviewRO>, new()
{
if (ro.Services.Count > 0)
{
if (report == null)
{
report = new T();
((T)report).SetReportDataSource(ro);
}
else
{
if (report.Pages.Count == 0)
report.CreateDocument();
XtraReport newReport = new T();
((T)newReport).SetReportDataSource(ro);
newReport.CreateDocument();
report.Pages.AddRange(newReport.Pages);
}
}
return report;
}
}
}

View File

@@ -75,7 +75,7 @@ namespace FrauenhausEWFRA
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblVersNummer = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblMitarbeiterin = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell43 = new DevExpress.XtraReports.UI.XRTableCell();
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
@@ -666,7 +666,7 @@ namespace FrauenhausEWFRA
this.xrTableCell1,
this.xrTableCell8,
this.lblVersNummer,
this.xrTableCell7,
this.lblMitarbeiterin,
this.xrTableCell43});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Weight = 0.48945783132530118D;
@@ -718,24 +718,22 @@ namespace FrauenhausEWFRA
this.lblVersNummer.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.lblVersNummer.Weight = 0.43719925016437156D;
//
// xrTableCell7
// lblMitarbeiterin
//
this.xrTableCell7.BackColor = System.Drawing.Color.Gainsboro;
this.xrTableCell7.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
this.lblMitarbeiterin.BackColor = System.Drawing.Color.Gainsboro;
this.lblMitarbeiterin.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "MainAttendant")});
this.xrTableCell7.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrTableCell7.Multiline = true;
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 0, 0, 0, 100F);
this.xrTableCell7.StylePriority.UseBackColor = false;
this.xrTableCell7.StylePriority.UseBorders = false;
this.xrTableCell7.StylePriority.UseFont = false;
this.xrTableCell7.StylePriority.UsePadding = false;
this.xrTableCell7.StylePriority.UseTextAlignment = false;
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell7.Weight = 0.521754862498655D;
this.lblMitarbeiterin.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.lblMitarbeiterin.Multiline = true;
this.lblMitarbeiterin.Name = "lblMitarbeiterin";
this.lblMitarbeiterin.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 0, 0, 0, 100F);
this.lblMitarbeiterin.StylePriority.UseBackColor = false;
this.lblMitarbeiterin.StylePriority.UseBorders = false;
this.lblMitarbeiterin.StylePriority.UseFont = false;
this.lblMitarbeiterin.StylePriority.UsePadding = false;
this.lblMitarbeiterin.StylePriority.UseTextAlignment = false;
this.lblMitarbeiterin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.lblMitarbeiterin.Weight = 0.521754862498655D;
//
// xrTableCell43
//
@@ -1148,7 +1146,7 @@ namespace FrauenhausEWFRA
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
private DevExpress.XtraReports.UI.XRTableCell lblVersNummer;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.XRTableCell lblMitarbeiterin;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell43;
private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter1;
private DevExpress.XtraReports.UI.XRTable xrTable3;

View File

@@ -36,6 +36,18 @@ namespace FrauenhausEWFRA
pRO.Services = servicesBillable;
}
foreach (var cb2sc in pRO.CostBearer2SupportConceptList)
{
if (cb2sc.CostBearer.Organisation.Name == pRO.Costbearer)
{
foreach (var ap in cb2sc.ApprovalPeriodList)
{
if (ap.SupportConceptApprovalPeriod2Employee != null && ap.SupportConceptApprovalPeriod2Employee.Count > 0)
lblMitarbeiterin.Text = ap.SupportConceptApprovalPeriod2Employee[0].Employee.Person.FirstNameLastName;
}
}
}
bindingSource1.DataSource = pRO;
}