Merge branch 'ADMIN' of https://git.it.verag.ag/edv/ADMIN into ADMIN
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports System.Globalization
|
||||
Imports io.konik.zugferd
|
||||
Imports Newtonsoft.Json
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
@@ -24,8 +25,8 @@ Public Class cDakosyEZA_Greenpulse
|
||||
' --- Kopf/Zielschema ---
|
||||
Dim dest As New cATEZ_Greenpulse_KafkaDecs With {
|
||||
.Declaration = New cATEZ_Greenpulse_KafkaDecs.DeclarationNode With {
|
||||
.DeclarationSourceId = SafeStr(eza.eza_ANR),
|
||||
.DeclarationNo = SafeStr(eza.eza_MRN),
|
||||
.DeclarationSourceId = SafeStr(eza.eza_dyaAnmID),
|
||||
.DeclarationNo = SafeStr(eza.eza_ANR),
|
||||
.DeclarationDate = ToDateYMD(FirstNonEmpty(eza.eza_Anmeldedatum, eza.eza_Erstellung)),
|
||||
.RequestedProcedure = SafeStr(eza.eza_VerfahrenBeantragtCode),
|
||||
.PreviousProcedure = "",
|
||||
@@ -65,7 +66,8 @@ Public Class cDakosyEZA_Greenpulse
|
||||
.ImporterPoBox = "",
|
||||
.ImporterCoordinateLongitudeX = "",
|
||||
.ImporterCoordinateLatitudeY = ""
|
||||
}
|
||||
},
|
||||
.Documents = New List(Of cATEZ_Greenpulse_KafkaDecs.DocumentNode)()
|
||||
}
|
||||
|
||||
' --- Falls EORI vorhanden: spezifisch befüllen (Lookup/Mapping via Helper) ---
|
||||
@@ -114,6 +116,37 @@ Public Class cDakosyEZA_Greenpulse
|
||||
dest.Declaration.PreviousProcedure = SafeStr(wp0.ezaWP_VerfahrensCodeVorangegangenesVerfahren)
|
||||
End If
|
||||
|
||||
|
||||
' --- Dokumente aus Unterlagen übernehmen ---
|
||||
Dim DY As New cDakosy_Zollanmeldungen(eza.eza_dyaAnmID)
|
||||
|
||||
If DY IsNot Nothing Then
|
||||
If DY.dy_SendungsId IsNot Nothing Then
|
||||
Dim ANH_LIST As New List(Of cAvisoAnhaenge)
|
||||
cAvisoAnhaenge.LOAD_LIST_BySendung(ANH_LIST, DY.dy_SendungsId)
|
||||
|
||||
|
||||
For Each doc In ANH_LIST
|
||||
Select Case doc.anh_Art
|
||||
Case "Rechnung", "eFatura"
|
||||
|
||||
Dim dateiBytes As Byte() = System.IO.File.ReadAllBytes(VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(doc.anh_docId))
|
||||
|
||||
Dim d As New cATEZ_Greenpulse_KafkaDecs.DocumentNode With {
|
||||
.Reference = doc.anh_Name,
|
||||
.DocType = "invoice",
|
||||
.MimeType = cATEZ_Greenpulse_KafkaDecsBuilder_DAKOSY.GuessMimeTypeFromNumber(doc.anh_Typ),
|
||||
.Blob = Convert.ToBase64String(dateiBytes)
|
||||
}
|
||||
dest.Documents.Add(d)
|
||||
End Select
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Return dest
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user