ZUGFeRD Service: Auswertung der XML-Konfiguration geändert & ZUGFeRD 2.3.x-Anpassungen
This commit is contained in:
parent
72315ec28b
commit
a40fbe31f9
@ -71,6 +71,8 @@
|
|||||||
|
|
||||||
Public Property AllowZugferd2x As Boolean = True
|
Public Property AllowZugferd2x As Boolean = True
|
||||||
|
|
||||||
|
Public Property AllowZugferd23x As Boolean = True
|
||||||
|
|
||||||
Public Property AllowPeppolBISBill3x As Boolean = False
|
Public Property AllowPeppolBISBill3x As Boolean = False
|
||||||
End Class
|
End Class
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -52,13 +52,14 @@ Public Class ThreadRunner
|
|||||||
.AllowXRechnung = _config.Config.Custom.AllowXRechnung,
|
.AllowXRechnung = _config.Config.Custom.AllowXRechnung,
|
||||||
.AllowZugferd10 = _config.Config.Custom.AllowZugferd10,
|
.AllowZugferd10 = _config.Config.Custom.AllowZugferd10,
|
||||||
.AllowZugferd2x = _config.Config.Custom.AllowZugferd2x,
|
.AllowZugferd2x = _config.Config.Custom.AllowZugferd2x,
|
||||||
|
.AllowZugferd23x = _config.Config.Custom.AllowZugferd23x,
|
||||||
.AllowPeppolBISBill3x = _config.Config.Custom.AllowPeppolBISBill3x,
|
.AllowPeppolBISBill3x = _config.Config.Custom.AllowPeppolBISBill3x,
|
||||||
.RejectionTemplateId = _config.Config.Custom.RejectionTemplateId,
|
.RejectionTemplateId = _config.Config.Custom.RejectionTemplateId,
|
||||||
.GDPictureVersion = _config.Config.Custom.GDPictureVersion
|
.GDPictureVersion = _config.Config.Custom.GDPictureVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
oArgs = LoadFolderConfig(oArgs)
|
oArgs = LoadFolderConfig(oArgs)
|
||||||
oArgs = LoadPropertyMap(oArgs)
|
oArgs = LoadPropertyMapListFor(oArgs)
|
||||||
|
|
||||||
_logger.Debug("Custom Options:")
|
_logger.Debug("Custom Options:")
|
||||||
_logger.Debug("ExceptionEmailAddress: [{0}]", oArgs.ExceptionEmailAddress)
|
_logger.Debug("ExceptionEmailAddress: [{0}]", oArgs.ExceptionEmailAddress)
|
||||||
@ -171,36 +172,44 @@ Public Class ThreadRunner
|
|||||||
Return pArgs
|
Return pArgs
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function LoadPropertyMap(pArgs As WorkerArgs) As WorkerArgs
|
Private Function LoadPropertyMapListFor(Args As WorkerArgs) As WorkerArgs
|
||||||
Dim oSQL As String = $"SELECT * FROM TBDD_ZUGFERD_XML_ITEMS WHERE ACTIVE = 1 ORDER BY XML_PATH"
|
Try
|
||||||
Dim oResult As DataTable = _mssql.GetDatatable(oSQL)
|
Args.PropertyMapList.Clear()
|
||||||
|
|
||||||
For Each oRow As DataRow In oResult.Rows
|
Dim oSQL As String = $"SELECT * FROM TBDD_ZUGFERD_XML_ITEMS WHERE ACTIVE = 1 ORDER BY XML_PATH"
|
||||||
Dim oXmlPath As String = oRow.Item("XML_PATH")
|
Dim oResult As DataTable = _mssql.GetDatatable(oSQL)
|
||||||
Dim oTableName = oRow.Item("TABLE_NAME")
|
|
||||||
Dim oTableColumn = oRow.Item("TABLE_COLUMN")
|
|
||||||
Dim oDescription = oRow.Item("DESCRIPTION")
|
|
||||||
Dim oIsRequired = oRow.Item("IS_REQUIRED")
|
|
||||||
Dim oIsGrouped = oRow.Item("IS_GROUPED")
|
|
||||||
Dim oGroupScope = oRow.Item("GROUP_SCOPE")
|
|
||||||
Dim oSpecification = oRow.Item("SPECIFICATION")
|
|
||||||
Dim oItemType = oRow.Item("ITEM_TYPE")
|
|
||||||
Dim oEN16931Value = oRow.Item("EN16931_ID")
|
|
||||||
|
|
||||||
pArgs.PropertyMap.Add(oXmlPath, New XmlItemProperty() With {
|
For Each oRow As DataRow In oResult.Rows
|
||||||
.Description = oDescription,
|
Dim xmlPath As String = oRow.Item("XML_PATH")
|
||||||
.TableName = oTableName,
|
Dim tableName = oRow.Item("TABLE_NAME")
|
||||||
.TableColumn = oTableColumn,
|
Dim tableColumn = oRow.Item("TABLE_COLUMN")
|
||||||
.IsRequired = oIsRequired,
|
Dim description = oRow.Item("DESCRIPTION")
|
||||||
.IsGrouped = oIsGrouped,
|
Dim isRequired = oRow.Item("IS_REQUIRED")
|
||||||
.GroupScope = oGroupScope,
|
Dim isGrouped = oRow.Item("IS_GROUPED")
|
||||||
.Specification = oSpecification,
|
Dim groupScope = oRow.Item("GROUP_SCOPE")
|
||||||
.XMLPath = oXmlPath.Replace(".Value", ""),
|
Dim specification = oRow.Item("SPECIFICATION")
|
||||||
.ItemType = oItemType,
|
Dim oItemType = oRow.Item("ITEM_TYPE")
|
||||||
.EN16931_ID = oEN16931Value
|
Dim oEN16931_ID = oRow.Item("EN16931_ID")
|
||||||
})
|
|
||||||
Next
|
|
||||||
|
|
||||||
Return pArgs
|
Args.PropertyMapList.Add(New XmlItemProperty() With {
|
||||||
|
.XMLPath = xmlPath,
|
||||||
|
.Description = description,
|
||||||
|
.TableName = tableName,
|
||||||
|
.TableColumn = tableColumn,
|
||||||
|
.IsRequired = isRequired,
|
||||||
|
.IsGrouped = isGrouped,
|
||||||
|
.GroupScope = groupScope,
|
||||||
|
.Specification = specification,
|
||||||
|
.ItemType = oItemType,
|
||||||
|
.EN16931_ID = oEN16931_ID
|
||||||
|
})
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return Args
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Error(ex)
|
||||||
|
Return Args
|
||||||
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user