Compare commits

...

12 Commits

Author SHA1 Message Date
7816f7ff8a Merge branch 'master' of http://git.dd:3000/AppStd/Monorepo 2025-07-01 10:26:30 +02:00
62322d1abe Merge Commit 2025-07-01 10:26:22 +02:00
ab82f41907 ZUGFeRDService: Version 2.9.1.0 2025-07-01 10:15:47 +02:00
9ff1d7d0f0 BT-Felder 2025-06-27 12:40:32 +02:00
b77e7b0563 Korrektur der usings 2025-06-10 09:16:14 +02:00
43e0c8c565 ZUGFeRD Service: Version 2.9.0.0 2025-06-05 10:55:54 +02:00
00aeb52cdd Aktualisierungen 2025-06-05 10:53:59 +02:00
OlgunR
5001002ab8 Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/Monorepo 2025-06-03 16:40:32 +02:00
OlgunR
8918b543de Überladung durch optionalen Parameter ersetzt - DocumentViewer 2025-06-03 16:40:17 +02:00
8cef48ea8e Merge branch 'master' of http://git.dd:3000/AppStd/Monorepo 2025-06-03 15:33:05 +02:00
dfb01f7719 Test-Projekt 2025-06-03 15:33:00 +02:00
a4eec2896e Peppol/UBL konfigurierbar ab sofort
ITEM_TYPE = 3 nicht in Datenbank schreiben
2025-06-03 15:28:37 +02:00
6 changed files with 62 additions and 31 deletions

View File

@ -89,9 +89,14 @@ Public Class DocumentViewer
''' </summary>
''' <param name="pLogConfig">A LogConfig object</param>
''' <param name="pLicenseKey">The GDPicture.NET License Key</param>
Public Function Init(pLogConfig As LogConfig, pLicenseKey As String, pToolbarSettings As ToolbarSettings) As Boolean
Public Function Init(pLogConfig As LogConfig, pLicenseKey As String, Optional pToolbarSettings As ToolbarSettings = Nothing) As Boolean
_logConfig = pLogConfig
_logger = pLogConfig.GetLogger()
If pToolbarSettings Is Nothing Then
pToolbarSettings = New ToolbarSettings
End If
Try
_email = New Email2(pLogConfig)
@ -114,10 +119,6 @@ Public Class DocumentViewer
End Try
End Function
'Public Function Init(pLogConfig As LogConfig, pLicenseKey As String, pToolbarSettings As ToolbarSettings) As Boolean
' Return Init(pLogConfig, pLicenseKey, New ToolbarSettings())
'End Function
''' <summary>
''' Load a file from a path and display it
''' </summary>

View File

@ -1,4 +1,5 @@
Imports System.IO
Imports System.Globalization
Imports System.IO
Imports System.Security.Cryptography
Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Database
@ -191,7 +192,11 @@ Public Class Form1
WriteLog("Valid Properties: [{0}]", oResult2.ValidProperties.Count)
For Each Prop In oResult2.ValidProperties
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value)
If Prop.Value.Length > 250 Then
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value.Substring(0, 250))
Else
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value)
End If
Next
WriteLog("Missing Properties: [{0}]", oResult2.MissingProperties.Count)

View File

@ -53,25 +53,20 @@
<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.Config, Version=1.2.2.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Modules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
<Reference Include="DigitalData.Modules.Config">
<HintPath>..\..\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database, Version=2.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Modules\Config\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Interfaces, Version=1.7.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Modules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
<Reference Include="DigitalData.Modules.Interfaces">
<HintPath>..\..\DDModules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Jobs, Version=1.8.6.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Modules\Jobs\bin\Debug\DigitalData.Modules.Jobs.dll</HintPath>
<Reference Include="DigitalData.Modules.Jobs">
<HintPath>..\..\DDModules\Jobs\bin\Debug\DigitalData.Modules.Jobs.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.5.4.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Modules\Config\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\DDModules\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>
@ -295,7 +290,7 @@
<Import Project="..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets'))" />
</Target>

View File

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

View File

@ -11,6 +11,7 @@ using static DigitalData.Modules.Interfaces.PropertyValues;
using System.Data.SqlClient;
using Microsoft.Extensions.Configuration;
using System.Xml.Linq;
using Newtonsoft.Json.Linq;
namespace ZUGFeRDRESTService.Controllers
{
@ -68,7 +69,7 @@ namespace ZUGFeRDRESTService.Controllers
AllowXRechnung_Filename = _AllowXRechnung,
AllowZugferd_1_0_Schema = _AllowZugferd10,
AllowZugferd_2_x_Schema = _AllowZugferd2x,
AllowPeppol_3017_Schema = _AllowPeppolBISBill3x
AllowPeppol_3_x_Schema = _AllowPeppolBISBill3x
});
_props = new PropertyValues(_logConfig);
@ -86,6 +87,12 @@ namespace ZUGFeRDRESTService.Controllers
Concat(_propertyMap).
ToDictionary(kv => kv.Key, kv => kv.Value);
if (_AllowPeppolBISBill3x == true)
_propertyMap = oPropertyMap.
Where(kv => kv.Value.Specification == UBL_SPEC_21).
Concat(_propertyMap).
ToDictionary(kv => kv.Key, kv => kv.Value);
_logger.Debug("Property Map filtered: [{0}] entries found.", _propertyMap.Count);
_logger.Debug("Validation Controller initialized!");
@ -374,16 +381,39 @@ namespace ZUGFeRDRESTService.Controllers
public bool InsertPropertyMap(ValidProperty pProperty, string pMessageId)
{
try
{
{
if (pProperty.ItemType == 3)
{
// Wir speichern keine Attachment-Werte in die DB
return true;
}
if (pProperty.ItemType == 0 && string.IsNullOrEmpty(pProperty.Value.ToString()))
{
// Leere Texte speichern wir nicht in der DB
return true;
}
var oSql = $"INSERT INTO {pProperty.TableName} " +
"(REFERENCE_GUID, ITEM_DESCRIPTION, ITEM_VALUE, CREATEDWHO, SPEC_NAME, GROUP_COUNTER, IS_REQUIRED) VALUES " +
"(@REFERENCE_GUID, @ITEM_DESCRIPTION, @ITEM_VALUE, @CREATEDWHO, @SPEC_NAME, @GROUP_COUNTER, @IS_REQUIRED)";
string itemValue = string.Empty;
if (pProperty.Value.Length > 900)
{
itemValue = pProperty.Value.Substring(1, 899);
_logger.Warn("Value for field [{0}] is longer than 900 characters, will be truncated!", pProperty.TableColumn);
}
else
{
itemValue = pProperty.Value;
}
var oParams = new SqlParameter[]
{
new SqlParameter("@REFERENCE_GUID", pMessageId),
new SqlParameter("@ITEM_DESCRIPTION", pProperty.Description),
new SqlParameter("@ITEM_VALUE", pProperty.Value),
new SqlParameter("@ITEM_VALUE", itemValue.Replace("'", "''")),
new SqlParameter("@CREATEDWHO", ADDED_WHO),
new SqlParameter("@GROUP_COUNTER", pProperty.GroupCounter),
new SqlParameter("@SPEC_NAME", pProperty.TableColumn),

View File

@ -5,7 +5,6 @@ using Microsoft.Extensions.Configuration;
using System.Collections.Generic;
using System.Data;
using DigitalData.Modules.Logging;
using DigitalData.Modules.Interfaces.Peppol.BISBilling30CreditNote;
using System;
namespace ZUGFeRDRESTService
@ -71,7 +70,8 @@ namespace ZUGFeRDRESTService
IsRequired = (bool)oRow["IS_REQUIRED"],
IsGrouped = (bool)oRow["IS_GROUPED"],
Specification = oRow["SPECIFICATION"].ToString(),
ItemType = oRow["ITEM_TYPE"] != null ? Convert.ToInt32(oRow["ITEM_TYPE"]) : 0
ItemType = oRow["ITEM_TYPE"] != null ? Convert.ToInt32(oRow["ITEM_TYPE"]) : 0,
EN16931_ID = oRow["EN16931_ID"] != null ? oRow["EN16931_ID"].ToString() : "-"
});
}
} else