Begleitzettel

This commit is contained in:
2024-11-20 15:17:13 +01:00
parent 7db7f0ae1c
commit 57f55ea7a7
25 changed files with 2909 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.ReportRequests;
using DevExpress.XtraReports.UI;
namespace BeWo.Report
@@ -125,6 +126,6 @@ namespace BeWo.Report
public abstract XtraReport CreateUserGroupListReport(List<long> oids);
public abstract XtraReport CreateGkvAbrechnungReport(GkvAbrechnungReportRequest gkvAbrechnungReportRequest);
}
}

View File

@@ -19,6 +19,8 @@ using BS.Shared.DataContracts.Compact;
using BeWo.Service.Plugins;
using BeWo.Service.Reporting;
using System.Web;
using BeWo.Data.Security;
using BS.Shared.ReportRequests;
namespace BeWo.Report
{
@@ -1771,5 +1773,23 @@ namespace BeWo.Report
return report as XtraReport;
}
public override XtraReport CreateGkvAbrechnungReport(GkvAbrechnungReportRequest req)
{
var os = new OperationsServiceImp();
var mandator = os.GetMandator2(false);
var person = UserRightHelper.GetLoggedInUser().Employee.Person;
var gkvAbrechnung = DAOFactory.GenericDAO.LoadByID<GkvAbrechnung>(req.Oid);
var gkvAbrechnungDC = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDC(gkvAbrechnung);
var ro = GkvAbrechnungRO.Create(gkvAbrechnungDC, mandator, person);
var report = FindReportImp<GkvAbrechnungRO>();
report.SetReportDataSource(ro);
return report as XtraReport;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
using System;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
namespace BeWo.DiakonieKKKleve
{
[IDSpecificClass(Identifier = "GkvBegleitzettel")]
public partial class GkvBegleitzettel : XtraReport, IBeWoReport<GkvAbrechnungRO>
{
public GkvBegleitzettel()
{
this.InitializeComponent();
}
public void SetReportDataSource(GkvAbrechnungRO pRO)
{
bindingSource1.DataSource = pRO;
}
}
}

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

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="GkvAbrechnungRO" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>BeWo.Report.ReportObjects.GkvAbrechnungRO, BeWo.Report, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

View File

@@ -136,6 +136,12 @@
<Compile Include="DefaultReports\AbwesenheitsPrintReport.Designer.cs">
<DependentUpon>AbwesenheitsPrintReport.cs</DependentUpon>
</Compile>
<Compile Include="DefaultReports\Invoices\GkvBegleitzettel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="DefaultReports\Invoices\GkvBegleitzettel.Designer.cs">
<DependentUpon>GkvBegleitzettel.cs</DependentUpon>
</Compile>
<Compile Include="DefaultReports\LwvKASpitzabrechnung.cs">
<SubType>Component</SubType>
</Compile>
@@ -484,6 +490,7 @@
</Compile>
<Compile Include="DefaultReportCreator.cs" />
<Compile Include="ReportObjects\AbwesenheitsPrintRO.cs" />
<Compile Include="ReportObjects\GkvAbrechnungRO.cs" />
<Compile Include="ReportObjects\LwvKASpitzabrechnungRO.cs" />
<Compile Include="ReportObjects\BudgetnachweisAnhangRO.cs" />
<Compile Include="ReportObjects\ServiceRecordChangesAfterInvoiceDateRO.cs" />
@@ -546,6 +553,10 @@
<DependentUpon>AbwesenheitsPrintReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="DefaultReports\Invoices\GkvBegleitzettel.resx">
<DependentUpon>GkvBegleitzettel.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="DefaultReports\LwvKASpitzabrechnung.resx">
<DependentUpon>LwvKASpitzabrechnung.cs</DependentUpon>
<SubType>Designer</SubType>
@@ -778,6 +789,7 @@
<None Include="Properties\DataSources\BeWo.Report.DefaultReports.KalenderMonatsformatReport.datasource" />
<None Include="Properties\DataSources\BeWo.Report.ReportObjects.AdditionalServiceBookingRO.datasource" />
<None Include="Properties\DataSources\BeWo.Report.ReportObjects.AssessmentSheetRO.datasource" />
<None Include="Properties\DataSources\BeWo.Report.ReportObjects.GkvAbrechnungRO.datasource" />
<None Include="Properties\DataSources\BeWo.Report.ReportObjects.KalenderRO.datasource" />
<None Include="Properties\DataSources\BeWo.Report.ReportObjects.KassenbelegRO.datasource" />
<None Include="Properties\DataSources\BeWo.Report.ReportObjects.KassenbuchRO.datasource" />

View File

@@ -0,0 +1,65 @@
using BeWo.Data.Entities;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.GkvAbrechnung;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Report.ReportObjects
{
public class GkvAbrechnungRO : AbstractBeWoReportObject<GkvAbrechnungRO>
{
public string SenderOrganisationName { get; set; }
public string SenderStreet { get; set; }
public string SenderPostCodeAndTown { get; set; }
public string SenderPhone { get; set; }
public string SenderFax { get; set; }
public string SenderMail { get; set; }
public string SenderWebsite { get; set; }
public string SenderContactPerson { get; set; }
public string ReceiverDatenannahmestelle { get; set; }
public string ReceiverStreet { get; set; }
public string ReceiverPostCodeAndTown { get; set; }
public string KrankenkasseIK { get; set; }
public string KrankenkasseName { get; set; }
public string SenderIK { get; set; }
public string Rechnungsnummer { get; set; }
public string Rechnungsdatum { get; set; }
public string AnzahlDerUrbelege { get; set; }
public static GkvAbrechnungRO Create(GkvAbrechnungDC abrechnung, MandatorDC mandator, Person person)
{
var protokoll = (GkvTransferProtokollDC)abrechnung.LastTransferProtokoll;
var organisation = abrechnung.Organisation;
var result = new GkvAbrechnungRO();
result.SenderOrganisationName = mandator.Name;
result.SenderStreet = mandator.Street;
result.SenderPostCodeAndTown = $"{mandator.PostalCode}, {mandator.Town}";
result.SenderPhone = person.Contacts.FirstOrDefault(x => x.Type == BS.Shared.ContactType.business_Phone)?.Value;
result.SenderFax = person.Contacts.FirstOrDefault(x => x.Type == BS.Shared.ContactType.business_Fax)?.Value;
result.SenderMail = person.Contacts.FirstOrDefault(x => x.Type == BS.Shared.ContactType.business_Mail)?.Value;
result.SenderContactPerson = person.LastNameFirstName;
result.ReceiverDatenannahmestelle = organisation.BezDatenannahmestelle;
result.ReceiverStreet = organisation.InvoiceAddressStreet;
result.ReceiverPostCodeAndTown = $"{organisation.InvoiceAddressPostalCode}, {organisation.InvoiceAddressTown}";
result.KrankenkasseIK = organisation.IKKostentrager;
result.KrankenkasseName = organisation.Name;
result.SenderIK = mandator.IKLeistungserbringer;
result.Rechnungsnummer = protokoll.Rechnungsnummer;
result.Rechnungsdatum = protokoll.ErstelltAm.Value.ToString("dd.MM.yyyy");
result.AnzahlDerUrbelege = string.Empty;
return result;
}
}
}