From 1ccd5a4872e917e7d6b92e0a1788312762966974 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 17 Nov 2022 14:29:08 +0100 Subject: [PATCH] Add new config options for facturx and xrechnung --- Services.ZUGFeRDService/Config.vb | 4 ++++ Services.ZUGFeRDService/ThreadRunner.vb | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Services.ZUGFeRDService/Config.vb b/Services.ZUGFeRDService/Config.vb index 1281e170..26f2b27e 100644 --- a/Services.ZUGFeRDService/Config.vb +++ b/Services.ZUGFeRDService/Config.vb @@ -34,6 +34,10 @@ Public Property RejectionTransferEnabled As Boolean = True Public Property RejectionTransferTimeUnit As String = "HOUR" Public Property RejectionTransferTimeValue As Integer = 12 + + Public Property AllowFacturX As Boolean = True + Public Property AllowXRechnung As Boolean = True + End Class Public Class FirebirdConfig diff --git a/Services.ZUGFeRDService/ThreadRunner.vb b/Services.ZUGFeRDService/ThreadRunner.vb index 1a2a7e44..8897e943 100644 --- a/Services.ZUGFeRDService/ThreadRunner.vb +++ b/Services.ZUGFeRDService/ThreadRunner.vb @@ -50,8 +50,12 @@ Public Class ThreadRunner .ExceptionEmailAddress = _config.Config.ExceptionEmailAddress, .IgnoreRejectionStatus = _config.Config.Custom.IgnoreRejectionStatus, .MaxAttachmentSizeInMegaBytes = _config.Config.Custom.MaxAttachmentSizeInMegaBytes, - .NamePortal = _config.Config.PORTAL_NAME + .NamePortal = _config.Config.PORTAL_NAME, + .EmailOutProfileId = _config.Config.MSSQLEmailOutAccountID, + .AllowFacturX = _config.Config.Custom.AllowFacturX, + .AllowXRechnung = _config.Config.Custom.AllowXRechnung } + oArgs = LoadFolderConfig(oArgs) oArgs = LoadPropertyMapFor(oArgs, "DEFAULT") @@ -191,7 +195,7 @@ Public Class ThreadRunner Dim oArgs As WorkerArgs = e.Argument _logger.Debug("Background worker running..") - Dim oJob As New ImportZUGFeRDFiles(_logConfig, _firebird, _config.Config.MSSQLEmailOutAccountID, _config.Config.PORTAL_NAME, _mssql) + Dim oJob As New ImportZUGFeRDFiles(_logConfig, _firebird, _mssql) oJob.Start(oArgs) Catch ex As Exception _logger.Warn("Background worker failed!")