25 Commits

Author SHA1 Message Date
Developer01
8b36459e85 Überarbeitung nach Rückmeldung Marvin (windreamIndexe SQL Editor, Dynmisch verkleinern des pnlValidators, Regexprüfung editvalue, Bedienung Tastaturbefehle, ...) 2025-08-18 11:51:57 +02:00
Developer01
09673ffd70 Abhängigkeiten aktualisieren, build 2025-08-13 12:43:38 +02:00
Developer01
bff4ad10c9 Windream logging bei createWMobject, file or fodler exists 2025-07-02 09:14:13 +02:00
Developer01
a409e1fd44 Messaging TLS Protokoll 2025-06-26 17:14:08 +02:00
Developer01
c7bb645f94 Messaging 1.9.9 Logging to compare 2025-06-25 15:01:15 +02:00
Developer01
e7a7c45430 Sichtbeleg Logging 2025-06-24 14:51:40 +02:00
Developer01
c0054d41ae V 2.3.6.0 Debug Param-Liste auf 1000 Zeichen begrenzt 2025-06-03 08:30:05 +02:00
Developer01
1d31298d8d MS Sichtbeleg Jobs 2025-05-28 15:40:44 +02:00
Developer01
0261d237b6 Sichtbeleg Anapssung 2025-05-26 10:48:46 +02:00
ea7fe74e89 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-05-23 12:48:13 +02:00
Developer01
f7f4b05df5 ActiveDirectoryInterfaces Split Distinguished Name 2025-05-21 14:00:44 +02:00
Developer01
766737b4b5 Interfaces V 2.3 2025-05-21 13:11:13 +02:00
Developer01
ffa8850bf1 Modules FileParams 2025-05-21 08:08:32 +02:00
Developer01
2991b52c17 MS Parameter renaming 2025-05-16 11:54:14 +02:00
df04b0a706 Modules.Jobs: Version 2.9.3.0 2025-05-16 10:32:51 +02:00
ce65276084 Modules.Base: version 1.3.9.0 2025-05-16 10:31:48 +02:00
17d5acee9d Neue Datum-Konvertierungsfunktion 2025-05-16 10:31:06 +02:00
c7afa2f754 Modules.Interfaces: Version 2.2.9.0 2025-05-15 13:36:35 +02:00
4d5ab64904 Peppol in UBL2.1 umbenannt 2025-05-15 13:35:58 +02:00
f4c3e9b3e1 Modules.Interfaces: Version 2.2.8.0 2025-05-14 15:34:55 +02:00
9d76b17b1d Integration ZUGFeRD 2.3.3 XSD Schema 2025-05-14 15:34:14 +02:00
2ec92511cb Modules.Jobs: Version 2.9.2.0 2025-05-13 14:50:02 +02:00
8e1b9d21f3 Modules.Interfaces - Version 2.2.7.0 2025-05-13 14:49:26 +02:00
7ac596b930 Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-05-13 14:48:51 +02:00
cf9650be50 Peppol 3017 / UBL Logik 2025-05-13 14:48:09 +02:00
42 changed files with 78154 additions and 31887 deletions

View File

@@ -45,8 +45,8 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data GmbH")>
<Assembly: AssemblyProduct("Modules.")>
<Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("")>
<Assembly: AssemblyTrademark("1.3.9.0")>
<Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.8.0")>
<Assembly: AssemblyFileVersion("1.3.8.0")>
<Assembly: AssemblyVersion("1.3.9.0")>
<Assembly: AssemblyFileVersion("1.3.9.0")>

View File

@@ -1,4 +1,7 @@
Public Class StringFunctions
Imports System.Globalization
Imports DigitalData.Modules.Logging
Public Class StringFunctions
Public Shared Function SplitText_Length(ByVal input As String, ByVal maxLength As Integer) As List(Of String)
Dim result As New List(Of String)
@@ -19,4 +22,43 @@
Dim lines As List(Of String) = text.Split({vbCrLf, vbLf, vbCr}, StringSplitOptions.None).ToList()
Return lines
End Function
Public Shared Function DatetimeStringToGermanStringConverter(pDatetimeString As String, pLogger As Logger) As String
If pDatetimeString.IsNullOrEmpty() = True Then
' Wenn nichts kommt, kommt nichts zurueck
Return String.Empty
End If
Dim formatList As List(Of String) = New List(Of String) From {
"yyyyMMdd",
"MM/dd/yyyy", "M/d/yyyy", "MM/d/yyyy", "M/dd/yyyy",
"yyyy-MM-dd", "yyyy-M-d", "yyyy-MM-d", "yyyy-M-dd",
"dd.MM.yyyy", "d.M.yyyy", "d.MM.yyyy", "dd.M.yyyy"
}
Dim dateStringResult As Date = Date.MinValue
Dim oConvertResult As Boolean = False
For Each formatStringItem In formatList
Try
dateStringResult = DateTime.ParseExact(pDatetimeString, formatStringItem, CultureInfo.InvariantCulture)
oConvertResult = True
Exit For
Catch ex As FormatException
oConvertResult = False
pLogger?.Debug("DatetimeStringToGermanStringConverter() - Could not parse date string {0} ({1})", pDatetimeString, formatStringItem)
End Try
Next
If oConvertResult = True Then
' In deutsches Format umwandeln (dd.MM.yyyy)
Dim germanDateFormat As String = dateStringResult.ToString("dd.MM.yyyy")
Return germanDateFormat
Else
' Wenn nichts konvertiert werden konnte, geben wir den ursprünglichen Wert zurück
Return pDatetimeString
End If
End Function
End Class

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
<package id="NLog" version="5.0.5" targetFramework="net461" />
<package id="NuGet.CommandLine" version="6.13.2" targetFramework="net462" developmentDependency="true" />
</packages>

View File

@@ -48,16 +48,16 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Base, Version=1.3.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Base.1.3.8\lib\net462\DigitalData.Modules.Base.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database, Version=2.3.5.4, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Database.2.3.5.4\lib\net462\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Encryption, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Encryption.1.3.1\lib\net462\DigitalData.Modules.Encryption.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
@@ -148,9 +148,6 @@
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="README.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>

View File

@@ -1,5 +0,0 @@
BASE MODULE
===========
This module is intended for often used constants and datastructures.
Therefor it is important that this module does not have any dependencies on other modules!!

View File

@@ -1,9 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DigitalData.Modules.Base" version="1.3.8" targetFramework="net462" />
<package id="DigitalData.Modules.Database" version="2.3.5.4" targetFramework="net462" />
<package id="DigitalData.Modules.Encryption" version="1.3.1" targetFramework="net462" />
<package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net462" />
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net462" />

View File

@@ -159,6 +159,13 @@ Public Class MSSQLServer
Return oGDPicture
End Using
End Function
Public Function GetDDCatalog() As DataTable
Using oConnection As SqlConnection = GetSQLConnection()
Dim oSQL = Queries.DD_ECM.DD_SELECTS.TBDD_CATALOG
Dim oDT_CATALOG As DataTable = GetDatatable(oSQL)
Return oDT_CATALOG
End Using
End Function
Public Function Get_ConnectionStringforID(pConnectionId As Integer) As String
Dim oConnectionString As String = String.Empty
@@ -463,6 +470,7 @@ Public Class MSSQLServer
Dim oTransaction As SqlTransaction = MaybeGetTransaction(pSqlConnection, pTransactionMode, pTransaction)
Try
Logger.Debug("ExecuteNonQueryWithConnectionObject: Running Command [{0}] and Parameters [{1}]", pSqlCommandObject.CommandText, GetParameterListAsString(pSqlCommandObject))
pSqlCommandObject.Connection = pSqlConnection
@@ -644,7 +652,10 @@ Public Class MSSQLServer
Cast(Of SqlParameter).
Select(Function(p) $"({p.ParameterName}={p.Value})").
ToList()
Return String.Join(",", oList)
Dim oParamString = String.Join(",", oList)
If oParamString.Length > 1000 Then
oParamString = oParamString.Substring(1, 1000)
End If
Return oParamString
End Function
End Class

View File

@@ -47,11 +47,11 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Encryption, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Encryption.1.3.1\lib\net462\DigitalData.Modules.Encryption.dll</HintPath>
<Reference Include="DigitalData.Modules.Encryption">
<HintPath>..\Encryption\bin\Debug\DigitalData.Modules.Encryption.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.5.4")>
<Assembly: AssemblyFileVersion("2.3.5.4")>
<Assembly: AssemblyVersion("2.3.6.0")>
<Assembly: AssemblyFileVersion("2.3.6.0")>

View File

@@ -4,6 +4,9 @@
Public Const GdPictureLicense As String = "SELECT COALESCE(MAX(LICENSE),'') FROM TBDD_3RD_PARTY_MODULES WHERE ACTIVE = 1 AND NAME = 'GDPICTURE' AND [VERSION] = '11.2024'"
Public Const GdPictureLicense_REGULAR As String = "SELECT COALESCE(MAX(LICENSE),'') FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE' AND ACTIVE = 1"
End Class
Public Class DD_SELECTS
Public Const TBDD_CATALOG As String = "SELECT * FROM TBDD_CATALOG"
End Class
Public Class Connections
Public Const AllConnections As String = "SELECT * FROM TBDD_CONNECTION AND AKTIV = 1"

View File

@@ -44,6 +44,15 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Base">
<HintPath>..\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
@@ -295,24 +304,6 @@
<LastGenOutput>Reference.vb</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Base\Base.vbproj">
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
<Name>Base</Name>
</ProjectReference>
<ProjectReference Include="..\Config\Config.vbproj">
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
<Name>Config</Name>
</ProjectReference>
<ProjectReference Include="..\Database\Database.vbproj">
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
<Name>Database</Name>
</ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>

View File

@@ -46,7 +46,8 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
<package id="NLog" version="5.0.5" targetFramework="net461" />
</packages>

View File

@@ -220,10 +220,23 @@ Public Class ActiveDirectoryInterface
Return oUsers
End Try
End Function
Private Function GetPartFromFirstOU(dnString As String) As String
Dim keyword As String = "OU="
Dim index As Integer = dnString.IndexOf(keyword)
Public Function FindUserWithFilter(User As UserPrincipalEx, Filter As String) As Boolean
If index <> -1 Then
Return dnString.Substring(index)
Else
Return "No_Result_from_GetPartFromFirstOU"
End If
End Function
Public Function FindUserWithFilter(pUser As UserPrincipalEx, pFilter As String) As Boolean
Try
Dim oRootPath = String.Join(","c, User.DistinguishedName.Split(","c).Skip(1))
'Dim oRootPath = String.Join(","c, pUser.DistinguishedName.Split(","c).Skip(1))
Dim oRootPath = GetPartFromFirstOU(pUser.DistinguishedName)
_logger.Debug("FindUserWithFilter: pUser.DistinguishedName: [{0}]", pUser.DistinguishedName)
_logger.Debug("FindUserWithFilter: oRootPath from User.DistinguishedName: [{0}]", oRootPath)
Dim oPlaceholder = "@SAMACCOUNTNAME"
Dim oProtocol = "LDAP://"
Dim oEntry As New DirectoryEntry(oProtocol & oRootPath) With {
@@ -231,22 +244,25 @@ Public Class ActiveDirectoryInterface
.Password = Nothing,
.AuthenticationType = AuthenticationTypes.Secure
}
If Filter = String.Empty Then
_logger.Debug("FindUserWithFilter: Filter was empty, returning True for User [{0}]", User.SamAccountName)
_logger.Debug("FindUserWithFilter: got oDirectoryEntry (Path): [{0}]", oProtocol & oRootPath)
If pFilter = String.Empty Then
_logger.Debug("FindUserWithFilter: Filter was empty, returning True for User [{0}]", pUser.SamAccountName)
Return True
End If
If Filter.Contains(oPlaceholder) Then
Filter = Filter.Replace(oPlaceholder, User.SamAccountName)
If pFilter.Contains(oPlaceholder) Then
pFilter = pFilter.Replace(oPlaceholder, pUser.SamAccountName)
_logger.Debug("FindUserWithFilter: Filter.Contains(oPlaceholder) [{0}]", pFilter)
Else
_logger.Warn("FindUserWithFilter: Placeholder [{0}] was not found in filter. Results may not be correct.")
End If
Dim oSearcher As New DirectorySearcher(oEntry, Filter)
Dim oSearcher As New DirectorySearcher(oEntry, pFilter)
_logger.Debug("FindUserWithFilter: oSearcher created! Now executing DirectoryServices.SearchResult with .FindOne ...")
Dim oResult As SearchResult = oSearcher.FindOne()
If oResult IsNot Nothing AndAlso oResult.Path.Replace(oProtocol, String.Empty) = User.DistinguishedName Then
If oResult IsNot Nothing AndAlso oResult.Path.Replace(oProtocol, String.Empty) = pUser.DistinguishedName Then
_logger.Debug("FindUserWithFilter: We have an oResult - oResult.Path: [{0}]", oResult.Path)
Return True
Else
Return False

View File

@@ -49,6 +49,18 @@
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
<HintPath>..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Base, Version=1.3.9.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database, Version=2.3.5.4, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
@@ -226,6 +238,7 @@
<Compile Include="GrapQLInterface\LoginData.vb" />
<Compile Include="GrapQLInterface\LogoutData.vb" />
<Compile Include="GrapQLInterface\QueryData.vb" />
<Compile Include="ZUGFeRDInterface\Enums\Item_Types.vb" />
<Compile Include="ZUGFeRDInterface\Exceptions.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
@@ -244,8 +257,8 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="ZUGFeRDInterface\PDFConverter.vb" />
<Compile Include="ZUGFeRDInterface\Peppol_BIS_Billing3017\CreditNoteType.vb" />
<Compile Include="ZUGFeRDInterface\Peppol_BIS_Billing3017\InvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Peppol_UBL2.1\CreditNoteType.vb" />
<Compile Include="ZUGFeRDInterface\Peppol_UBL2.1\InvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Validator.vb" />
<Compile Include="ZUGFeRDInterface\Version1.0\CrossIndustryDocumentType.vb" />
<Compile Include="ZUGFeRDInterface.vb" />
@@ -255,6 +268,7 @@
<Compile Include="ZUGFeRDInterface\Version2.0\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Version2.1.1\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Version2.2_FacturX\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Version2.3_3_FacturX\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\Version2.3_FacturX\CrossIndustryInvoiceType.vb" />
<Compile Include="ZUGFeRDInterface\XmlItemProperty.vb" />
</ItemGroup>
@@ -279,20 +293,6 @@
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Base\Base.vbproj">
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
<Name>Base</Name>
</ProjectReference>
<ProjectReference Include="..\Database\Database.vbproj">
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
<Name>Database</Name>
</ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Interfaces")>
<Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("2.2.5.0")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.2.6.0")>
<Assembly: AssemblyFileVersion("2.2.6.0")>
<Assembly: AssemblyVersion("2.3.0.0")>
<Assembly: AssemblyFileVersion("2.3.0.0")>

View File

@@ -1,10 +1,8 @@
Imports System.IO
Imports System.Reflection
Imports System.Xml
Imports System.Xml.Serialization
Imports DigitalData.Modules.Interfaces.Exceptions
Imports DigitalData.Modules.Interfaces.PDFEmbeds
Imports DigitalData.Modules.Interfaces.Peppol
Imports DigitalData.Modules.Interfaces.ZUGFeRD
Imports DigitalData.Modules.Logging
Imports GdPicture14
@@ -21,16 +19,17 @@ Public Class ZUGFeRDInterface
Public Const ZUGFERD_SPEC_DEFAULT = "DEFAULT"
Public Const ZUGFERD_SPEC_10 = "ZUGFERD_10"
Public Const ZUGFERD_SPEC_2x = "ZUGFERD_2x"
Public Const PEPPOL_SPEC_3x_INVOICE = "PEPPOL_BISBILL_3x_INVOICE"
Public Const PEPPOL_SPEC_3x_CREDITNOTE = "PEPPOL_BISBILL_3x_CREDITNOTE"
Public Const UBL_SPEC_21 = "UBL_21"
Public Const XMLSCHEMA_ZUGFERD_10 = "Version1_0"
Public Const XMLSCHEMA_ZUGFERD_20 = "Version2_0"
Public Const XMLSCHEMA_ZUGFERD_211 = "Version2_1_1"
Public Const XMLSCHEMA_ZUGFERD_22 = "Version2_2_FacturX"
Public Const XMLSCHEMA_ZUGFERD_23 = "Version2_3_FacturX"
Public Const XMLSCHEMA_PEPPOL_3017_INVOICE = "Version3017_INVOICE"
Public Const XMLSCHEMA_PEPPOL_3017_CREDITNOTE = "Version3017_CREDITNOTE"
Public Const XMLSCHEMA_ZUGFERD_233 = "Version2_3_3_FacturX"
Public Const XMLSCHEMA_UBL_21_INVOICE = "UBL2_1_INVOICE"
Public Const XMLSCHEMA_UBL_21_CREDITNOTE = "UBL2_1_CREDITNOTE"
Public Const RECEIPT_TYPE_XML = "XML"
Public Const RECEIPT_TYPE_PDF = "PDF"
@@ -61,7 +60,7 @@ Public Class ZUGFeRDInterface
Public Property AllowXRechnung_Filename As Boolean = True
Public Property AllowZugferd_1_0_Schema As Boolean = True
Public Property AllowZugferd_2_x_Schema As Boolean = True
Public Property AllowPeppol_3017_Schema As Boolean = False
Public Property AllowPeppol_3_x_Schema As Boolean = False
End Class
Public Class ZugferdResult
@@ -380,21 +379,26 @@ Public Class ZUGFeRDInterface
.SchemaType = GetType(Version2_3_FacturX.CrossIndustryInvoiceType),
.Specification = ZUGFERD_SPEC_2x,
.XMLSchema = XMLSCHEMA_ZUGFERD_23
},
New AllowedType With {
.SchemaType = GetType(Version2_3_3_FacturX.CrossIndustryInvoiceType),
.Specification = ZUGFERD_SPEC_2x,
.XMLSchema = XMLSCHEMA_ZUGFERD_233
}
})
End If
If _Options.AllowPeppol_3017_Schema Then
If _Options.AllowPeppol_3_x_Schema Then
oAllowedTypes.AddRange(New List(Of AllowedType) From {
New AllowedType With {
.SchemaType = GetType(BISBilling30Invoice.InvoiceType),
.Specification = PEPPOL_SPEC_3x_INVOICE,
.XMLSchema = XMLSCHEMA_PEPPOL_3017_INVOICE
.SchemaType = GetType(UBL_21_Invoice.InvoiceType),
.Specification = UBL_SPEC_21,
.XMLSchema = XMLSCHEMA_UBL_21_INVOICE
},
New AllowedType With {
.SchemaType = GetType(BISBilling30CreditNote.CreditNoteType),
.Specification = PEPPOL_SPEC_3x_CREDITNOTE,
.XMLSchema = XMLSCHEMA_PEPPOL_3017_CREDITNOTE
.SchemaType = GetType(UBL_21_CreditNote.CreditNoteType),
.Specification = UBL_SPEC_21,
.XMLSchema = XMLSCHEMA_UBL_21_CREDITNOTE
}
})
End If

View File

@@ -0,0 +1,7 @@
Public Enum Item_Types
StringType '0
DateType '1
MoneyType '2
FileType '3
End Enum

View File

@@ -83,17 +83,17 @@ Public Class PropertyValues
_logger.Error(ex)
oPropertyValues = New List(Of Object)
End Try
' check the first batch of values to determine the row count
If oRowCount = 0 Then '08.04.2025 MS Added as Workaround for Positions Or oGroupScope = "POSITIONS" !
oRowCount = oPropertyValues.Count
End If
' Flatten result value
oPropertyValues = GetFinalPropValue(oPropertyValues)
' Add to list
oPropertyList.Add(oProperty.Value, oPropertyValues)
' check the first batch of values to determine the row count
Next
' Structure of oPropertyList

File diff suppressed because it is too large Load Diff

View File

@@ -67,18 +67,6 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Base\Base.vbproj">
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
<Name>Base</Name>
</ProjectReference>
<ProjectReference Include="..\Config\Config.vbproj">
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
<Name>Config</Name>
</ProjectReference>
<ProjectReference Include="..\Database\Database.vbproj">
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
<Name>Database</Name>
</ProjectReference>
<ProjectReference Include="..\Interfaces\Interfaces.vbproj">
<Project>{ab6f09bf-e794-4f6a-94bb-c97c0ba84d64}</Project>
<Name>Interfaces</Name>
@@ -125,6 +113,18 @@
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
<HintPath>..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Base, Version=1.3.9.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Config, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database, Version=2.3.5.4, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>

View File

@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Modules.Jobs")>
<Assembly: AssemblyCopyright("Copyright © 2025")>
<Assembly: AssemblyTrademark("2.8.1.0")>
<Assembly: AssemblyTrademark("2.9.3.0")>
<Assembly: ComVisible(False)>
@@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben:
<Assembly: AssemblyVersion("2.9.1.0")>
<Assembly: AssemblyFileVersion("2.9.1.0")>
<Assembly: AssemblyVersion("2.9.4.0")>
<Assembly: AssemblyFileVersion("2.9.4.0")>

View File

@@ -8,6 +8,7 @@ Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Interfaces
Imports DigitalData.Modules.Interfaces.Exceptions
Imports DigitalData.Modules.Interfaces.PropertyValues
Imports DigitalData.Modules.Jobs.Exceptions
Imports DigitalData.Modules.Logging
@@ -93,7 +94,7 @@ Public Class ImportZUGFeRDFiles
_zugferd = New ZUGFeRDInterface(_logConfig, _gdpictureLicenseKey, New ZUGFeRDInterface.ZugferdOptions() With {
.AllowFacturX_Filename = oArgs.AllowFacturX,
.AllowXRechnung_Filename = oArgs.AllowXRechnung,
.AllowPeppol_3017_Schema = oArgs.AllowPeppolBISBill3x
.AllowPeppol_3_x_Schema = oArgs.AllowPeppolBISBill3x
})
_logger.Debug("Starting Job {0}", [GetType].Name)
@@ -686,12 +687,54 @@ Public Class ImportZUGFeRDFiles
_logger.Debug("No missing properties found. Continuing.")
End If
' Daten in die Datenbank speichern
If BulkInsertDataToDatabase(pMessageId, pDocument, pConnections, oCheckResult) = False Then
_logger.Error("Bulk Insert for MessageId [{0}] failed!", pMessageId)
Throw New Exception("Bulk Insert failed! Exiting.")
End If
' TODO hier BAUSTELLE
' Eingebettete Dateien speichern
'If CreateEmbeddedFilesOnDisk(pMessageId, pDocument, pConnections, oCheckResult) = False Then
' _logger.Debug("Files saving for MessageId [{0}] failed!", pMessageId)
'End If
Return True
End Function
Private Function CreateEmbeddedFilesOnDisk(pMessageId As String, pDocument As ZUGFeRDInterface.ZugferdResult, pConnections As DatabaseConnections, pCheckResult As CheckPropertyValuesResult) As Boolean
' Finde alle Eintraege in pCheckResult mit Item_Type=3
' Finde Dateinamen (Index nach ~attm) und Dateityp. Wir speichern nur PDF.
' TODO Funktion aufrufen
'SaveBase64ToDisk("", "") = False Then
Return True
End Function
Private Function SaveBase64ToDisk(pExportFilePath As String, pBase64String As String) As Boolean
Try
Dim base64BinaryDataString As String = pBase64String ' Hier Base64-String einfügen
Dim binaryDataString As Byte() = System.Convert.FromBase64String(base64BinaryDataString)
Dim oFilename As String = pExportFilePath
Dim Stream As System.IO.FileStream = New System.IO.FileStream(oFilename, System.IO.FileMode.Create)
Stream.Write(binaryDataString, 0, binaryDataString.Length)
Stream.Close()
Catch ex As Exception
_logger.Error("Could NOT save File to Disk for MessageId [{0}] !", pExportFilePath)
End Try
Return True
End Function
Private Function BulkInsertDataToDatabase(pMessageId As String, pDocument As ZUGFeRDInterface.ZugferdResult, pConnections As DatabaseConnections, pCheckResults As CheckPropertyValuesResult) As Boolean
If DeleteExistingPropertyValues(pMessageId, pConnections) = False Then
Throw New Exception("Could not cleanup data. Exiting.")
End If
' DataTable vorbereiten
Dim oDataTable As DataTable = FillDataTable(pMessageId, oCheckResult, pDocument)
Dim oDataTable As DataTable = FillDataTable(pMessageId, pCheckResults, pDocument)
' ColumnList initialisieren
Dim oColumnNames As List(Of String) = New List(Of String) From {
@@ -714,6 +757,7 @@ Public Class ImportZUGFeRDFiles
Return True
End Function
Private Function FillDataTable(pMessageId As String, pCheckResult As PropertyValues.CheckPropertyValuesResult, pDocument As ZUGFeRDInterface.ZugferdResult) As DataTable
Dim oDataTable As DataTable = New DataTable()
@@ -762,6 +806,11 @@ Public Class ImportZUGFeRDFiles
For Each oProperty In pCheckResult.ValidProperties
' ItemType = 3 => eingebettete Datei, nicht den base64 speichern
If oProperty.ItemType = 3 Then
Continue For
End If
' If GroupCounter is -1, it means this is a default property that can only occur once.
' Set the actual inserted value to 0
Dim oGroupCounterValue As Integer = oProperty.GroupCounter

View File

@@ -87,6 +87,7 @@ Public Class XRechnungViewDocument
Dim oIndex As Integer = 0
Dim oYPlus As Integer = 0
Dim oCreateTextBox As Boolean = False
Dim oPosRowY As Integer = 0
For Each oRow As DataRow In pDTItemValues.Rows
Dim Y_eq_lastrow As Boolean = CBool(oRow.Item("Y_eq_lastrow"))
Dim oRowCaption As String = oRow.Item("Row_Caption")
@@ -129,27 +130,30 @@ Public Class XRechnungViewDocument
If oArea = "TYPE" Then
oAREACaption = $"{Return_InvType(oItemValue)} [{oItemValue}]"
ElseIf oArea = "SELLER" Then
oAREACaption = "Verkäufer / Seller:"
oAREACaption = "Verkäufer/Seller:"
ElseIf oArea = "BUYER" Then
oAREACaption = "Käufer / Buyer:"
oAREACaption = "Käufer/Buyer:"
ElseIf oArea = "POSITION" Then
oAREACaption = "Positionen / Positions:"
oAREACaption = "Positionen/Positions:"
oIsPosition = True
ElseIf oArea = "AMOUNT" Then
oAREACaption = "Beträge / Amounts:"
oAREACaption = "Beträge/Amounts:"
oCreateTextBox = True
ElseIf oArea = "TAXPOS" Then
oAREACaption = "Steuerbeträge / Tax amounts:"
oAREACaption = "Steuerbeträge/Tax amounts:"
oIsPosition = True
ElseIf oArea = "PAYMENT" Then
oAREACaption = "Zahlungsinformationen / Payment details:"
oAREACaption = "Zahlungsinformationen/Payment details:"
ElseIf oArea = "EXEMPTION" Then
oAREACaption = "UST.-Befreiungsgrund / Exemption reason:"
oAREACaption = "USt.-Befreiungsgrund/Exemption reason:"
Else
oAREACaption = String.Empty
End If
If Not oAREACaption = String.Empty Then
If oArea = "AMOUNT" Then
Dim oY = yPosition
End If
'erste Area-Linie
yPosition += 5
MyGDPicturePDF.DrawLine(10, yPosition, oWidthLine, yPosition)
@@ -186,20 +190,12 @@ Public Class XRechnungViewDocument
oIsPosition = True
If oItemSPECNAME = "INVOICE_POSITION_AMOUNT" Then
oPosCount += 1
'oPosTerm = $"{oPosCount}. {oItemValue} * "
'oItemValue = oPosTerm
'Tabellendarstellung
oPosTerm = ""
oPosRowY = yPosition
MyGDPicturePDF.DrawText(fontResName, 10, yPosition, oPosCount)
'
'Dim otextBoxYPos As Integer = yPosition - 3.5
'MyGDPicturePDF.DrawTextBox(fontResName, 10, otextBoxYPos, 16, YCoo_TextBoxPlus5(otextBoxYPos),
' TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentNear,
' oPosCount)
MyGDPicturePDF.DrawText(fontResName, 19, yPosition, oItemValue)
'Tabellendarstellung Ende
oDisplay = False
' yPosition -= 5
End If
ElseIf oArea = "TAXPOS" Then
oIsPosition = True
@@ -215,21 +211,17 @@ Public Class XRechnungViewDocument
Else
'INDIVIDUELLES VERHALTEN BEI Folge-ITEMS
_logger.Debug($"FollowItem - Area: [{oArea}] - ItemSpecname: [{oItemSPECNAME}] - ItemValue: [{oItemValue}]")
Dim otextBoxYPos As Integer
'Dim otextBoxYPos As Integer
If oArea = "POSITION" Then
If oItemSPECNAME = "INVOICE_POSITION_AMOUNT" Then
oPosCount += 1
oYPlus = 0
'Tabellendarstellung
yPosition += 5
oYPlus = 0
oPosTerm = ""
MyGDPicturePDF.DrawText(fontResName, 10, yPosition, oPosCount)
'otextBoxYPos = yPosition - 3.5
'MyGDPicturePDF.DrawTextBox(fontResName, 10, otextBoxYPos, 16, YCoo_TextBoxPlus5(otextBoxYPos),
' TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentNear,
' oPosCount)
oPosRowY = yPosition
MyGDPicturePDF.DrawText(fontResName, 19, yPosition, oItemValue)
'Tabellendarstellung Ende
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_POSITION_UNIT_TYPE" Then
oYPlus = 0
@@ -237,11 +229,11 @@ Public Class XRechnungViewDocument
MyGDPicturePDF.DrawText(fontResName, 35, yPosition, oUnit)
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_POSITION_ARTICLE" Then
'Tabellendarstellung
oYPlus = 0
oPosDesc = ""
oPosDesc = oItemValue
Dim oYDyn As Integer = yPosition - 5
Dim oPartsNL As List(Of String) = StringFunctions.SplitTextByNewLine(oItemValue)
For Each olinepart As String In oPartsNL
Dim oParts As List(Of String) = StringFunctions.SplitText_Length(olinepart, 67)
@@ -252,14 +244,15 @@ Public Class XRechnungViewDocument
MyGDPicturePDF.DrawText(fontResName, 50, oYDyn, part)
Next
Next
'Tabellendarstellung Ende
' oPosTerm += $" {oItemValue}"
yPosition = oYDyn
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_POSITION_NOTE" Then
'Tabellendarstellung
Dim cleanedText As String = RemoveNewlinesAndTabs(oItemValue)
Dim oParts As List(Of String) = StringFunctions.SplitText_Length(cleanedText, 70)
' Durchlaufen der einzelnen Teile in einer Schleife
ElseIf oItemSPECNAME = "INVOICE_POSITION_ARTICLE_DESCRIPTION" Or
oItemSPECNAME = "INVOICE_POSITION_NOTE" Then
_logger.Debug($"oItemSPECNAME: {oItemSPECNAME}")
'Dim cleanedText As String = RemoveNewlinesAndTabs(oItemValue)
'Dim oParts As List(Of String) = StringFunctions.SplitText_Length(cleanedText, 70)
'' Durchlaufen der einzelnen Teile in einer Schleife
Dim oYDyn As Integer = yPosition
Dim oPartsNL As List(Of String) = StringFunctions.SplitTextByNewLine(oItemValue)
For Each olinepart As String In oPartsNL
@@ -271,33 +264,30 @@ Public Class XRechnungViewDocument
MyGDPicturePDF.DrawText(fontResName, 50, oYDyn, part)
Next
Next
yPosition = oYDyn
'oPosTerm += $" {oItemValue}"
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_TAXPOS_TAX_RATE" Or oItemSPECNAME = "INVOICE_TAXPOS_RATE" Then
'Tabellendarstellung
MyGDPicturePDF.DrawText(fontResName, 164, yPosition, $"{oItemValue} %")
'Tabellendarstellung ENDE
' oPosTerm += $" - {oItemValue} %"
MyGDPicturePDF.DrawText(fontResName, 164, oPosRowY, $"{oItemValue} %")
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_POSITION_TAX_AMOUNT" Then
' oPosTerm += $" - {oItemValue} {oCurrencySymbol}"
'Tabellendarstellung
Dim oYPos = yPosition - 3.5
Dim TAXTERM = $"{oItemValue} {oCurrencySymbol}"
Dim oYPos = oPosRowY - 3.5
Dim oBetrag As Decimal = oItemValue
Dim oFormatiert As String = oBetrag.ToString("N2", New Globalization.CultureInfo("de-DE"))
Dim TAXTERM = $"{oFormatiert} {oCurrencySymbol}"
MyGDPicturePDF.DrawTextBox(fontResName, 177, oYPos, 198, YCoo_TextBoxPlus5(oYPos),
TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentNear,
TAXTERM)
' MyGDPicturePDF.DrawText(fontResName, 180, yPosition, $"{oItemValue} {oCurrencySymbol}")
'Tabellendarstellung Ende
oDisplay = False
End If
oItemValue = oPosTerm
ElseIf oArea = "HEAD" Then
If oItemSPECNAME = "INVOICE_DATE" Or oItemSPECNAME = "INVOICE_SERVICE_DATE" Then
Dim oDateString As String = oItemValue
Dim oParsedDate As DateTime = DateTime.ParseExact(oDateString, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture)
oItemValue = oParsedDate.ToString("dd.MM.yyyy")
oItemValue = StringFunctions.DatetimeStringToGermanStringConverter(oItemValue, _logger)
End If
ElseIf oArea = "TAXPOS" Then
If oItemSPECNAME = "INVOICE_TAXPOS_RATE" Then
@@ -305,7 +295,10 @@ Public Class XRechnungViewDocument
oPosTerm = $"{oItemValue} %:"
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_TAXPOS_AMOUNT" Then
oPosTerm += $" {oItemValue} {oCurrencySymbol}"
Dim oBetrag As Decimal = oItemValue
Dim oFormatiert As String = oBetrag.ToString("N2", New Globalization.CultureInfo("de-DE"))
oFormatiert += $" {oCurrencySymbol}"
oPosTerm += $" {oFormatiert}"
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_TAXPOS_TYPE" Then
oPosTerm += $" {oItemValue}"
@@ -322,7 +315,10 @@ Public Class XRechnungViewDocument
End If
If oArea = "AMOUNT" Then
If oItemSPECNAME = "INVOICE_TOTAL_TAX" Or oItemSPECNAME = "INVOICE_TOTAL_NET" Or oItemSPECNAME = "INVOICE_TOTAL_GROSS" Then
oItemValue += $" {oCurrencySymbol}"
Dim oBetrag As Decimal = oItemValue
Dim oFormatiert As String = oBetrag.ToString("N2", New Globalization.CultureInfo("de-DE"))
oFormatiert += $" {oCurrencySymbol}"
oItemValue = oFormatiert
End If
End If
@@ -366,12 +362,12 @@ Public Class XRechnungViewDocument
End If
End If
Else
'Tabellendarstellung
If oItemSPECNAME = "INVOICE_POSITION_TAX_AMOUNT" And oYPlus > 0 Then
yPosition += oYPlus - 5
End If
'Tabellendarstellung Ende
'Else
' 'Tabellendarstellung
' If oItemSPECNAME = "INVOICE_POSITION_TAX_AMOUNT" And oYPlus > 0 Then
' yPosition += oYPlus - 5
' End If
' 'Tabellendarstellung Ende
End If
oIndex += 1
Next

View File

@@ -44,6 +44,10 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
@@ -121,12 +125,6 @@
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' '$(ProjectName)' }"</PostBuildEvent>

View File

@@ -5,6 +5,7 @@ Imports Limilabs.Client
Imports Limilabs.Client.IMAP
Imports Limilabs.Client.SMTP
Imports Microsoft.Identity.Client
Imports NLog
Namespace Mail
Public Class MailSession
@@ -18,6 +19,7 @@ Namespace Mail
Public Const AUTH_SSLTLS = "SSL/TLS"
Public Const AUTH_NONE = "NONE"
Public Const AUTH_OAUTH2 = "OAUTH2"
Public Const SSLProtocol_TLS12 = "TLS12"
Private Const SMTP_IGNORED_ERRORS As SslPolicyErrors =
SslPolicyErrors.RemoteCertificateChainErrors Or ' self-signed
@@ -78,12 +80,14 @@ Namespace Mail
.AuthType = pAuthType
}
Logger.Debug("Connecting to Server..")
Logger.Debug("ConnectToServerWithBasicAuth..")
Logger.Debug("Server: [{0}]", oSession.Server)
Logger.Debug("Port: [{0}]", oSession.Port)
Logger.Debug("User: [{0}]", oSession.User)
Logger.Debug("AuthType: [{0}]", oSession.AuthType)
Logger.Debug($"_Config.TlsVersion.EnableTls1_1 = [{pOptions.EnableTls1_1}]")
Logger.Debug($"_Config.TlsVersion.EnableTls1_2 = [{pOptions.EnableTls1_2}]")
Logger.Debug($"_Config.TlsVersion.EnableDefault = [{pOptions.EnableDefault}]")
_Session = oSession
Logger.Debug("Initializing Connection with Auth type [{0}].", oSession.AuthType)
@@ -128,16 +132,14 @@ Namespace Mail
' Set TLS Version manually if requested
If pOptions.EnableTls1_1 Then
Logger.Debug("Enabling TLS Version 1.1")
Logger.Debug("Enabling TLS Version 1.1...")
Client.SSLConfiguration.EnabledSslProtocols = Client.SSLConfiguration.EnabledSslProtocols Or Security.Authentication.SslProtocols.Tls11
End If
If pOptions.EnableTls1_2 Then
Logger.Debug("Enabling TLS Version 1.2")
Client.SSLConfiguration.EnabledSslProtocols = Client.SSLConfiguration.EnabledSslProtocols Or Security.Authentication.SslProtocols.Tls12
Logger.Debug("Enabling TLS Version 1.2...")
Client.SSLConfiguration.EnabledSslProtocols = Security.Authentication.SslProtocols.Tls12
End If
' This is not available in .NET 4.6.2, only in .NET 4.7/4.8
'If pOptions.EnableTls1_3 Then
' Logger.Debug("Enabling TLS Version 1.3")
' oSession.SSLConfiguration.EnabledSslProtocols = oSession.SSLConfiguration.EnabledSslProtocols Or Security.Authentication.SslProtocols.Tls13
@@ -189,7 +191,9 @@ Namespace Mail
ElseIf Session.AuthType = AUTH_SSLTLS Or Session.AuthType = AUTH_STARTTLS Then
Try
Logger.Debug("Client.SSLConfiguration.EnabledSslProtocols is [{0}]", Client.SSLConfiguration.EnabledSslProtocols.ToString)
If pSession.Port = 993 Then
Logger.Debug("Port is 993 - So Client.ConnectSSL will be used!")
Logger.Debug("Connecting with [STARTTLS/ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port)
Client.ConnectSSL(pSession.Server, pSession.Port)
Else

View File

@@ -44,8 +44,13 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Base, Version=1.3.9.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Mail">
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll</HintPath>
@@ -138,12 +143,6 @@
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Base\Base.vbproj">
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
<Name>Base</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="MailLicense.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.9.8.0")>
<Assembly: AssemblyFileVersion("1.9.8.0")>
<Assembly: AssemblyVersion("2.0.0.0")>
<Assembly: AssemblyFileVersion("2.0.0.0")>

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
<package id="Microsoft.Identity.Client" version="4.55.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Abstractions" version="6.22.0" targetFramework="net462" />
<package id="NLog" version="5.0.5" targetFramework="net461" />

View File

@@ -33,8 +33,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ZooFlow", "ZooFlow\ZooFlow.
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Messaging", "Messaging\Messaging.vbproj", "{AF664D85-0A4B-4BAB-A2F8-83110C06553A}"
EndProject
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Database.Test", "Database.Test\Database.Test.vbproj", "{91B4DFC0-543C-43A7-A9E0-6817DCA277EC}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Filesystem", "Filesystem\Filesystem.vbproj", "{991D0231-4623-496D-8BD0-9CA906029CBC}"
EndProject
Global
@@ -103,10 +101,6 @@ Global
{AF664D85-0A4B-4BAB-A2F8-83110C06553A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF664D85-0A4B-4BAB-A2F8-83110C06553A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF664D85-0A4B-4BAB-A2F8-83110C06553A}.Release|Any CPU.Build.0 = Release|Any CPU
{91B4DFC0-543C-43A7-A9E0-6817DCA277EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91B4DFC0-543C-43A7-A9E0-6817DCA277EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91B4DFC0-543C-43A7-A9E0-6817DCA277EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91B4DFC0-543C-43A7-A9E0-6817DCA277EC}.Release|Any CPU.Build.0 = Release|Any CPU
{991D0231-4623-496D-8BD0-9CA906029CBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{991D0231-4623-496D-8BD0-9CA906029CBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{991D0231-4623-496D-8BD0-9CA906029CBC}.Release|Any CPU.ActiveCfg = Release|Any CPU

View File

@@ -13,6 +13,11 @@ Namespace Modules
Public Const INT_VALUE_DOMAIN = "DOMAIN"
Public Const INT_VALUE_DATE = "DATE"
Public Const INT_VALUE_FILENAME_EXT = "FILENAME_EXT"
Public Const INT_VALUE_FILENAME = "FILENAME_ONLY"
Public Const INT_VALUE_FILE_DATE = "FILE_DATE"
Public Const INT_VALUE_FILEEXT = "FILE_EXT"
Public Const INT_VALUE_DATE_YYYY = "YYYY"
Public Const INT_VALUE_DATE_MM = "MM"
Public Const INT_VALUE_DATE_DD = "DD"

View File

@@ -1,4 +1,5 @@
Imports System.Text.RegularExpressions
Imports System.IO
Imports System.Text.RegularExpressions
Imports System.Windows.Forms
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.ZooFlow
@@ -36,6 +37,12 @@ Public Class ClassPatterns
Public Const INT_VALUE_DOMAIN = "DOMAIN"
Public Const INT_VALUE_DATE = "DATE"
Public Const INT_VALUE_FILENAME_EXT = "FILENAME_EXT"
Public Const INT_VALUE_FILENAME = "FILENAME"
Public Const INT_VALUE_FILEEXT = "FILE_EXT"
Public Const INT_VALUE_FILE_DATE = "FILE_DATE"
Public Const CLIPBOARD_VALUE_DE = "@Zwischenablage"
Public Const CLIPBOARD_VALUE_EN = "@Clipboard"
@@ -44,6 +51,7 @@ Public Class ClassPatterns
Public Const MAX_TRY_COUNT = 100
Public _handled_File As String = Nothing
Public ReadOnly Property PatternRegex As Regex
Get
@@ -132,6 +140,45 @@ Public Class ClassPatterns
oResult = ReplacePattern(oResult, PATTERN_INT, Now.ToShortDateString)
End While
While ContainsPatternAndValue(oResult, PATTERN_INT, INT_VALUE_FILENAME_EXT)
If Not IsNothing(_handled_File) Then
If File.Exists(_handled_File) Then
Dim oFileName As String = Path.GetFileName(_handled_File)
oResult = ReplacePattern(oResult, PATTERN_INT, oFileName)
End If
End If
End While
While ContainsPatternAndValue(oResult, PATTERN_INT, INT_VALUE_FILENAME)
If Not IsNothing(_handled_File) Then
If File.Exists(_handled_File) Then
Dim oFileName As String = Path.GetFileNameWithoutExtension(_handled_File)
oResult = ReplacePattern(oResult, PATTERN_INT, oFileName)
End If
End If
End While
While ContainsPatternAndValue(oResult, PATTERN_INT, INT_VALUE_FILEEXT)
If Not IsNothing(_handled_File) Then
If File.Exists(_handled_File) Then
Dim oFileExt As String = Path.GetExtension(_handled_File).Substring(1)
oResult = ReplacePattern(oResult, PATTERN_INT, oFileExt)
End If
End If
End While
While ContainsPatternAndValue(oResult, PATTERN_INT, INT_VALUE_FILE_DATE)
If Not IsNothing(_handled_File) Then
If File.Exists(_handled_File) Then
Dim oCreationDate As DateTime = File.GetCreationTime(_handled_File)
Dim oDateOnlyString As String = oCreationDate.ToString("yyyy-MM-dd")
oResult = ReplacePattern(oResult, PATTERN_INT, oDateOnlyString)
End If
End If
End While
Return oResult
Catch ex As Exception
_Logger.Error(ex)

View File

@@ -56,6 +56,10 @@
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.ZooFlow, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ZooFlow\bin\Debug\DigitalData.Modules.ZooFlow.dll</HintPath>
</Reference>
<Reference Include="Interop.WINDREAMLib">
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
@@ -144,12 +148,6 @@
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ZooFlow\ZooFlow.vbproj">
<Project>{81cac44f-3711-4c8f-ae98-e02a7448782a}</Project>
<Name>ZooFlow</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>

View File

@@ -183,6 +183,7 @@ Public Class Helpers
Return Convert.ToDateTime(pValue)
End If
Case INDEX_TYPE_FLOAT
pValue = pValue.Replace(".", ",")
If pValue = DELETE_ATTRIBUTE_VALUE Then
Return Nothing
Else

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.9.7.0")>
<Assembly: AssemblyFileVersion("1.9.7.0")>
<Assembly: AssemblyVersion("1.9.8.0")>
<Assembly: AssemblyFileVersion("1.9.8.0")>

View File

@@ -700,7 +700,7 @@ Public Class Windream
End Try
End Function
Public Function NewFileStream(ByVal FilenameSource As String, ByVal FilenameTarget As String, ByVal WMObjecttypeName As String) As Boolean
Public Function NewFileStream(ByVal FilenameSource As String, ByVal FilenameTarget As String, ByVal WMObjecttypeName As String, pisGUI As Boolean) As Boolean
NewDocumentID = 0
@@ -712,7 +712,7 @@ Public Class Windream
FilenameTarget = GetNormalizedPath(FilenameTarget, True)
_logger.Debug($"Preparing to stream file from {FilenameSource} to {FilenameTarget}")
_logger.Debug($"Preparing to stream file from [{FilenameSource}] to [{FilenameTarget}]")
Dim oWMObject As IWMObject6 = Nothing
Dim oFileIO As WMFileIO
@@ -725,9 +725,16 @@ Public Class Windream
Try
' GetNewWMObjectFS already locks the WMObject
_logger.Debug("Creating WMObject for file {0}", FilenameTarget)
_logger.Debug("Creating WMObject for file [{0}]", FilenameTarget)
oWMObject = Session.GetNewWMObjectFS(WMEntityDocument, FilenameTarget, WMObjectEditModeObject)
Catch ex As Exception
If ex.Message.Contains("Filename exists!") Then
Dim oMsg = $"Could not create a windream - object - A folder or file with the same name already exists in the folder [{oTargetDrive}]"
_logger.Warn(oMsg)
If pisGUI = True Then
MsgBox(oMsg, MsgBoxStyle.Critical, "Error in creating windream-object")
End If
End If
_logger.Error(ex, "WMObject could not be created")
Return False
End Try

View File

@@ -44,8 +44,13 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Base, Version=1.3.8.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Interop.WINDREAMLib">
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll</HintPath>
@@ -135,12 +140,6 @@
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Base\Base.vbproj">
<Project>{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}</Project>
<Name>Base</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<COMReference Include="WMOBRWSLib">
<Guid>{25B51999-6DCA-11D4-B815-00104BB52DEA}</Guid>

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DigitalData.Modules.Logging" version="2.6.5" targetFramework="net462" />
<package id="NLog" version="5.0.5" targetFramework="net461" />
</packages>

View File

@@ -44,6 +44,18 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DigitalData.Modules.Database, Version=2.3.5.4, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.EDMI.API, Version=1.6.1.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\EDMIAPI\bin\Debug\DigitalData.Modules.EDMI.API.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
@@ -124,18 +136,6 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Database\Database.vbproj">
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
<Name>Database</Name>
</ProjectReference>
<ProjectReference Include="..\EDMIAPI\EDMI.API.vbproj">
<Project>{25017513-0d97-49d3-98d7-ba76d9b251b0}</Project>
<Name>EDMI.API</Name>
</ProjectReference>
<ProjectReference Include="..\Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
<ProjectReference Include="..\Windows\Windows.vbproj">
<Project>{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}</Project>
<Name>Windows</Name>