AspBegleitungNrw/Reporting/Quittierungsbeleg - QB für Schulbegleitung aus Zeiterfassung mit Unterschrift für Testkunde

This commit is contained in:
2026-04-21 15:20:43 +02:00
parent cde701bcce
commit 7d47f005b9
14 changed files with 1908 additions and 2 deletions

View File

@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31729.503
# Visual Studio Version 17
VisualStudioVersion = 17.14.37111.16 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{E7543C39-A44C-40C9-82C9-E7FAA2D9A852}"
EndProject
@@ -986,6 +986,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CaritasVerbandDuerenJuelich
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SamanthaRiegerIntegrationspraxis", "ReportImp\SamanthaRiegerIntegrationspraxis\SamanthaRiegerIntegrationspraxis.csproj", "{BD841D90-CD90-44B6-8B3C-5C7D05225842}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspBegleitungNrw", "ReportImp\AspBegleitungNrw\AspBegleitungNrw.csproj", "{4D48D376-DCAE-4E22-82E3-36692B0FAE29}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET
@@ -12085,6 +12087,30 @@ Global
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|x86.ActiveCfg = Release|Any CPU
{BD841D90-CD90-44B6-8B3C-5C7D05225842}.Release|x86.Build.0 = Release|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Debug|.NET.ActiveCfg = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Debug|.NET.Build.0 = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Debug|x86.ActiveCfg = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Debug|x86.Build.0 = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.DebugRemote|.NET.ActiveCfg = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.DebugRemote|.NET.Build.0 = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.DebugRemote|Any CPU.ActiveCfg = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.DebugRemote|Any CPU.Build.0 = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.DebugRemote|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.DebugRemote|Mixed Platforms.Build.0 = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.DebugRemote|x86.ActiveCfg = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.DebugRemote|x86.Build.0 = Debug|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Release|.NET.ActiveCfg = Release|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Release|.NET.Build.0 = Release|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Release|Any CPU.Build.0 = Release|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Release|x86.ActiveCfg = Release|Any CPU
{4D48D376-DCAE-4E22-82E3-36692B0FAE29}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -12572,6 +12598,7 @@ Global
{15F9EE65-0B7F-49B6-91A7-5F606960AF4A} = {D8A691C5-146D-4613-86CC-438F02FE9106}
{23696062-2534-49E5-B88D-E182F2399923} = {D8A691C5-146D-4613-86CC-438F02FE9106}
{BD841D90-CD90-44B6-8B3C-5C7D05225842} = {D8A691C5-146D-4613-86CC-438F02FE9106}
{4D48D376-DCAE-4E22-82E3-36692B0FAE29} = {D8A691C5-146D-4613-86CC-438F02FE9106}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FBE985BB-9F0F-4DBB-8F94-ABC37A803FF9}

View File

@@ -0,0 +1,102 @@
<?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>{4D48D376-DCAE-4E22-82E3-36692B0FAE29}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AspBegleitungNrw</RootNamespace>
<AssemblyName>2103272562_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="Invoicing\CustomInvoiceCreation.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="Invoicing\CustomLWLDiggaBerechnung.cs" />
<Compile Include="Invoicing\SettlementInvoiceCreation.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Reporting\CustomMitarbeiterstundenkontoBerechnung.cs" />
<Compile Include="Reporting\CustomReportCreator.cs" />
<Compile Include="Reporting\Quittierungsbeleg.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Reporting\Quittierungsbeleg.Designer.cs">
<DependentUpon>Quittierungsbeleg.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>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Reporting\Quittierungsbeleg.resx">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Invoicing;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Services;
using Service.Invoicing;
namespace TemplateNeuKunde.Invoicing
{
// public class CustomInvoiceCreation : InvoiceCreation
//{
// //public override void SetInvoiceId(ServiceInvoice invoice)
// //{
// // //invoice.InvoiceBase.InvoiceId = "SBD";
// // //invoice.InvoiceBase.InvoiceTypeText = "";
// //}
// // //Setze für Selbstzahler die Adresse des Klienten
// // public override void SetRecipientInformation(ServiceInvoice serviceInvoice, CostBearer costBearer)
// // {
// // if (costBearer.Organisation.Name == "Selbstzahler")
// // {
// // serviceInvoice.InvoiceBase.RecipientOrganisationOid = costBearer.Organisation.Oid;
// // if (serviceInvoice.InvoiceBase.CostBearer2SupportConcept != null)
// // {
// // var cust = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.SupportConcept.Customer;
// // if (cust.Person.InvoiceAddress != null)
// // {
// // serviceInvoice.InvoiceBase.RecipientAddress = cust.Person.InvoiceAddress.CopyToNew();
// // }
// // else if (cust.Person.Address != null)
// // {
// // serviceInvoice.InvoiceBase.RecipientAddress = cust.Person.Address.CopyToNew();
// // }
// // serviceInvoice.InvoiceBase.RecipientPersonFirstName = cust.Person.FirstName;
// // serviceInvoice.InvoiceBase.RecipientPersonLastName = cust.Person.LastName;
// // serviceInvoice.InvoiceBase.RecipientCustomerOid = cust.Oid;
// // }
// // }
// // }
// }
}

View File

@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace TemplateNeuKunde.Invoicing
{
public class CustomInvoiceFactory : InvoiceFactory
{
// public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
// {
////Hier einkommentieren, wenn die Rechnungserstellung von einer bestimmten Kategorie einer Bewilligung abhängt
//foreach (var item in supportConcepts2ServiceRecords)
//{
// var csc = item.Key;
// var cb2sc = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(csc.CostBearerRelOids[0]);
// foreach (var scap in cb2sc.ApprovalPeriodList)
// {
// if (scap.ServiceCategory != null)
// {
// var ic = GetInvoiceCreatorForCategory(scap.ServiceCategory.Name);
// if (ic != null)
// return ic;
// }
// }
//}
////Hier einkommentieren, wenn die Rechnungserstellung von einer bestimmten Kategorie oder Organisation eines ServiceRecords abhängt
//foreach (var list in supportConcepts2ServiceRecords.Values)
// {
// foreach (var sr in list)
// {
// //Hier wird Kategorie geprüft
// var ic = GetInvoiceCreatorForCategory(sr.ServiceDescription.Category.Name);
// if (ic != null)
// return ic;
// //Hier wird Organisation geprüft
// if (sr.CostBearer.Name.ToLower().Contains("selbstzahler"))
// {
// return new CustomInvoiceCreation();
// }
// }
// }
// return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords);
// }
// private InvoiceCreation GetInvoiceCreatorForCategory(String catName)
// {
// if (!String.IsNullOrEmpty(catName))
// {
// String cat = catName.ToLower().Trim();
// if (cat.IndexOf("assistenz") >= 0)
// return new CustomInvoiceCreation();
// }
// return null;
// }
}
}

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Invoicing;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Services;
namespace TemplateNeuKunde.Invoicing
{
public class CustomLWLDiggaBerechnung : LWLDiggaBerechnung
{
public override void InitBerechnung()
{
//this.Umstellungsdatum = new DateTime(2025, 1, 1);
}
}
}

View File

@@ -0,0 +1,51 @@
//using BeWo.Data.Entities;
//using BeWo.Service.Invoicing;
//using BS.Shared.DataContracts;
//using BS.Shared.Services;
//using System;
//using System.Collections.Generic;
//using System.Linq;
//namespace TemplateNeuKunde.Invoicing
//{
// public class CustomSettlementInvoiceCreation : SettlementInvoiceCreation
// {
// public override bool CanCreateInvoiceTheOldWay(Settlement2DC si, CostBearer2SupportConcept c2s)
// {
// return false;
// }
//public override bool IsServiceRecordBillable(ServiceRecord iRecord)
//{
// if (iRecord.ServiceDescription.ServiceCategory.Name.Contains("Assistenz"))
// {
// return false;
// }
// return true;
//}
//public override void CalculateSettlementInvoiceApprovedAmounts(Settlement2DC si, SupportConceptCostBearerRelDC relDC, Calculations calc)
//{
// si.ApprovedFLSWeekly = 0;
// si.ApprovedFLS = 0;
// foreach (var sp in relDC.ApprovalPeriodList)
// {
// if (sp.ServiceCategory == null || !sp.ServiceCategory.Name.Contains("Assistenz"))
// {
// si.ApprovedFLSWeekly += calc.GetApprovedHoursPerWeek(sp, relDC.CostBearer.CostRatePeriods) ?? 0m;
// decimal flsTotal = calc.GetApprovedHoursTotal(sp, relDC.CostBearer.CostRatePeriods) ?? 0m;
// flsTotal = Math.Round(flsTotal, 2, MidpointRounding.AwayFromZero);
// si.ApprovedFLS += flsTotal;
// }
// }
//}
//public override IList<ServiceRecord> GetBillableServiceRecords(CostBearer2SupportConcept c2s)
//{
// return c2s.ServiceRecords.OrderBy(s => s.Start).Where(s => !s.ServiceDescription.ServiceCategory.Name.ToLower().Contains("assistenz")).ToList();
//}
// }
//}

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("KundeXyz")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("KundeXyz")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Entities;
using BeWo.Report.ReportObjects;
using BS.Shared.Extensions;
namespace TemplateNeuKunde.Reporting
{
public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
{
//Wenn halbe Feiertage konfiguriert werden sollen, muss diese Methode auch im VacationService einkommentiert werden
//public override decimal GetFeiertagsFaktor(DateTime start)
//{
// if (start.Month == 12)
// {
// if (start.Day == 24 || start.Day == 31)
// {
// return 0.5m;
// }
// }
// return base.GetFeiertagsFaktor(start);
//}
}
}

View File

@@ -0,0 +1,75 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.DefaultReports;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.ServiceImplementations;
using DevExpress.XtraReports.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AspBegleitungNrw.Reporting
{
public class CustomReportCreator : DefaultReportCreator
{
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende)
{
var os = new OperationsServiceImp();
var m = os.GetMandator2(false);
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid, true, nurFehlende);
if (lROs.Count > 0)
{
String reportId = null;
if (orgaOid > 0)
{
var organisation = DAOFactory.GenericDAO.LoadByID<Organisation>(orgaOid);
if (organisation != null)
reportId = organisation.Name;
}
var lServiceOverviewAllCustomersReport = this.FindReportImp<ServicesOverviewRO>(reportId);
lServiceOverviewAllCustomersReport.SetReportDataSource(lROs[0]);
(lServiceOverviewAllCustomersReport as XtraReport).CreateDocument();
var Report = lServiceOverviewAllCustomersReport as XtraReport;
for (int i = 1; i < lROs.Count; i++)
{
var lNext = FindReportImp<ServicesOverviewRO>(reportId);
lNext.SetReportDataSource(lROs[i]);
(lNext as XtraReport).CreateDocument();
Report.Pages.AddRange((lNext as XtraReport).Pages);
}
return lServiceOverviewAllCustomersReport as XtraReport;
}
return new XtraReport();
}
public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
{
var os = new OperationsServiceImp();
var m = os.GetMandator2(false);
String reportId = null;
if (orgaOid > 0)
{
var organisation = DAOFactory.GenericDAO.LoadByID<Organisation>(orgaOid);
if (organisation != null)
reportId = organisation.Name;
}
var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
var lServiceOverviewSingleCustomerReport = this.FindReportImp<ServicesOverviewRO>(reportId);
if (ro != null)
{
lServiceOverviewSingleCustomerReport.SetReportDataSource(ro);
}
return lServiceOverviewSingleCustomerReport as XtraReport;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,159 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
namespace AspBegleitungNrw.Reporting
{
public partial class Quittierungsbeleg : XtraReport, IBeWoReport<ServicesOverviewRO>
{
public Quittierungsbeleg()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
pRO.ReferenceNumber = "";
pRO.MainAttendantCommaSeperated = GetSchule(pRO);
bool pausenabzug = CheckPausenabzug(pRO);
if (pRO.StartDate < new DateTime(2024,06,01))
{
lblUnterschriftKlient.Text = "Datum, Unterschrift Klient*in";
}
if (pRO.Services != null)
{
if (pRO.Services[0].ServiceCategory != null)
{
pRO.ReferenceNumber = pRO.Services[0].ServiceCategory;
}
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
Dictionary<int, ServicesOverviewRO.ServiceDetail> day2Detail = new Dictionary<int, ServicesOverviewRO.ServiceDetail>();
foreach (var sd in pRO.Services)
{
if (!day2Detail.ContainsKey(sd.StartDate.Day))
{
sd.StartDateString = String.Format("{0:dddd dd.MM.}", sd.StartDate);
day2Detail.Add(sd.StartDate.Day, sd);
}
if (sd.IsBillable)
{
ServicesOverviewRO.CreateSignatureString(sd);
sd.Notice5 = "E";
if (sd.IsGroup)
{
//sd.Notice5 = String.Format("{0} Teilnehmer", sd.CustomerCount);
sd.Notice5 = "GR";
if (pausenabzug && sd.GroupRoundedDuration > 360)
{
sd.Minutes = (double)((sd.GroupRoundedDuration - 30) / sd.CustomerCount);
sd.Notice4 = "P";
}
}
if (!sd.IsGroup && pausenabzug && sd.Minutes > 360)
{
sd.Minutes = sd.Minutes - 30;
sd.Notice4 = "P";
}
servicesBillable.Add(sd);
}
}
//var count = pRO.EndDate - pRO.StartDate;
for (int i = 1; i <= pRO.EndDate.Day; i++)
{
if (!day2Detail.ContainsKey(i))
{
//Erstelle Dummy Records für fehlende Tage
var newSr = new ServicesOverviewRO.ServiceDetail();
if (i <= pRO.EndDate.Day)
{
newSr.StartDate = new DateTime(pRO.StartDate.Year, pRO.StartDate.Month, i);
newSr.StartDateString = String.Format("{0:dddd dd.MM.}", newSr.StartDate);
servicesBillable.Add(newSr);
}
}
}
pRO.Services = servicesBillable;
}
bindingSource1.DataSource = pRO;
}
private string GetSchule(ServicesOverviewRO pRO)
{
if (pRO.CostBearer2SupportConceptList != null && pRO.CostBearer2SupportConceptList.Count > 0)
{
var customer = pRO.CostBearer2SupportConceptList[0].SupportConcept.Customer;
foreach (var c2o in customer.Customer2OrganisationList)
{
foreach (var v2e in c2o.ValueList)
{
if (v2e.Entry.Type == ValueListEntryType.EnvironmentOrganisationType && v2e.Entry.Value.ToLower().Contains("schule"))
{
return c2o.Organisation.Name;
}
}
}
}
return null;
}
private bool CheckPausenabzug(ServicesOverviewRO pRO)
{
if (pRO.CostBearer2SupportConceptList != null && pRO.CostBearer2SupportConceptList.Count > 0)
{
var vv = pRO.CostBearer2SupportConceptList[0].SupportConcept.VarFieldValueList.FirstOrDefault(v => v.VarFieldDefOid.Value == 90);
if (vv != null)
{
var varFieldValue = BS.Shared.Core.Utils.XMLDeserializeFromString(vv.SerializedValue, Type.GetType(vv.TypeName));
if (varFieldValue != null && varFieldValue.ToString().ToLower() == "true")
{
return true;
}
}
}
return false;
}
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

@@ -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>