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 System.Globalization
|
||||||
|
Imports io.konik.zugferd
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
Imports VERAG_PROG_ALLGEMEIN
|
Imports VERAG_PROG_ALLGEMEIN
|
||||||
|
|
||||||
@@ -24,8 +25,8 @@ Public Class cDakosyEZA_Greenpulse
|
|||||||
' --- Kopf/Zielschema ---
|
' --- Kopf/Zielschema ---
|
||||||
Dim dest As New cATEZ_Greenpulse_KafkaDecs With {
|
Dim dest As New cATEZ_Greenpulse_KafkaDecs With {
|
||||||
.Declaration = New cATEZ_Greenpulse_KafkaDecs.DeclarationNode With {
|
.Declaration = New cATEZ_Greenpulse_KafkaDecs.DeclarationNode With {
|
||||||
.DeclarationSourceId = SafeStr(eza.eza_ANR),
|
.DeclarationSourceId = SafeStr(eza.eza_dyaAnmID),
|
||||||
.DeclarationNo = SafeStr(eza.eza_MRN),
|
.DeclarationNo = SafeStr(eza.eza_ANR),
|
||||||
.DeclarationDate = ToDateYMD(FirstNonEmpty(eza.eza_Anmeldedatum, eza.eza_Erstellung)),
|
.DeclarationDate = ToDateYMD(FirstNonEmpty(eza.eza_Anmeldedatum, eza.eza_Erstellung)),
|
||||||
.RequestedProcedure = SafeStr(eza.eza_VerfahrenBeantragtCode),
|
.RequestedProcedure = SafeStr(eza.eza_VerfahrenBeantragtCode),
|
||||||
.PreviousProcedure = "",
|
.PreviousProcedure = "",
|
||||||
@@ -65,7 +66,8 @@ Public Class cDakosyEZA_Greenpulse
|
|||||||
.ImporterPoBox = "",
|
.ImporterPoBox = "",
|
||||||
.ImporterCoordinateLongitudeX = "",
|
.ImporterCoordinateLongitudeX = "",
|
||||||
.ImporterCoordinateLatitudeY = ""
|
.ImporterCoordinateLatitudeY = ""
|
||||||
}
|
},
|
||||||
|
.Documents = New List(Of cATEZ_Greenpulse_KafkaDecs.DocumentNode)()
|
||||||
}
|
}
|
||||||
|
|
||||||
' --- Falls EORI vorhanden: spezifisch befüllen (Lookup/Mapping via Helper) ---
|
' --- 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)
|
dest.Declaration.PreviousProcedure = SafeStr(wp0.ezaWP_VerfahrensCodeVorangegangenesVerfahren)
|
||||||
End If
|
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
|
Return dest
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user