OwnSoftTestSoziotherapie: Neue Test- und Präsiumgebung für Soziotherapie (als DB-Kopie der legendären OwnSoftTestSchmitzi aufgesetzt)

This commit is contained in:
2026-03-03 18:04:16 +01:00
parent a0ff411e76
commit f194a82692
13 changed files with 2979 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
using BeWo.Data.Entities;
using BeWo.Service.Plugins;
namespace OwnSoftSoziotherapie.Calculations
{
public class CustomGroupDurationCalculator : GroupDurationCalculator
{
public override void CalculateGroupDuration(ServiceRecordGroup group)
{
base.CalculateGroupDuration(group);
foreach (var sr in group.ServiceRecordList)
{
if (sr.ServiceDescription.ServiceCategory.Name.ToLower().Contains("soziotherapie"))
{
sr.RoundedDuration = sr.GroupRoundedDuration.Value;
}
}
}
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace OwnSoftSoziotherapie.Invoicing
{
public class CustomInvoiceFactory : InvoiceFactory
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
foreach (var list in supportConcepts2ServiceRecords.Values)
{
foreach (var sr in list)
{
var cat = sr.ServiceDescription.Category;
if (sr.CostBearer != null && !sr.CostBearer.Name.Contains("LWL") && !sr.CostBearer.Name.Contains("LVR") &&
!String.IsNullOrEmpty(cat.Name) && cat.Name.ToLower().Contains("soziotherapie"))
{
return new SoziotherapieInvoiceCreation();
}
}
}
return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords);
}
}
}

View File

@@ -0,0 +1,170 @@
using System;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using System.Text.RegularExpressions;
using System.IO;
using DevExpress.XtraPrinting.Drawing;
namespace OwnSoftTestSoziotherapie
{
public partial class LeistungsnachweisSoziotherapie : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{
public LeistungsnachweisSoziotherapie()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
if (pRO.Mandator.Logo?.Original is object)
xrPictureBox3.ImageSource = new ImageSource(false, pRO.Mandator.Logo.Original);
double gesamt = 0;
double gesamtGruppe = 0;
if (pRO.Services != null)
{
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
{
ServicesOverviewRO.CreateSignatureString(s);
var serviceRecord = DAOFactory.GenericDAO.LoadByID<ServiceRecord>(s.ServiceRecordOid);
pRO.ReferenceNumber = serviceRecord.CostBearer2SupportConcept.CustomerReferenceNumber;
if (serviceRecord.CostBearer2SupportConcept.ApprovedStartDate != null)
pRO.ApprovedStartDate = String.Format("{0:dd.MM.yyyy}", serviceRecord.CostBearer2SupportConcept.ApprovedStartDate);
if (serviceRecord.CostBearer2SupportConcept.ApprovedEndDate != null)
pRO.ApprovedEndDate = String.Format("{0:dd.MM.yyyy}", serviceRecord.CostBearer2SupportConcept.ApprovedEndDate);
var srDc = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(serviceRecord);
s.GoalList = String.Empty;
if (srDc.Goals != null && srDc.Goals.Count > 0)
{
foreach (var goal in srDc.Goals)
{
if (!String.IsNullOrEmpty(goal.Abbreviation))
{
if (s.GoalList.Length > 0)
s.GoalList += ", ";
s.GoalList += goal.Abbreviation;
}
}
}
if (s.ServiceDescription.Contains("Gruppe"))
{
s.IsGroup = true;
gesamtGruppe += s.Minutes;
s.ServiceDescription = "E";
if (s.Minutes <= 45)
s.Notice5 = "2002678";
else if (s.Minutes <= 60)
s.Notice5 = "2002677";
else
s.Notice5 = "2002672";
}
else
{
gesamt += s.Minutes;
}
if (s.ServiceDescription.Contains("Video"))
{
s.ServiceDescription = "V";
if (s.Minutes <= 30)
{
s.Notice5 = "2001615";
}
else
{
s.Notice5 = "2001616";
}
}
else if (s.ServiceDescription.Contains("Telefon"))
{
s.ServiceDescription = "T";
if (s.Minutes <= 30)
{
s.Notice5 = "2001618";
}
else
{
s.Notice5 = "2001617";
}
}
else if (s.ServiceDescription.Contains("Aufsuchende Prob"))
{
s.ServiceDescription = "A";
s.Notice5 = "2001607";
}
else
{
if (s.ServiceDescription.Contains("Büro"))
{
s.ServiceDescription = "E";
}
else if (s.ServiceDescription.Contains("Aufsuchend"))
{
s.ServiceDescription = "A";
}
if (s.Minutes <= 10)
{
s.Notice5 = "2001613";
}
else if (s.Minutes <= 30)
{
s.Notice5 = "2001612";
}
else if (s.Minutes <= 45)
{
s.Notice5 = "2001611";
}
else
{
s.Notice5 = "2001610";
}
}
}
}
cellGesamt.Text = String.Format("{0:0.00}", gesamt / 60);
if (gesamtGruppe > 0)
{
cellGesamtGruppe.Text = String.Format("{0:0.00}", gesamtGruppe / 90);
}
this.bindingSource1.DataSource = pRO;
}
private void picSignature_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e)
{
XRPictureBox xrBox = sender as XRPictureBox;
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);
}
}
}
}

File diff suppressed because it is too large Load Diff

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,109 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{18CE9CAC-D867-4CC6-A24B-892C3B36D189}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OwnSoftTestSoziotherapie</RootNamespace>
<AssemblyName>8882629942_Reports</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.DataAccess.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Drawing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Office.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Export, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.Desktop.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Calculations\CustomGroupDurationCalculator.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="LeistungsnachweisSoziotherapie.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="LeistungsnachweisSoziotherapie.designer.cs">
<DependentUpon>LeistungsnachweisSoziotherapie.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Reporting\CustomReportCreator.cs" />
<Compile Include="SoziotherapieRechnung.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SoziotherapieRechnung.Designer.cs">
<DependentUpon>SoziotherapieRechnung.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
<Name>Data</Name>
</ProjectReference>
<ProjectReference Include="..\..\Report\Report.csproj">
<Project>{40d8b312-ea64-49e3-a31a-5e57ed4d5654}</Project>
<Name>Report</Name>
</ProjectReference>
<ProjectReference Include="..\..\Service\Service.csproj">
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
<Name>Service</Name>
</ProjectReference>
<ProjectReference Include="..\..\Shared\Shared.csproj">
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LeistungsnachweisSoziotherapie.resx">
<DependentUpon>LeistungsnachweisSoziotherapie.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="SoziotherapieRechnung.resx">
<DependentUpon>SoziotherapieRechnung.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("OwnSoftTestSoziotherapie")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OwnSoftTestSoziotherapie")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("c1fed668-adb9-47e0-b589-1389618e1b6e")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1 @@
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@@ -0,0 +1,166 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.DefaultReports;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BS.Shared.DataContracts;
using DevExpress.XtraReports.UI;
namespace OwnSoftTestSoziotherapie
{
public class CustomReportCreator : DefaultReportCreator
{
public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid)
{
long result;
Settlement2DC lSettlementDC;
string cbName;
if (invoiceBaseOid.HasValue && invoiceBaseOid.Value > 0)
{
long invoiceOid = invoiceBaseOid.Value;
var ib = DAOFactory.GenericDAO.LoadByID<InvoiceBase>(invoiceOid);
cbName = ib.CostBearer2SupportConcept.CostBearer.Organisation.Name;
}
else
{
Int64.TryParse(dcId, out result);
lSettlementDC = MapperFactory.SettlementDC_SettlementInvoice.MapToNewDC(DAOFactory.GenericDAO.LoadByID<SettlementInvoice>(result));
cbName = lSettlementDC.RecipientOrganisation;
}
if (cbName.Contains("Landschaftsverband Westfalen-Lippe") || cbName == "LWL")
return base.CreateSettlementReport(dcId, invoiceBaseOid, true);
return base.CreateSettlementReport(dcId, invoiceBaseOid, false);
}
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
if (lROs.Count > 0)
{
var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid);
if (rootReport.Pages.Count == 0)
{
rootReport.CreateDocument();
}
for (int i = 1; i < lROs.Count; i++)
{
var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid);
if (lNext.Pages.Count == 0)
{
lNext.CreateDocument();
}
rootReport.Pages.AddRange(lNext.Pages);
}
return rootReport;
}
return new XtraReport();
}
public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
return CreateServicesOverviewReportForRo(ro, serviceCategoryOid);
}
public override XtraReport CreateServiceOverviewReportForCustomers(IList<long> customerOids, int month, int year, long? orgaOid, long? empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende)
{
var roList = new List<ServicesOverviewRO>();
foreach (var coid in customerOids)
{
var ro = ServicesOverviewRO.Create(coid, month, year, true, orgaOid ?? 0, empOid ?? 0, startDay, endDay, serviceCategoryOid);
if (ro != null)
{
roList.Add(ro);
}
}
if (roList.Count > 0)
{
var rootReport = CreateServicesOverviewReportForRo(roList[0], serviceCategoryOid);
rootReport.CreateDocument();
for (int i = 1; i < roList.Count; i++)
{
var lNext = CreateServicesOverviewReportForRo(roList[i], serviceCategoryOid);
lNext.CreateDocument();
rootReport.Pages.AddRange(lNext.Pages);
}
return rootReport;
}
return new XtraReport();
}
private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro, long? serviceCategoryOid)
{
ServicesOverviewRO defaultRo = ServicesOverviewRO.CopyFromRO(ro);
ServicesOverviewRO sozioRo = ServicesOverviewRO.CopyFromRO(ro);
if (ro.Services != null)
{
foreach (ServicesOverviewRO.ServiceDetail s in ro.Services)
{
ServicesOverviewRO.CreateSignatureString(s);
if (s.ServiceCategory.ToLower().Contains("sozio"))
{
sozioRo.Services.Add(s);
}
else
{
defaultRo.Services.Add(s);
}
}
}
XtraReport report = null;
report = AddReportToReport<Quittierungsbeleg>(report, defaultRo);
report = AddReportToReport<LeistungsnachweisSoziotherapie>(report, sozioRo);
if (report == null)
report = new XtraReport();
return report;
}
public override XtraReport CreateReportForServicesOverviewRo(ServicesOverviewRO ro, string reportId)
{
return CreateServicesOverviewReportForRo(ro, null);
}
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;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,98 @@
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
using System;
using System.Text;
namespace OwnSoftTestSoziotherapie
{
[IDSpecificClass(Identifier = "RechnungSoziotherapie")]
public partial class SoziotherapieRechnung : XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public SoziotherapieRechnung()
{
this.InitializeComponent();
}
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
string poBox = null;
if (pRO.InvoiceBase.RecipientContactInformations.Count > 0)
{
foreach (var i in pRO.InvoiceBase.RecipientContactInformations)
{
if (i.ContactType == BS.Shared.ContactType.private_POBox)
poBox = i.ContactValue;
}
}
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.RecipientAddressLine1))
{
sb.AppendLine(pRO.RecipientAddressLine1);
}
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
{
sb.AppendLine(pRO.RecipientContactPerson);
}
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientDivision);
}
if (!String.IsNullOrEmpty(poBox))
{
sb.AppendLine(poBox);
}
else if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
{
sb.AppendLine(pRO.RecipientPoBox);
}
else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
{
sb.AppendLine("");
sb.AppendLine(pRO.RecipientPostCodeAndTown);
}
lblAdresse.Text = sb.ToString();
decimal hours = 0;
if (pRO.ServiceInvoicePeriods != null)
{
foreach (var sip in pRO.ServiceInvoicePeriods)
{
foreach (var ii in sip.ServiceInvoiceItems)
{
hours += ii.Hours ?? 0;
if (ii.UnitDescription == null || !ii.UnitDescription.StartsWith("GPos"))
{
ii.UnitDescription = "";
}
// Einheit setzen
ii.HourlyRateString = "Stunden";
if (ii.ServiceDescription != null && ii.ServiceDescription.ToLower().Contains("hausbesuchspauschale"))
{
ii.HourlyRateString = "";
}
}
}
}
if (String.IsNullOrEmpty(pRO.Notice))
{
xrLabel5.Visible = false;
}
this.bindingSource1.DataSource = pRO;
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.5.1.0" newVersion="2.5.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.4000" newVersion="3.1.0.4000" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>