NCTS_TR CC015B, ATLAS Codelisten, BugFixes DY Nachrichtenverarbeitung, EZOLL: Zollbeleg versenden
This commit is contained in:
@@ -915,141 +915,149 @@ Public Class cDakosyNCTSOut
|
||||
|
||||
notFound = False
|
||||
|
||||
|
||||
'Ermittlung ob T1 oder T2
|
||||
If If(SPEDITIONSBUCH.Abfertigungsart, "") = "" Then
|
||||
If If(DY.ncts_ArtAnmeldung, "").ToString.Contains("T2") Then
|
||||
SPEDITIONSBUCH.Abfertigungsart = 6
|
||||
For Each s In DY.ncts_SICHERHEITSANGABEN
|
||||
Select Case If(s.nctsSA_GRN, "")
|
||||
Case "15TR0004000020917", "12TR0004000004665", "17TR0004000032349", "17TR0004000029518", "21TR0004000079552", "21TR0004000078157", "21TR0004000092350", "20TR0004000069756", "21TR0004000090364" : SPEDITIONSBUCH.Abfertigungsart = 34
|
||||
Case "16DE0000000068410" : SPEDITIONSBUCH.Abfertigungsart = 33
|
||||
Case "15TR0004000020908", "13TR0004000005094", "18DE0000000073276" : SPEDITIONSBUCH.Abfertigungsart = 37
|
||||
End Select
|
||||
Next
|
||||
ElseIf If(DY.ncts_ArtAnmeldung, "").ToString.Contains("TIR") Then
|
||||
'For Each s In DY.ncts_SICHERHEITSANGABEN
|
||||
' If If(s.nctsSA_ArtCode, "") = "B" Then
|
||||
' SPEDITIONSBUCH.Abfertigungsart = 8
|
||||
' End If
|
||||
'Next
|
||||
If DY.ncts_BestimmungslandCode = "TR" Then
|
||||
SPEDITIONSBUCH.Abfertigungsart = 12
|
||||
Else
|
||||
SPEDITIONSBUCH.Abfertigungsart = 8
|
||||
End If
|
||||
|
||||
Else
|
||||
If If(DY.ncts_ArtAnmeldung, "").ToString.Contains("T2") Then
|
||||
SPEDITIONSBUCH.Abfertigungsart = 6
|
||||
For Each s In DY.ncts_SICHERHEITSANGABEN
|
||||
Select Case If(s.nctsSA_GRN, "")
|
||||
Case "15TR0004000020917", "12TR0004000004665", "17TR0004000032349", "17TR0004000029518", "21TR0004000079552", "21TR0004000078157", "21TR0004000092350", "20TR0004000069756", "21TR0004000090364" : SPEDITIONSBUCH.Abfertigungsart = 34
|
||||
Case "16DE0000000068410" : SPEDITIONSBUCH.Abfertigungsart = 33
|
||||
Case "15TR0004000020908", "13TR0004000005094", "18DE0000000073276" : SPEDITIONSBUCH.Abfertigungsart = 37
|
||||
End Select
|
||||
Next
|
||||
ElseIf If(DY.ncts_ArtAnmeldung, "").ToString.Contains("TIR") Then
|
||||
'For Each s In DY.ncts_SICHERHEITSANGABEN
|
||||
' If If(s.nctsSA_ArtCode, "") = "B" Then
|
||||
' SPEDITIONSBUCH.Abfertigungsart = 8
|
||||
' End If
|
||||
'Next
|
||||
If DY.ncts_BestimmungslandCode = "TR" Then
|
||||
SPEDITIONSBUCH.Abfertigungsart = 12
|
||||
Else
|
||||
SPEDITIONSBUCH.Abfertigungsart = 8
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
SPEDITIONSBUCH.Abfertigungsart = 5
|
||||
End If
|
||||
|
||||
SPEDITIONSBUCH.Abfertigungsart = 5
|
||||
End If
|
||||
|
||||
End If
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW
|
||||
Try
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW
|
||||
Try
|
||||
|
||||
Dim ANM As New DAKOSY_Worker.cDakosy_Zollanmeldungen(DY.ncts_dyaAnmID)
|
||||
SPEDITIONSBUCH.DokumentId_Steuerbeleg = ANM.dy_Steuerbescheid_dsId
|
||||
SPEDITIONSBUCH.DokumentId_VBD = ANM.dy_VBD_dsId
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("ERR: " & ex.Message & ex.StackTrace)
|
||||
MsgBox("ERR: " & ex.Message & ex.StackTrace)
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
If SPEDITIONSBUCH.Abfertigungsdatum Is Nothing Then SPEDITIONSBUCH.Abfertigungsdatum = Now ' CDate(DY.ncts_Trans_DatumZeit).ToShortDateString
|
||||
|
||||
SPEDITIONSBUCH.Bestimmungszollstelle = DY.ncts_BestimmungsstelleDienststellennummer
|
||||
SPEDITIONSBUCH.Versendungsland = DY.ncts_VersendungsLandCode
|
||||
SPEDITIONSBUCH.Bestimmungsland = DY.ncts_BestimmungslandCode
|
||||
SPEDITIONSBUCH.Versendungsland = DY.ncts_VersendungsLandCode
|
||||
SPEDITIONSBUCH.Bestimmungsland = DY.ncts_BestimmungslandCode
|
||||
|
||||
If DY.ncts_SICHERHEITSANGABEN.Count > 0 Then
|
||||
SPEDITIONSBUCH.Bürgschaft = DY.ncts_SICHERHEITSANGABEN(0).nctsSA_GRN
|
||||
If DY.ncts_SICHERHEITSANGABEN.Count > 0 Then
|
||||
SPEDITIONSBUCH.Bürgschaft = DY.ncts_SICHERHEITSANGABEN(0).nctsSA_GRN
|
||||
|
||||
Dim sumBrg As Double = 0
|
||||
For Each S In DY.ncts_SICHERHEITSANGABEN
|
||||
sumBrg += If(S.nctsSA_AbgabenBetrag, 0)
|
||||
Next
|
||||
If sumBrg > 0 Then SPEDITIONSBUCH.Sicherheitsbetrag = sumBrg
|
||||
End If
|
||||
'SPEDITIONSBUCH.Abfertigungsdatum=
|
||||
Dim sumBrg As Double = 0
|
||||
For Each S In DY.ncts_SICHERHEITSANGABEN
|
||||
sumBrg += If(S.nctsSA_AbgabenBetrag, 0)
|
||||
Next
|
||||
If sumBrg > 0 Then SPEDITIONSBUCH.Sicherheitsbetrag = sumBrg
|
||||
End If
|
||||
'SPEDITIONSBUCH.Abfertigungsdatum=
|
||||
|
||||
SPEDITIONSBUCH.BelegNr = DY.ncts_MRN
|
||||
SPEDITIONSBUCH.LKW_Kennzeichen = If(DY.ncts_Befoerderungsmittel_KennzeichenAbgang, "")
|
||||
SPEDITIONSBUCH.BelegNr = DY.ncts_MRN
|
||||
SPEDITIONSBUCH.LKW_Kennzeichen = If(DY.ncts_Befoerderungsmittel_KennzeichenAbgang, "")
|
||||
|
||||
Dim AD = getAdresseFromEORI(DY.ncts_SumA_Versender_EORI, DY.ncts_SumA_Versender_NLNR, SQL)
|
||||
If AD IsNot Nothing Then
|
||||
SPEDITIONSBUCH.AbsenderKundenNr = AD.AdressenNr
|
||||
SPEDITIONSBUCH.Absender = AD.Ordnungsbegriff
|
||||
End If
|
||||
If If(SPEDITIONSBUCH.Absender, "").Trim = "" Then
|
||||
If If(DY.ncts_SumA_Versender_Name, "").ToString.Trim <> "" Then
|
||||
SPEDITIONSBUCH.Absender = If(DY.ncts_SumA_Versender_Name, "")
|
||||
SPEDITIONSBUCH.Absender &= ", " & If(DY.ncts_SumA_Versender_Land, "")
|
||||
SPEDITIONSBUCH.Absender &= " " & If(DY.ncts_SumA_Versender_PLZ, "")
|
||||
SPEDITIONSBUCH.Absender &= " " & If(DY.ncts_SumA_Versender_Ort, "")
|
||||
Dim AD = getAdresseFromEORI(DY.ncts_SumA_Versender_EORI, DY.ncts_SumA_Versender_NLNR, SQL)
|
||||
If AD IsNot Nothing Then
|
||||
SPEDITIONSBUCH.AbsenderKundenNr = AD.AdressenNr
|
||||
SPEDITIONSBUCH.Absender = AD.Ordnungsbegriff
|
||||
End If
|
||||
If If(SPEDITIONSBUCH.Absender, "").Trim = "" Then
|
||||
If If(DY.ncts_SumA_Versender_Name, "").ToString.Trim <> "" Then
|
||||
SPEDITIONSBUCH.Absender = If(DY.ncts_SumA_Versender_Name, "")
|
||||
SPEDITIONSBUCH.Absender &= ", " & If(DY.ncts_SumA_Versender_Land, "")
|
||||
SPEDITIONSBUCH.Absender &= " " & If(DY.ncts_SumA_Versender_PLZ, "")
|
||||
SPEDITIONSBUCH.Absender &= " " & If(DY.ncts_SumA_Versender_Ort, "")
|
||||
ElseIf DY.ncts_WARENPOS.Count > 0 Then
|
||||
Dim WP = DY.ncts_WARENPOS(0)
|
||||
Dim AD_pos = getAdresseFromEORI(WP.nctsWP_SumAVersender_EORI, WP.nctsWP_SumAVersender_NLNR, SQL)
|
||||
If AD_pos IsNot Nothing Then
|
||||
SPEDITIONSBUCH.AbsenderKundenNr = AD_pos.AdressenNr
|
||||
SPEDITIONSBUCH.Absender = AD_pos.Ordnungsbegriff
|
||||
Dim WP = DY.ncts_WARENPOS(0)
|
||||
Dim AD_pos = getAdresseFromEORI(WP.nctsWP_SumAVersender_EORI, WP.nctsWP_SumAVersender_NLNR, SQL)
|
||||
If AD_pos IsNot Nothing Then
|
||||
SPEDITIONSBUCH.AbsenderKundenNr = AD_pos.AdressenNr
|
||||
SPEDITIONSBUCH.Absender = AD_pos.Ordnungsbegriff
|
||||
End If
|
||||
If If(WP.nctsWP_SumAVersender_Name, "").ToString.Trim <> "" Then
|
||||
SPEDITIONSBUCH.Absender = If(WP.nctsWP_SumAVersender_Name, "")
|
||||
SPEDITIONSBUCH.Absender &= ", " & If(WP.nctsWP_SumAVersender_Land, "")
|
||||
SPEDITIONSBUCH.Absender &= " " & If(WP.nctsWP_SumAVersender_PLZ, "")
|
||||
SPEDITIONSBUCH.Absender &= " " & If(WP.nctsWP_SumAVersender_Ort, "")
|
||||
End If
|
||||
If If(SPEDITIONSBUCH.Absender, "").Trim = String.Empty Then SPEDITIONSBUCH.Absender &= (" " & If(WP.nctsWP_SumAVersender_EORI, "")).ToString.Trim
|
||||
End If
|
||||
If If(WP.nctsWP_SumAVersender_Name, "").ToString.Trim <> "" Then
|
||||
SPEDITIONSBUCH.Absender = If(WP.nctsWP_SumAVersender_Name, "")
|
||||
SPEDITIONSBUCH.Absender &= ", " & If(WP.nctsWP_SumAVersender_Land, "")
|
||||
SPEDITIONSBUCH.Absender &= " " & If(WP.nctsWP_SumAVersender_PLZ, "")
|
||||
SPEDITIONSBUCH.Absender &= " " & If(WP.nctsWP_SumAVersender_Ort, "")
|
||||
End If
|
||||
If If(SPEDITIONSBUCH.Absender, "").Trim = String.Empty Then SPEDITIONSBUCH.Absender &= (" " & If(WP.nctsWP_SumAVersender_EORI, "")).ToString.Trim
|
||||
If If(SPEDITIONSBUCH.Absender, "").Trim = String.Empty Then SPEDITIONSBUCH.Absender &= (" " & If(DY.ncts_SumA_Versender_EORI, "")).ToString.Trim
|
||||
|
||||
End If
|
||||
If If(SPEDITIONSBUCH.Absender, "").Trim = String.Empty Then SPEDITIONSBUCH.Absender &= (" " & If(DY.ncts_SumA_Versender_EORI, "")).ToString.Trim
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim AD2 = getAdresseFromEORI(DY.ncts_SumA_Empfaenger_EORI, DY.ncts_SumA_Empfaenger_NLNR, SQL)
|
||||
If AD2 IsNot Nothing Then
|
||||
SPEDITIONSBUCH.EmpfängerKundenNr = AD2.AdressenNr
|
||||
SPEDITIONSBUCH.Empfänger = AD2.Ordnungsbegriff
|
||||
End If
|
||||
If If(SPEDITIONSBUCH.Empfänger, "") = "" Then
|
||||
If If(DY.ncts_SumA_Empfaenger_Name, "").ToString.Trim <> "" Then
|
||||
SPEDITIONSBUCH.Empfänger = If(DY.ncts_SumA_Empfaenger_Name, "")
|
||||
SPEDITIONSBUCH.Empfänger &= ", " & If(DY.ncts_SumA_Empfaenger_Land, "")
|
||||
SPEDITIONSBUCH.Empfänger &= " " & If(DY.ncts_SumA_Empfaenger_PLZ, "")
|
||||
SPEDITIONSBUCH.Empfänger &= " " & If(DY.ncts_SumA_Empfaenger_Ort, "")
|
||||
ElseIf DY.ncts_WARENPOS.Count > 0 Then
|
||||
Dim WP = DY.ncts_WARENPOS(0)
|
||||
Dim AD_pos = getAdresseFromEORI(WP.nctsWP_SumAEmpfaenger_EORI, WP.nctsWP_SumAEmpfaenger_NLNR, SQL)
|
||||
If AD_pos IsNot Nothing Then
|
||||
SPEDITIONSBUCH.EmpfängerKundenNr = AD_pos.AdressenNr
|
||||
SPEDITIONSBUCH.Empfänger = AD_pos.Ordnungsbegriff
|
||||
End If
|
||||
|
||||
If AD2 IsNot Nothing Then
|
||||
SPEDITIONSBUCH.EmpfängerKundenNr = AD2.AdressenNr
|
||||
SPEDITIONSBUCH.Empfänger = AD2.Ordnungsbegriff
|
||||
End If
|
||||
|
||||
If If(WP.nctsWP_SumAEmpfaenger_Name, "").ToString.Trim <> "" Then
|
||||
SPEDITIONSBUCH.Empfänger = If(WP.nctsWP_SumAEmpfaenger_Name, "")
|
||||
SPEDITIONSBUCH.Empfänger &= ", " & If(WP.nctsWP_SumAEmpfaenger_Land, "")
|
||||
SPEDITIONSBUCH.Empfänger &= " " & If(WP.nctsWP_SumAEmpfaenger_PLZ, "")
|
||||
SPEDITIONSBUCH.Empfänger &= " " & If(WP.nctsWP_SumAEmpfaenger_Ort, "")
|
||||
End If
|
||||
If If(SPEDITIONSBUCH.Empfänger, "").Trim = String.Empty Then SPEDITIONSBUCH.Empfänger &= (" " & If(WP.nctsWP_SumAEmpfaenger_EORI, "")).ToString.Trim
|
||||
Dim AD2 = getAdresseFromEORI(DY.ncts_SumA_Empfaenger_EORI, DY.ncts_SumA_Empfaenger_NLNR, SQL)
|
||||
If AD2 IsNot Nothing Then
|
||||
SPEDITIONSBUCH.EmpfängerKundenNr = AD2.AdressenNr
|
||||
SPEDITIONSBUCH.Empfänger = AD2.Ordnungsbegriff
|
||||
End If
|
||||
If If(SPEDITIONSBUCH.Empfänger, "").Trim = String.Empty Then SPEDITIONSBUCH.Empfänger &= (" " & If(DY.ncts_SumA_Empfaenger_EORI, "")).ToString.Trim
|
||||
If If(SPEDITIONSBUCH.Empfänger, "") = "" Then
|
||||
If If(DY.ncts_SumA_Empfaenger_Name, "").ToString.Trim <> "" Then
|
||||
SPEDITIONSBUCH.Empfänger = If(DY.ncts_SumA_Empfaenger_Name, "")
|
||||
SPEDITIONSBUCH.Empfänger &= ", " & If(DY.ncts_SumA_Empfaenger_Land, "")
|
||||
SPEDITIONSBUCH.Empfänger &= " " & If(DY.ncts_SumA_Empfaenger_PLZ, "")
|
||||
SPEDITIONSBUCH.Empfänger &= " " & If(DY.ncts_SumA_Empfaenger_Ort, "")
|
||||
ElseIf DY.ncts_WARENPOS.Count > 0 Then
|
||||
Dim WP = DY.ncts_WARENPOS(0)
|
||||
Dim AD_pos = getAdresseFromEORI(WP.nctsWP_SumAEmpfaenger_EORI, WP.nctsWP_SumAEmpfaenger_NLNR, SQL)
|
||||
If AD_pos IsNot Nothing Then
|
||||
SPEDITIONSBUCH.EmpfängerKundenNr = AD_pos.AdressenNr
|
||||
SPEDITIONSBUCH.Empfänger = AD_pos.Ordnungsbegriff
|
||||
End If
|
||||
|
||||
End If
|
||||
If AD2 IsNot Nothing Then
|
||||
SPEDITIONSBUCH.EmpfängerKundenNr = AD2.AdressenNr
|
||||
SPEDITIONSBUCH.Empfänger = AD2.Ordnungsbegriff
|
||||
End If
|
||||
|
||||
If If(WP.nctsWP_SumAEmpfaenger_Name, "").ToString.Trim <> "" Then
|
||||
SPEDITIONSBUCH.Empfänger = If(WP.nctsWP_SumAEmpfaenger_Name, "")
|
||||
SPEDITIONSBUCH.Empfänger &= ", " & If(WP.nctsWP_SumAEmpfaenger_Land, "")
|
||||
SPEDITIONSBUCH.Empfänger &= " " & If(WP.nctsWP_SumAEmpfaenger_PLZ, "")
|
||||
SPEDITIONSBUCH.Empfänger &= " " & If(WP.nctsWP_SumAEmpfaenger_Ort, "")
|
||||
End If
|
||||
If If(SPEDITIONSBUCH.Empfänger, "").Trim = String.Empty Then SPEDITIONSBUCH.Empfänger &= (" " & If(WP.nctsWP_SumAEmpfaenger_EORI, "")).ToString.Trim
|
||||
End If
|
||||
If If(SPEDITIONSBUCH.Empfänger, "").Trim = String.Empty Then SPEDITIONSBUCH.Empfänger &= (" " & If(DY.ncts_SumA_Empfaenger_EORI, "")).ToString.Trim
|
||||
|
||||
End If
|
||||
|
||||
If If(SPEDITIONSBUCH.Empfänger, "").ToString.Length > 35 Then
|
||||
SPEDITIONSBUCH.Empfänger = SPEDITIONSBUCH.Empfänger.Substring(0, 35)
|
||||
End If
|
||||
|
||||
Dim packSt = ""
|
||||
|
||||
|
||||
If DY.ncts_GesamtAnzahlPackstuecke IsNot Nothing Then packSt = DY.ncts_GesamtAnzahlPackstuecke & " Pk. "
|
||||
|
||||
Dim packSt = ""
|
||||
If DY.ncts_GesamtAnzahlPackstuecke IsNot Nothing Then packSt = DY.ncts_GesamtAnzahlPackstuecke & " Pk. "
|
||||
|
||||
If DY.ncts_WARENPOS.Count > 0 Then
|
||||
If DY.ncts_WARENPOS.Count > 0 Then
|
||||
'SPEDITIONSBUCH.Währungsschlüssel = If(DY.ncts_WARENPOS(0).nctsWP_WarenwertWaehrung, "")
|
||||
SPEDITIONSBUCH.Währungsschlüssel = "900"
|
||||
If DY.ncts_GesamtRohmasse IsNot Nothing Then packSt &= If(DY.ncts_WARENPOS(0).nctsWP_Warenbezeichnung, "")
|
||||
@@ -1063,11 +1071,12 @@ Public Class cDakosyNCTSOut
|
||||
|
||||
If packSt.Trim <> String.Empty Then SPEDITIONSBUCH.Packstücke = packSt.Trim & ", " & CDbl(DY.ncts_GesamtRohmasse).ToString("N1") & " kg"
|
||||
|
||||
If DY.ncts_GesamtRohmasse IsNot Nothing AndAlso IsNumeric(DY.ncts_GesamtRohmasse) Then SPEDITIONSBUCH.Rohmasse = CInt(DY.ncts_GesamtRohmasse) 'CDbl(DY.ncts_GesamtRohmasse).ToString("N2")
|
||||
If DY.ncts_GesamtRohmasse IsNot Nothing AndAlso IsNumeric(DY.ncts_GesamtRohmasse) Then SPEDITIONSBUCH.Rohmasse = CInt(DY.ncts_GesamtRohmasse) 'CDbl(DY.ncts_GesamtRohmasse).ToString("N2")
|
||||
'Personal Abfertigung:
|
||||
Try
|
||||
If DY.ncts_Bearbeiter IsNot Nothing Then
|
||||
Dim p = SQL.getValueTxtBySql("SELECT ISNULL(CASE WHEN [mit_FMZollPersIDKasseIsnotSpedBuch]=1 THEN [mit_FMZollPersIDSpedBuch] ELSE [mit_FMZollPersID] END ,-1) as [mit_FMZollPersID] FROM [ADMIN].[dbo].[tblMitarbeiter] WHERE [mit_DAKOSY_SB]='" & DY.ncts_Bearbeiter & "'", "ADMIN")
|
||||
|
||||
SPEDITIONSBUCH.Personalnummer = If(IsNumeric(p), p, Nothing)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -82,7 +82,8 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -131,7 +132,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -179,7 +180,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -228,7 +229,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -278,7 +279,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -327,7 +328,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -376,7 +377,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -420,7 +421,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -470,7 +471,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -521,7 +522,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -568,7 +569,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
@@ -620,7 +621,7 @@ Public Class cIMPORT_Codelisten
|
||||
End Using
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ Public Class cZOLL_IMPORT
|
||||
Function countSpedbuchEntrysTC(filiale, BezugsNr, telanm_ART) As Integer
|
||||
Select Case telanm_ART
|
||||
Case "NCTS", "T1", "T2", "T2L" : Return countSpedbuchEntrysTC_EZA(filiale, BezugsNr)
|
||||
Case "AES" : Return countSpedbuchEntrysTC_AES(filiale, BezugsNr)
|
||||
Case Else : Return countSpedbuchEntrysTC_EZA(filiale, BezugsNr)
|
||||
End Select
|
||||
|
||||
@@ -35,6 +36,11 @@ Public Class cZOLL_IMPORT
|
||||
Return SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM Speditionsbuch WHERE [FilialenNr]='" & filiale & "' AND [AtlasBezNrEZA]='" & BezugsNr & "'", "FMZOLL",, 0)
|
||||
End Function
|
||||
|
||||
Function countSpedbuchEntrysTC_AES(filiale, BezugsNr) As Integer
|
||||
If If(BezugsNr, "") = "" Then Return -1
|
||||
Return SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM Speditionsbuch WHERE [FilialenNr]='" & filiale & "' AND [AtlasBezNrAES]='" & BezugsNr & "'", "FMZOLL",, 0)
|
||||
End Function
|
||||
|
||||
|
||||
Function countSpedbuchEntrysTC_NCTS(filiale, BezugsNr) As Integer
|
||||
If If(BezugsNr, "") = "" Then Return -1
|
||||
@@ -314,7 +320,7 @@ Public Class cZOLL_IMPORT
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function EZOLLImport(LRN, art) As Boolean
|
||||
Public Shared Function EZOLLImport(LRN, art, Optional ByRef SPEDBUCH_TMP = Nothing) As Boolean
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERAG" 'Wichtig für Spedbucheintrag
|
||||
Dim SPEDBUCH As New VERAG_PROG_ALLGEMEIN.cSpeditionsbuch
|
||||
@@ -334,6 +340,7 @@ Public Class cZOLL_IMPORT
|
||||
Dim abfertigungsnummer = getAbfertigungsnummer(LRN)
|
||||
|
||||
If tryFindAviso(LRN, SPEDBUCH.AvisoID, SPEDBUCH.SendungID) Then
|
||||
SPEDBUCH_TMP = SPEDBUCH
|
||||
If filiale <> "" And abfertigungsnummer <> "" Then
|
||||
If countSpedbuchEntrys(filiale, LRN, art) = 0 Then
|
||||
|
||||
@@ -353,11 +360,13 @@ Public Class cZOLL_IMPORT
|
||||
|
||||
Select Case art
|
||||
Case "NCTS" : SPEDBUCH.AtlasBezNrNCTS = LRN
|
||||
Case "AES" : SPEDBUCH.AtlasBezNrAES = LRN
|
||||
Case Else : SPEDBUCH.AtlasBezNrEZA = LRN
|
||||
End Select
|
||||
|
||||
SPEDBUCH = ZOLL_IMPORT.IMPORT(SPEDBUCH, SPEDBUCH.AvisoID, SPEDBUCH.SendungID, "VERA", filialeBez, 1, SPEDBUCH.AtlasBezNrEZA, SPEDBUCH.AtlasBezNrNCTS, notfound, True)
|
||||
SPEDBUCH = ZOLL_IMPORT.IMPORT(SPEDBUCH, SPEDBUCH.AvisoID, SPEDBUCH.SendungID, "VERA", filialeBez, 1, SPEDBUCH.AtlasBezNrEZA, SPEDBUCH.AtlasBezNrNCTS, notfound, True,, SPEDBUCH.AtlasBezNrAES)
|
||||
|
||||
SPEDBUCH_TMP = SPEDBUCH
|
||||
If notfound Then Return False
|
||||
' VERAG_PROG_ALLGEMEIN.cErrorHandler.sendERRORperMail("HEUREKA EZA !!", "" & Me.eza_ObjectName, Now.ToString("yyyy.MM.dd HH:mm"), "al@verag.ag", "")
|
||||
|
||||
@@ -447,6 +456,7 @@ Public Class cZOLL_IMPORT
|
||||
Case "5003" : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803
|
||||
Case "5103" : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803
|
||||
Case "5303" : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803
|
||||
Case "7001" : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803
|
||||
'Case "4801", "4803", "4805", "4807", "4811", "5003", "5103", "5303" : Return bezugsNr.ToString.Substring(0, 4) ...... derzeit nur 4803
|
||||
'filialeBez SUB, NKD, WAI,.-..
|
||||
End Select
|
||||
@@ -528,6 +538,8 @@ Public Class cZOLL_IMPORT
|
||||
If EZA_Nr <> "" Then
|
||||
' SPEDITIONSBUCH.AtlasBezNrEZA = EZA_Nr
|
||||
EZollEZADatenbereitstellung(EZA_Nr)
|
||||
ElseIf AES_Nr <> "" Then
|
||||
EZollEZADatenbereitstellung(AES_Nr) ' ????
|
||||
ElseIf NCTS_Nr <> "" Then
|
||||
' SPEDITIONSBUCH.AtlasBezNrNCTS = NCTS_Nr
|
||||
EZollNCTSDatenbereitstellung(NCTS_Nr)
|
||||
@@ -708,6 +720,7 @@ Public Class cZOLL_IMPORT
|
||||
SPEDITIONSBUCH.HandlingZuKassieren = SENDUNG.tblSnd_BARzuKassieren
|
||||
End If
|
||||
|
||||
|
||||
If SPEDITIONSBUCH.AbsenderKundenNr Is Nothing OrElse SPEDITIONSBUCH.AbsenderKundenNr <= 0 Then
|
||||
If SENDUNG.tblSnd_AbsenderKdNr > 0 Then
|
||||
SPEDITIONSBUCH.AbsenderKundenNr = SENDUNG.tblSnd_AbsenderKdNr
|
||||
@@ -716,15 +729,16 @@ Public Class cZOLL_IMPORT
|
||||
End If
|
||||
|
||||
If SPEDITIONSBUCH.EmpfängerKundenNr Is Nothing OrElse SPEDITIONSBUCH.EmpfängerKundenNr <= 0 Then
|
||||
If SENDUNG.tblSnd_EmpfaengerKdNr > 0 Then SPEDITIONSBUCH.EmpfängerKundenNr = SENDUNG.tblSnd_EmpfaengerKdNr
|
||||
If SPEDITIONSBUCH.Empfänger Is Nothing OrElse SPEDITIONSBUCH.Empfänger = "" Then SPEDITIONSBUCH.Empfänger = SENDUNG.tblSnd_Empfaenger
|
||||
End If
|
||||
If SENDUNG.tblSnd_EmpfaengerKdNr > 0 Then SPEDITIONSBUCH.EmpfängerKundenNr = SENDUNG.tblSnd_EmpfaengerKdNr
|
||||
If SPEDITIONSBUCH.Empfänger Is Nothing OrElse SPEDITIONSBUCH.Empfänger = "" Then SPEDITIONSBUCH.Empfänger = SENDUNG.tblSnd_Empfaenger
|
||||
End If
|
||||
|
||||
If SPEDITIONSBUCH.VermittlerKundenNr Is Nothing OrElse SPEDITIONSBUCH.VermittlerKundenNr <= 0 Then
|
||||
|
||||
If SENDUNG.tblSnd_AuftraggeberKdNr > 0 Then SPEDITIONSBUCH.VermittlerKundenNr = SENDUNG.tblSnd_AuftraggeberKdNr ': MsgBox(SENDUNG.tblSnd_AuftraggeberKdNr)
|
||||
If SPEDITIONSBUCH.Vermittler Is Nothing OrElse SPEDITIONSBUCH.Vermittler = "" Then SPEDITIONSBUCH.Vermittler = SENDUNG.tblSnd_Auftraggeber
|
||||
End If
|
||||
If SENDUNG.tblSnd_AuftraggeberKdNr > 0 Then SPEDITIONSBUCH.VermittlerKundenNr = SENDUNG.tblSnd_AuftraggeberKdNr ': MsgBox(SENDUNG.tblSnd_AuftraggeberKdNr)
|
||||
If SPEDITIONSBUCH.Vermittler Is Nothing OrElse SPEDITIONSBUCH.Vermittler = "" Then SPEDITIONSBUCH.Vermittler = SENDUNG.tblSnd_Auftraggeber
|
||||
End If
|
||||
|
||||
End If
|
||||
SPEDITIONSBUCH.AtlasBezNrEZA = EZA_Nr
|
||||
SPEDITIONSBUCH.AtlasBezNrNCTS = NCTS_Nr
|
||||
@@ -776,6 +790,10 @@ Public Class cZOLL_IMPORT
|
||||
correctEntry(SPEDITIONSBUCH.AvisiererKundenNr, SPEDITIONSBUCH.Avisierer)
|
||||
correctEntry(SPEDITIONSBUCH.EndempfängerKundenNr, SPEDITIONSBUCH.Endempfänger)
|
||||
|
||||
If SPEDITIONSBUCH.LKW_Kennzeichen IsNot Nothing AndAlso SPEDITIONSBUCH.LKW_Kennzeichen.ToString.Length > 25 Then
|
||||
SPEDITIONSBUCH.LKW_Kennzeichen = SPEDITIONSBUCH.LKW_Kennzeichen.ToString.Substring(0, 25)
|
||||
End If
|
||||
|
||||
If SPEDITIONSBUCH.Währungsschlüssel Is Nothing OrElse (IsNumeric(SPEDITIONSBUCH.Währungsschlüssel) AndAlso SPEDITIONSBUCH.Währungsschlüssel <= 0) Then SPEDITIONSBUCH.Währungsschlüssel = 900
|
||||
|
||||
If Personalnummer > 0 Then SPEDITIONSBUCH.Personalnummer = Personalnummer
|
||||
|
||||
Reference in New Issue
Block a user