Korrekturen für ZUGFeRD 2.3x
This commit is contained in:
parent
dbba1c9bae
commit
72315ec28b
@ -32,9 +32,48 @@ Public Class Form1
|
|||||||
_zugferd = New ZUGFeRDInterface(_logConfig, _GDPictureLizenz, New ZUGFeRDInterface.ZugferdOptions)
|
_zugferd = New ZUGFeRDInterface(_logConfig, _GDPictureLizenz, New ZUGFeRDInterface.ZugferdOptions)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function LoadPropertyMapFor(Args As WorkerArgs)
|
'Private Function LoadPropertyMapFor(Args As WorkerArgs)
|
||||||
|
' Try
|
||||||
|
' Args.PropertyMap.Clear()
|
||||||
|
|
||||||
|
' Dim oSQL As String = $"SELECT * FROM TBDD_ZUGFERD_XML_ITEMS WHERE ACTIVE = 1 ORDER BY XML_PATH"
|
||||||
|
' Dim oResult As DataTable = _mssql.GetDatatable(oSQL)
|
||||||
|
|
||||||
|
' For Each oRow As DataRow In oResult.Rows
|
||||||
|
' Dim xmlPath As String = oRow.Item("XML_PATH")
|
||||||
|
' Dim tableName = oRow.Item("TABLE_NAME")
|
||||||
|
' Dim tableColumn = oRow.Item("TABLE_COLUMN")
|
||||||
|
' Dim description = oRow.Item("DESCRIPTION")
|
||||||
|
' Dim isRequired = oRow.Item("IS_REQUIRED")
|
||||||
|
' Dim isGrouped = oRow.Item("IS_GROUPED")
|
||||||
|
' Dim groupScope = oRow.Item("GROUP_SCOPE")
|
||||||
|
' Dim specification = oRow.Item("SPECIFICATION")
|
||||||
|
' Dim oItemType = oRow.Item("ITEM_TYPE")
|
||||||
|
' Dim oEN16931_ID = oRow.Item("EN16931_ID")
|
||||||
|
|
||||||
|
' Args.PropertyMap.Add(xmlPath, New XmlItemProperty() With {
|
||||||
|
' .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
|
||||||
|
|
||||||
|
Private Function LoadPropertyMapListFor(Args As WorkerArgs)
|
||||||
Try
|
Try
|
||||||
Args.PropertyMap.Clear()
|
Args.PropertyMapList.Clear()
|
||||||
|
|
||||||
Dim oSQL As String = $"SELECT * FROM TBDD_ZUGFERD_XML_ITEMS WHERE ACTIVE = 1 ORDER BY XML_PATH"
|
Dim oSQL As String = $"SELECT * FROM TBDD_ZUGFERD_XML_ITEMS WHERE ACTIVE = 1 ORDER BY XML_PATH"
|
||||||
Dim oResult As DataTable = _mssql.GetDatatable(oSQL)
|
Dim oResult As DataTable = _mssql.GetDatatable(oSQL)
|
||||||
@ -51,7 +90,8 @@ Public Class Form1
|
|||||||
Dim oItemType = oRow.Item("ITEM_TYPE")
|
Dim oItemType = oRow.Item("ITEM_TYPE")
|
||||||
Dim oEN16931_ID = oRow.Item("EN16931_ID")
|
Dim oEN16931_ID = oRow.Item("EN16931_ID")
|
||||||
|
|
||||||
Args.PropertyMap.Add(xmlPath, New XmlItemProperty() With {
|
Args.PropertyMapList.Add(New XmlItemProperty() With {
|
||||||
|
.XMLPath = xmlPath,
|
||||||
.Description = description,
|
.Description = description,
|
||||||
.TableName = tableName,
|
.TableName = tableName,
|
||||||
.TableColumn = tableColumn,
|
.TableColumn = tableColumn,
|
||||||
@ -97,7 +137,7 @@ Public Class Form1
|
|||||||
.RejectionTemplateId = 1,
|
.RejectionTemplateId = 1,
|
||||||
.MinFileAgeInMinutes = 1
|
.MinFileAgeInMinutes = 1
|
||||||
}
|
}
|
||||||
args = LoadPropertyMapFor(args)
|
args = LoadPropertyMapListFor(args)
|
||||||
|
|
||||||
Dim job As New ImportZUGFeRDFiles(_logConfig, _mssql)
|
Dim job As New ImportZUGFeRDFiles(_logConfig, _mssql)
|
||||||
|
|
||||||
@ -145,9 +185,10 @@ Public Class Form1
|
|||||||
.AttachmentsSubDirectory = "Attachments",
|
.AttachmentsSubDirectory = "Attachments",
|
||||||
.RejectionTemplateId = 1,
|
.RejectionTemplateId = 1,
|
||||||
.MinFileAgeInMinutes = 1,
|
.MinFileAgeInMinutes = 1,
|
||||||
.AllowPeppolBISBill3x = True
|
.AllowPeppolBISBill3x = True,
|
||||||
|
.AllowZugferd23x = True
|
||||||
}
|
}
|
||||||
args = LoadPropertyMapFor(args)
|
args = LoadPropertyMapListFor(args)
|
||||||
|
|
||||||
Dim job As New ImportZUGFeRDFiles(_logConfig, _mssql)
|
Dim job As New ImportZUGFeRDFiles(_logConfig, _mssql)
|
||||||
|
|
||||||
@ -168,7 +209,7 @@ Public Class Form1
|
|||||||
.AllowXRechnung = True,
|
.AllowXRechnung = True,
|
||||||
.AllowPeppolBISBill3x = True
|
.AllowPeppolBISBill3x = True
|
||||||
}
|
}
|
||||||
oArgs = LoadPropertyMapFor(oArgs)
|
oArgs = LoadPropertyMapListFor(oArgs)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
If oDialogResult = DialogResult.OK Then
|
If oDialogResult = DialogResult.OK Then
|
||||||
@ -186,9 +227,9 @@ Public Class Form1
|
|||||||
oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_DEFAULT
|
oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_DEFAULT
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oPropertyMap = oArgs.PropertyMap.
|
Dim oPropertyMap = oArgs.PropertyMapList.
|
||||||
Where(Function(kv) kv.Value.Specification = oSpecification).
|
Where(Function(kv) kv.Specification = oSpecification).
|
||||||
ToDictionary(Function(kv) kv.Key, Function(kv) kv.Value)
|
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
|
||||||
|
|
||||||
Dim oResult2 = _zugferd.PropertyValues.CheckPropertyValues(oResult.SchemaObject, oPropertyMap, "test")
|
Dim oResult2 = _zugferd.PropertyValues.CheckPropertyValues(oResult.SchemaObject, oPropertyMap, "test")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user