ZUGFeRD-Service: Peppol (Schemata)

This commit is contained in:
PitzM 2024-11-29 10:38:06 +01:00
parent f64ad40572
commit 50e1cd0f1c
4 changed files with 85186 additions and 0 deletions

View File

@ -2,6 +2,7 @@
Imports System.Xml
Imports System.Xml.Serialization
Imports DigitalData.Modules.Interfaces.Exceptions
Imports DigitalData.Modules.Interfaces.Peppol
Imports DigitalData.Modules.Interfaces.ZUGFeRD
Imports DigitalData.Modules.Logging
Imports GdPicture14
@ -18,12 +19,16 @@ Public Class ZUGFeRDInterface
Public Const ZUGFERD_SPEC_DEFAULT = "DEFAULT"
Public Const ZUGFERD_SPEC_10 = "ZUGFERD_10"
Public Const ZUGFERD_SPEC_2x = "ZUGFERD_2x"
Public Const PEPPOL_SPEC_3x_INVOICE = "PEPPOL_BISBILL_3x_INVOICE"
Public Const PEPPOL_SPEC_3x_CREDITNOTE = "PEPPOL_BISBILL_3x_CREDITNOTE"
Public Const XMLSCHEMA_ZUGFERD_10 = "Version1_0"
Public Const XMLSCHEMA_ZUGFERD_20 = "Version2_0"
Public Const XMLSCHEMA_ZUGFERD_211 = "Version2_1_1"
Public Const XMLSCHEMA_ZUGFERD_22 = "Version2_2_FacturX"
Public Const XMLSCHEMA_ZUGFERD_23 = "Version2_3_FacturX"
Public Const XMLSCHEMA_PEPPOL_3017_INVOICE = "Version3017_INVOICE"
Public Const XMLSCHEMA_PEPPOL_3017_CREDITNOTE = "Version3017_CREDITNOTE"
Private ReadOnly ValidFilenames As New List(Of String) From {
PDFEmbeds.ZUGFERD_XML_FILENAME.ToUpper,
@ -51,6 +56,7 @@ Public Class ZUGFeRDInterface
Public Property AllowXRechnung_Filename As Boolean = True
Public Property AllowZugferd_1_0_Schema As Boolean = True
Public Property AllowZugferd_2_x_Schema As Boolean = True
Public Property AllowPeppol_3017_Schema As Boolean = True
End Class
Public Class ZugferdResult
@ -331,6 +337,21 @@ Public Class ZUGFeRDInterface
})
End If
If _Options.AllowPeppol_3017_Schema Then
oAllowedTypes.AddRange(New List(Of AllowedType) From {
New AllowedType With {
.SchemaType = GetType(BISBilling30Invoice.InvoiceType),
.Specification = PEPPOL_SPEC_3x_INVOICE,
.XMLSchema = XMLSCHEMA_PEPPOL_3017_INVOICE
},
New AllowedType With {
.SchemaType = GetType(BISBilling30CreditNote.CreditNoteType),
.Specification = PEPPOL_SPEC_3x_CREDITNOTE,
.XMLSchema = XMLSCHEMA_PEPPOL_3017_CREDITNOTE
}
})
End If
For Each oType In oAllowedTypes
Dim oTypeName As String = oType.SchemaType.FullName
Dim oSerializer As New XmlSerializer(oType.SchemaType)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -29,4 +29,6 @@ Public Class WorkerArgs
Public AllowXRechnung As Boolean = True
Public AllowZugferd10 As Boolean = True
Public AllowZugferd2x As Boolean = True
Public AllowPeppolBISBill3x As Boolean = True
End Class