cbam, etc.

This commit is contained in:
2026-11-09 15:07:58 +01:00
parent e772e5b076
commit 89a88e30d5
2 changed files with 104 additions and 9 deletions

View File

@@ -519,7 +519,7 @@ Public Class cVERAG_CustomsDeclarations
Return ZA
End Function
Public Sub checkfreshCBAMWarning()
Public Sub checkfreshCBAMWarning(hasValidCBAMDocNr_VERAG As Boolean)
Try
Dim CBAM_ITEMS As New List(Of cVERAG_CustomsDeclarations_Item)
@@ -543,7 +543,7 @@ Public Class cVERAG_CustomsDeclarations
If AD IsNot Nothing Then
ImporterString = AD.Name_1 & " " & If(AD.Name_2, "") & "<br/>" & If(AD.LandKz, "") & " " & If(AD.PLZ, "") & " " & If(AD.Ort, "")
ImporterString = AD.AdressenNr & "<br/>" & AD.Name_1 & " " & If(AD.Name_2, "") & "<br/>" & If(AD.LandKz, "") & " " & If(AD.PLZ, "") & " " & If(AD.Ort, "")
End If
Dim KD_EX As cKunde = Nothing
@@ -555,7 +555,7 @@ Public Class cVERAG_CustomsDeclarations
End If
If AD_EX IsNot Nothing Then
ExporterString = AD_EX.Name_1 & " " & If(AD_EX.Name_2, "") & "<br/>" & If(AD_EX.LandKz, "") & " " & If(AD_EX.PLZ, "") & " " & If(AD_EX.Ort, "")
ExporterString = AD_EX.AdressenNr & "<br/>" & AD_EX.Name_1 & " " & If(AD_EX.Name_2, "") & "<br/>" & If(AD_EX.LandKz, "") & " " & If(AD_EX.PLZ, "") & " " & If(AD_EX.Ort, "")
End If
@@ -582,7 +582,7 @@ Public Class cVERAG_CustomsDeclarations
End If
If AD_IND IsNot Nothing Then
vertretenerString = AD_IND.Name_1 & " " & If(AD_IND.Name_2, "") & "<br/>" & If(AD_IND.LandKz, "") & " " & If(AD_IND.PLZ, "") & " " & If(AD_IND.Ort, "")
vertretenerString = AD_IND.AdressenNr & "<br/>" & AD_IND.Name_1 & " " & If(AD_IND.Name_2, "") & "<br/>" & If(AD_IND.LandKz, "") & " " & If(AD_IND.PLZ, "") & " " & If(AD_IND.Ort, "")
ERW_IND = New cKundenErweitert(AD.AdressenNr)
VERTR_IND = cKundenVertraege.LOAD_LISTOF(AD.AdressenNr)
End If
@@ -602,7 +602,7 @@ Public Class cVERAG_CustomsDeclarations
Dim quarter As Integer = Math.Ceiling(dateCBAM.Month / 3.0)
Dim ImportCountry As String = If(za_CountryImport, "")
createOrUpdateKundenSicherheitseintrag(KD, ImportCountry, vertretenerEORI, quarter, dateCBAM.Year)
If hasValidCBAMDocNr_VERAG Then createOrUpdateKundenSicherheitseintrag(KD, ImportCountry, vertretenerEORI, quarter, dateCBAM.Year)
'Prüft, ob Vertrag vorliegt:
@@ -660,8 +660,8 @@ Public Class cVERAG_CustomsDeclarations
"</body></html>"
Dim empfanegerMail As String = ""
empfanegerMail = cMitarbeiter.GetEMailRecipientForEmailNotification("CBAM-WARNUNG")
Dim empfanegerMail As String = "cbam@verag.ag;"
empfanegerMail &= cMitarbeiter.GetEMailRecipientForEmailNotification("CBAM-WARNUNG")
If empfanegerMail <> "" Then
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(empfanegerMail, "CBAM WARNUNG - " & Me.za_MRN, bodyHtml, "cbam@verag.ag")
End If
@@ -688,7 +688,7 @@ Public Class cVERAG_CustomsDeclarations
Dim ImportCountry As String = If(za_CountryImport, "")
Dim quarter As Integer = Math.Ceiling(dateCBAM.Month / 3.0)
createOrUpdateKundenSicherheitseintrag(KD, ImportCountry, importerEORI, quarter, dateCBAM.Year)
If hasValidCBAMDocNr_VERAG Then createOrUpdateKundenSicherheitseintrag(KD, ImportCountry, importerEORI, quarter, dateCBAM.Year)
Dim eigenmasseSumme_Shipment As Decimal = CBAM_ITEMS.Sum(Function(i) If(i.zaItem_NetMass, 0D)) / 1000
Dim eigenmasseSumme_YEAR As Decimal = getCBAM_KG(importerEORI, CDate("01.01." & dateCBAM.Year), CDate("31.12." & dateCBAM.Year)) / 1000