MH: HIBA Beleg ab 2024
This commit is contained in:
@@ -57,6 +57,12 @@
|
||||
<Compile Include="Invoicing\HibaDefaultInvoiceCreation.cs" />
|
||||
<Compile Include="Invoicing\HibaInvoiceFactory.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Quittierungsbeleg.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Quittierungsbeleg.Designer.cs">
|
||||
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ServiceInvoiceReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -76,6 +82,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="Quittierungsbeleg.resx">
|
||||
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ServiceInvoiceReport.resx">
|
||||
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
1174
ReportImp/Hiba/Quittierungsbeleg.Designer.cs
generated
Normal file
1174
ReportImp/Hiba/Quittierungsbeleg.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
199
ReportImp/Hiba/Quittierungsbeleg.cs
Normal file
199
ReportImp/Hiba/Quittierungsbeleg.cs
Normal file
@@ -0,0 +1,199 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace Hiba
|
||||
{
|
||||
public partial class QuittierungsbelegHannover : XtraReport, IBeWoReport<ServicesOverviewRO>
|
||||
{
|
||||
public QuittierungsbelegHannover()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(ServicesOverviewRO pRO)
|
||||
{
|
||||
// Get calling method name
|
||||
//StackTrace stackTrace = new StackTrace();
|
||||
//Debug.WriteLine(stackTrace.GetFrame(1).GetMethod().Name);
|
||||
|
||||
bool hatGruppen = false;
|
||||
double minuten = 0;
|
||||
|
||||
if (pRO.Services != null)
|
||||
{
|
||||
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
|
||||
int summeWegepauschalen = 0;
|
||||
int summeAusfallstunden = 0;
|
||||
foreach (var sd in pRO.Services)
|
||||
{
|
||||
// NOTICE3: QA = qualifizierte Assistenz, KA = kompensatorische Assistenz
|
||||
// NOTICE4: 1 = Wegepauschale
|
||||
// NOTICE5: X = Fehlkontakt
|
||||
|
||||
if (sd.IsBillable && !sd.ServiceCategory.Contains("Fahrt"))
|
||||
{
|
||||
minuten += sd.Minutes;
|
||||
ServicesOverviewRO.CreateSignatureString(sd);
|
||||
sd.Notice5 = "F";
|
||||
if (sd.ServiceDescription.Contains("ear"))
|
||||
sd.Notice5 = "E";
|
||||
else if (sd.IsGroup)
|
||||
{
|
||||
//sd.Notice5 = String.Format("{0} Teilnehmer", sd.CustomerCount);
|
||||
hatGruppen = true;
|
||||
sd.Notice3 = "1";
|
||||
}
|
||||
|
||||
// Felder für Wegepauschale setzen (Wenn Kategorie = ??? bzw. Leistung = ??? dann ja)
|
||||
if (sd.ServiceCategory.ToLower().Contains("fachleistungsstunde") && sd.ServiceDescription.ToLower().Contains("face to face"))
|
||||
{
|
||||
sd.Notice4 = "1";
|
||||
summeWegepauschalen++;
|
||||
}
|
||||
else
|
||||
sd.Notice4 = "";
|
||||
|
||||
// Felder für Ausfallstundnen setzen
|
||||
if (sd.ServiceCategory.ToLower().Contains("ausfallstunde"))
|
||||
{
|
||||
sd.Notice5 = "1";
|
||||
summeAusfallstunden++;
|
||||
}
|
||||
else
|
||||
sd.Notice5 = "";
|
||||
|
||||
servicesBillable.Add(sd);
|
||||
}
|
||||
}
|
||||
pRO.Services = servicesBillable;
|
||||
|
||||
lblGesamtMinUndStunden.Text = ""; // Min = xx Std
|
||||
|
||||
}
|
||||
|
||||
//if (pRO.CostBearer2SupportConceptList != null && pRO.CostBearer2SupportConceptList.Count > 0)
|
||||
//{
|
||||
// var c2s = pRO.CostBearer2SupportConceptList[0];
|
||||
// var dc = MapperFactory.SupportConceptCostBearerRelDC_CostBearer2SupportConcept.MapToNewDC(c2s);
|
||||
|
||||
// foreach (var scap in dc.ApprovalPeriodList)
|
||||
// {
|
||||
// if (scap.ApprovedBEPerInterval.HasValue && scap.ApprovedBEInterval.HasValue && scap.ServiceCategory.Name == pRO.Services[0].ServiceCategory)
|
||||
// {
|
||||
// pRO.ApprovedFLSTotal = Convert.ToDecimal((scap.EndDate.Value - scap.StartDate.Value).TotalDays / 7) * scap.ApprovedBEPerInterval.Value;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
// Werte durch die FLS-Einheit teilen
|
||||
var cr = pRO.CostBearer2SupportConceptList[0].CostBearer.CostRatePeriods.Where(p => p.CostRateType == CostRatePeriodType.MinutesPerServiceUnit).OrderBy(c => c.EndDate).ToList();
|
||||
var crp = cr.FirstOrDefault(c => c.EndDate >= pRO.EndDate);
|
||||
if (crp == null)
|
||||
crp = cr[0];
|
||||
|
||||
decimal currentFLSUnit = 60;
|
||||
if (crp.CostRateValue.HasValue)
|
||||
currentFLSUnit = crp.CostRateValue.Value;
|
||||
|
||||
pRO.TotalFLMBillable = minuten;
|
||||
|
||||
foreach (var s in pRO.Services)
|
||||
s.FLSQualified = s.MinutesQualified / Convert.ToDouble(currentFLSUnit);
|
||||
pRO.TotalFLSQualified = pRO.TotalFLMQualified / Convert.ToDouble(currentFLSUnit);
|
||||
|
||||
pRO.CalculateFLSSollIst2();
|
||||
pRO.MinutenGeleistetBisVormonat /= currentFLSUnit;
|
||||
|
||||
//lblRestbudget.Text = String.Format("{0:0.00}", pRO.ApprovedFLSTotal - pRO.MinutenGeleistetBisVormonat / currentFLSUnit.CostRateValue);
|
||||
|
||||
bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
private void picSignature_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs 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);
|
||||
Image img = ByteArrayToImage(binData);
|
||||
xrBox.Image = Utils.CropImage(img);
|
||||
}
|
||||
else
|
||||
{
|
||||
xrBox.Image = null;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Wie anzeigen? Alle?
|
||||
private void EmployeeSignature_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
return;
|
||||
|
||||
if (sender is XRPictureBox pictureBox)
|
||||
{
|
||||
var base64String = pictureBox.Tag as string;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(base64String))
|
||||
{
|
||||
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
|
||||
var binaryData = Convert.FromBase64String(base64Data);
|
||||
var image = ByteArrayToImage(binaryData);
|
||||
|
||||
pictureBox.Image = image;
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureBox.Image = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Wie anzeigen? Alle?
|
||||
// TODO: Visibile der Datumstextboxen auf true setzen!
|
||||
private void CustomerSignature_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
return;
|
||||
|
||||
if (sender is XRPictureBox pictureBox)
|
||||
{
|
||||
var base64String = pictureBox.Tag as string;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(base64String))
|
||||
{
|
||||
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
|
||||
var binaryData = Convert.FromBase64String(base64Data);
|
||||
var image = ByteArrayToImage(binaryData);
|
||||
|
||||
pictureBox.Image = image;
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureBox.Image = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Image ByteArrayToImage(byte[] byteArrayIn)
|
||||
{
|
||||
using (var memoryStream = new MemoryStream(byteArrayIn))
|
||||
{
|
||||
return Image.FromStream(memoryStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
128
ReportImp/Hiba/Quittierungsbeleg.resx
Normal file
128
ReportImp/Hiba/Quittierungsbeleg.resx
Normal file
@@ -0,0 +1,128 @@
|
||||
<?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>
|
||||
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>21, 17</value>
|
||||
</metadata>
|
||||
<data name="xrLabel9.Text" xml:space="preserve">
|
||||
<value>*Art = Art der Assistenzleistung (QA = qualifizierte Assistenz, KA = kompensatorische Assistenz) *TN = Anzahl der Teilnehmer
|
||||
*FKP = Fahrtkostenpauschale *AF = Ausfall auf Grund kurzfristiger Absage / nicht angetroffen
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user