MH: VKM Hamm Jugendamt QB inkl. Zuschläge

This commit is contained in:
2025-12-18 12:14:24 +01:00
parent ee55f9e827
commit 4759800b5e
6 changed files with 1322 additions and 17 deletions

View File

@@ -22,6 +22,58 @@ namespace VkmHamm
{
public class VkmHammReportCreator : DefaultReportCreator
{
public override XtraReport CreateServiceOverviewReportForROs(List<ServicesOverviewRO> roList, long orgaOid)
{
if (roList.Count > 0)
{
String reportId = null;
if (orgaOid > 0)
{
var organisation = DAOFactory.GenericDAO.LoadByID<Organisation>(orgaOid);
if (organisation != null)
reportId = organisation.Name;
}
// Jugendamt Hamm braucht einen anderen Beleg, weil da Zuschläge drauf müssen
var Report = new XtraReport();
if (reportId == null && roList[0].Costbearer.Contains("Jugendamt Hamm"))
{
var lServiceOverviewAllCustomersReport = new StundenzettelJugendamt();
lServiceOverviewAllCustomersReport.SetReportDataSource(roList[0]);
(lServiceOverviewAllCustomersReport as XtraReport).CreateDocument();
Report = lServiceOverviewAllCustomersReport as XtraReport;
}
else
{
var lServiceOverviewAllCustomersReport = new Stundenzettel();
lServiceOverviewAllCustomersReport.SetReportDataSource(roList[0]);
(lServiceOverviewAllCustomersReport as XtraReport).CreateDocument();
Report = lServiceOverviewAllCustomersReport as XtraReport;
}
for (int i = 1; i < roList.Count; i++)
{
if (roList[i].Costbearer.Contains("Jugendamt Hamm"))
{
var lNext = new StundenzettelJugendamt();
lNext.SetReportDataSource(roList[i]);
(lNext as XtraReport).CreateDocument();
Report.Pages.AddRange((lNext as XtraReport).Pages);
}
else
{
var lNext = new Stundenzettel();
lNext.SetReportDataSource(roList[i]);
(lNext as XtraReport).CreateDocument();
Report.Pages.AddRange((lNext as XtraReport).Pages);
}
}
return Report;
}
return new XtraReport();
}
public override XtraReport CreateFlsReport(string flsReportId, string subType)
{
string flsReportPath = Path.Combine(TempPath, flsReportId + ".xml");

View File

@@ -68,7 +68,7 @@ namespace VkmHamm
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel22 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAktenzeichen = new DevExpress.XtraReports.UI.XRLabel();
this.formattingRuleServiceDesc = new DevExpress.XtraReports.UI.FormattingRule();
this.formattingRuleCostBearer = new DevExpress.XtraReports.UI.FormattingRule();
this.formattingRuleEmployeeName = new DevExpress.XtraReports.UI.FormattingRule();
@@ -237,7 +237,7 @@ namespace VkmHamm
this.xrTableCell13.StylePriority.UsePadding = false;
this.xrTableCell13.StylePriority.UseTextAlignment = false;
this.xrTableCell13.Text = "xrTableCell13";
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell13.Weight = 0.15651301574282184D;
//
// xrTableCell6
@@ -247,7 +247,7 @@ namespace VkmHamm
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.StylePriority.UseTextAlignment = false;
this.xrTableCell6.Text = "xrTableCell6";
this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell6.Weight = 0.18616944420409443D;
//
// xrTableCell16
@@ -259,7 +259,7 @@ namespace VkmHamm
this.xrTableCell16.StylePriority.UseFont = false;
this.xrTableCell16.StylePriority.UseTextAlignment = false;
this.xrTableCell16.Text = "xrTableCell16";
this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell16.Weight = 0.20349934015219581D;
//
// xrTableCell7
@@ -271,7 +271,7 @@ namespace VkmHamm
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell7.StylePriority.UseFont = false;
this.xrTableCell7.StylePriority.UseTextAlignment = false;
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell7.Weight = 0.269475021628532D;
//
// xrTableCell2
@@ -323,7 +323,7 @@ namespace VkmHamm
this.xrLabel10,
this.xrLabel12,
this.xrLabel1,
this.xrLabel22});
this.lblAktenzeichen});
this.ReportHeader.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.ReportHeader.HeightF = 240F;
this.ReportHeader.Name = "ReportHeader";
@@ -597,17 +597,17 @@ namespace VkmHamm
this.xrLabel1.Text = "Quittierungsbeleg über direkte Betreuungsleistungen";
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel22
// lblAktenzeichen
//
this.xrLabel22.Font = new DevExpress.Drawing.DXFont("Arial", 11F);
this.xrLabel22.LocationFloat = new DevExpress.Utils.PointFloat(0F, 116F);
this.xrLabel22.Name = "xrLabel22";
this.xrLabel22.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel22.SizeF = new System.Drawing.SizeF(329.4164F, 18F);
this.xrLabel22.StylePriority.UseFont = false;
this.xrLabel22.StylePriority.UseTextAlignment = false;
this.xrLabel22.Text = "Aktenzeichen Landschaftsverband";
this.xrLabel22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.lblAktenzeichen.Font = new DevExpress.Drawing.DXFont("Arial", 11F);
this.lblAktenzeichen.LocationFloat = new DevExpress.Utils.PointFloat(0F, 116F);
this.lblAktenzeichen.Name = "lblAktenzeichen";
this.lblAktenzeichen.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAktenzeichen.SizeF = new System.Drawing.SizeF(329.4164F, 18F);
this.lblAktenzeichen.StylePriority.UseFont = false;
this.lblAktenzeichen.StylePriority.UseTextAlignment = false;
this.lblAktenzeichen.Text = "Aktenzeichen Landschaftsverband";
this.lblAktenzeichen.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
//
// formattingRuleServiceDesc
//
@@ -918,7 +918,7 @@ namespace VkmHamm
private DevExpress.XtraReports.UI.XRLabel xrLabel10;
private DevExpress.XtraReports.UI.XRLabel xrLabel12;
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
private DevExpress.XtraReports.UI.XRLabel xrLabel22;
private DevExpress.XtraReports.UI.XRLabel lblAktenzeichen;
private DevExpress.XtraReports.UI.XRLabel xrLabel7;
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BeWo.Service.Plugins;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
namespace VkmHamm
{
public partial class StundenzettelJugendamt : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{
public StundenzettelJugendamt()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
double minutenGruppe = 0;
double minutenNichtGruppe = 0;
var feiertage = new VacationService().GetFeiertage(pRO.Year);
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
double summeZuschlaege = 0;
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
{
if (s.IsBillable)
{
servicesBillable.Add(s);
if (feiertage.Contains(s.StartDate.Date) || s.StartDate.Date.DayOfWeek == DayOfWeek.Sunday)
{
double zuschlag = s.Minutes * 0.35;
s.Notice5 = string.Format("{0:0.00}", zuschlag);
summeZuschlaege += zuschlag;
}
if (s.IsGroup)
{
minutenGruppe += s.Minutes;
}
else
{
minutenNichtGruppe += s.Minutes;
}
}
}
pRO.Services = servicesBillable;
lblSummeZuschlaege.Text = string.Format("{0:0.00} FLM", summeZuschlaege);
lblGesamtFlmInklZuschlag.Text = string.Format("{0:0.00} FLM", pRO.TotalFLMBillable + summeZuschlaege);
}
this.bindingSource1.DataSource = pRO;
}
private void picSignature_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e)
{
XRPictureBox xrBox = sender as XRPictureBox;
//var test = this.GetCurrent
string base64String = xrBox.Tag as string;
if (!String.IsNullOrWhiteSpace(base64String))
{
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
var binData = Convert.FromBase64String(base64Data);
System.Drawing.Image img = ByteArrayToImage(binData);
xrBox.Image = Utils.CropImage(img);
}
else
{
xrBox.Image = null;
}
}
public System.Drawing.Image ByteArrayToImage(byte[] byteArrayIn)
{
using (var memoryStream = new MemoryStream(byteArrayIn))
{
return System.Drawing.Image.FromStream(memoryStream);
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -146,6 +146,12 @@
<Compile Include="ServiceRecordListReport.Designer.cs">
<DependentUpon>ServiceRecordListReport.cs</DependentUpon>
</Compile>
<Compile Include="ServicesOverviewReportJugendamt.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ServicesOverviewReportJugendamt.Designer.cs">
<DependentUpon>ServicesOverviewReportJugendamt.cs</DependentUpon>
</Compile>
<Compile Include="ServicesOverviewReport.cs">
<SubType>Component</SubType>
</Compile>
@@ -251,6 +257,9 @@
<DependentUpon>ServiceRecordListReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ServicesOverviewReportJugendamt.resx">
<DependentUpon>ServicesOverviewReportJugendamt.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ServicesOverviewReport.resx">
<DependentUpon>ServicesOverviewReport.cs</DependentUpon>
</EmbeddedResource>