diff --git a/GUIs.Test.ZUGFeRDTest/Form1.vb b/GUIs.Test.ZUGFeRDTest/Form1.vb index 04f9e3b0..969395d0 100644 --- a/GUIs.Test.ZUGFeRDTest/Form1.vb +++ b/GUIs.Test.ZUGFeRDTest/Form1.vb @@ -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) diff --git a/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs b/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs index 63f32be8..c9254fda 100644 --- a/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs +++ b/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs @@ -68,7 +68,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 +86,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,7 +380,13 @@ 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; + } + 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)";