Merge branch 'ADMIN' of https://git.it.verag.ag/edv/ADMIN into ADMIN
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports com.sun.tools.corba.se
|
||||
Imports System.Security.Cryptography
|
||||
Imports com.sun.tools.corba.se
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Public Class cZOLL_IMPORT
|
||||
Public Aviso As cAviso
|
||||
@@ -63,7 +64,7 @@ Public Class cZOLL_IMPORT
|
||||
|
||||
Dim AbfertigungsNr = getAbfertigungsnummer(TC.telanm_BezugsNr)
|
||||
Dim FilialenNr = getFilialenNr(TC.telanm_BezugsNr)
|
||||
|
||||
|
||||
If FilialenNr <> "" AndAlso AbfertigungsNr <> "" AndAlso countSpedbuchEntrysTC(FilialenNr, TC.telanm_BezugsNr, TC.telanm_ART) = 0 AndAlso countSpedbuchEntrys_AbfertigungsNr(FilialenNr, AbfertigungsNr) = 0 Then
|
||||
|
||||
|
||||
@@ -350,45 +351,84 @@ Public Class cZOLL_IMPORT
|
||||
If tryFindAviso(LRN, SPEDBUCH.AvisoID, SPEDBUCH.SendungID) Then
|
||||
SPEDBUCH_TMP = SPEDBUCH
|
||||
If filiale <> "" And abfertigungsnummer <> "" Then
|
||||
If countSpedbuchEntrys(filiale, LRN, art) = 0 Then
|
||||
|
||||
SPEDBUCH.FilialenNr = filiale
|
||||
SPEDBUCH.AbfertigungsNr = abfertigungsnummer
|
||||
SPEDBUCH.NewUNTER_NR()
|
||||
If countSpedbuchEntrys(filiale, LRN, art) = 0 Then 'gibts einen SPED mit BezugsNr ->
|
||||
|
||||
SPEDBUCH.Abfertigungsanzahl = 1
|
||||
SPEDBUCH.Fakturiert = 0
|
||||
' SPEDBUCH.AtlasBezNrEZA = LRN
|
||||
SPEDBUCH.Zollsystem = "E"
|
||||
SPEDBUCH.Sachbearbeiter = "AUTO"
|
||||
If countSpedbuchEntrys(filiale, abfertigungsnummer, "") = 0 Then 'gibts einen SPED mit Filiale-AbfertiungsNr
|
||||
|
||||
Dim ZOLL_IMPORT As New cZOLL_IMPORT
|
||||
Dim notfound = False
|
||||
Dim posAnzahl = 0
|
||||
SPEDBUCH.FilialenNr = filiale
|
||||
SPEDBUCH.AbfertigungsNr = abfertigungsnummer
|
||||
SPEDBUCH.NewUNTER_NR()
|
||||
|
||||
Select Case art
|
||||
Case "NCTS" : SPEDBUCH.AtlasBezNrNCTS = LRN
|
||||
Case "AES" : SPEDBUCH.AtlasBezNrAES = LRN
|
||||
Case Else : SPEDBUCH.AtlasBezNrEZA = LRN
|
||||
End Select
|
||||
SPEDBUCH.Abfertigungsanzahl = 1
|
||||
SPEDBUCH.Fakturiert = 0
|
||||
' SPEDBUCH.AtlasBezNrEZA = LRN
|
||||
SPEDBUCH.Zollsystem = "E"
|
||||
SPEDBUCH.Sachbearbeiter = "AUTO"
|
||||
|
||||
SPEDBUCH = ZOLL_IMPORT.IMPORT(SPEDBUCH, SPEDBUCH.AvisoID, SPEDBUCH.SendungID, "VERA", filialeBez, 1, SPEDBUCH.AtlasBezNrEZA, SPEDBUCH.AtlasBezNrNCTS, notfound, True,, SPEDBUCH.AtlasBezNrAES)
|
||||
Dim ZOLL_IMPORT As New cZOLL_IMPORT
|
||||
Dim notfound = False
|
||||
Dim posAnzahl = 0
|
||||
|
||||
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", "")
|
||||
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.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", "")
|
||||
|
||||
' MsgBox(SPEDBUCH.FilialenNr & " - " & SPEDBUCH.AbfertigungsNr)
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = firmaTmp
|
||||
|
||||
If SPEDBUCH.SAVE Then
|
||||
VERAG_PROG_ALLGEMEIN.cSendungen.SET_SpedbuchEntry(SPEDBUCH.SendungID, True)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
ElseIf art <> "" Then
|
||||
|
||||
Dim SPEDITIONSBUCH_UPDATE As New VERAG_PROG_ALLGEMEIN.cSpeditionsbuch(filiale, abfertigungsnummer, 0)
|
||||
|
||||
If SPEDITIONSBUCH_UPDATE.hasEntry Then
|
||||
|
||||
If SPEDITIONSBUCH_UPDATE.Zollsystem = "" Then
|
||||
SPEDITIONSBUCH_UPDATE.Zollsystem = "E"
|
||||
End If
|
||||
|
||||
Select Case art
|
||||
Case "NCTS"
|
||||
If SPEDITIONSBUCH_UPDATE.AtlasBezNrNCTS = "" Then
|
||||
SPEDITIONSBUCH_UPDATE.AtlasBezNrNCTS = LRN
|
||||
|
||||
SPEDITIONSBUCH_UPDATE.SAVE()
|
||||
End If
|
||||
|
||||
Case "AES"
|
||||
If SPEDITIONSBUCH_UPDATE.AtlasBezNrAES = "" Then
|
||||
SPEDITIONSBUCH_UPDATE.AtlasBezNrAES = LRN
|
||||
SPEDITIONSBUCH_UPDATE.SAVE()
|
||||
End If
|
||||
|
||||
Case "EZA"
|
||||
If SPEDITIONSBUCH_UPDATE.AtlasBezNrEZA = "" Then
|
||||
SPEDITIONSBUCH_UPDATE.AtlasBezNrEZA = LRN
|
||||
SPEDITIONSBUCH_UPDATE.SAVE()
|
||||
End If
|
||||
|
||||
End Select
|
||||
End If
|
||||
|
||||
' MsgBox(SPEDBUCH.FilialenNr & " - " & SPEDBUCH.AbfertigungsNr)
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = firmaTmp
|
||||
|
||||
If SPEDBUCH.SAVE Then
|
||||
VERAG_PROG_ALLGEMEIN.cSendungen.SET_SpedbuchEntry(SPEDBUCH.SendungID, True)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
' MsgBox(SQL.getValueTxtBySql("select count(*) FROM [VERAG].[dbo].[Speditionsbuch] where AbfertigungsNr = 18035380", "FMZOLL"))
|
||||
|
||||
End If
|
||||
@@ -444,8 +484,12 @@ Public Class cZOLL_IMPORT
|
||||
Shared Function countSpedbuchEntrys(filiale, bezugsnr, art) As Integer
|
||||
If art = "NCTS" Then
|
||||
Return countSpedbuchEntrysNCTS(filiale, bezugsnr)
|
||||
Else
|
||||
ElseIf art = "EZA" Then
|
||||
Return countSpedbuchEntrysEZA(filiale, bezugsnr)
|
||||
ElseIf art = "AES" Then
|
||||
Return countSpedbuchEntrysAES(filiale, bezugsnr)
|
||||
Else
|
||||
Return countSpedbuchEntryALL(filiale, bezugsnr)
|
||||
End If
|
||||
End Function
|
||||
Shared Function countSpedbuchEntrysNCTS(filiale, ncts) As Integer
|
||||
@@ -458,6 +502,16 @@ Public Class cZOLL_IMPORT
|
||||
Return SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM Speditionsbuch WHERE [FilialenNr]='" & filiale & "' AND AtlasBezNrEZA='" & eza & "'", "FMZOLL")
|
||||
End Function
|
||||
|
||||
Shared Function countSpedbuchEntrysAES(filiale, AES) As Integer
|
||||
If If(AES, "") = "" Then Return 0
|
||||
Return SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM Speditionsbuch WHERE [FilialenNr]='" & filiale & "' AND AtlasBezNrAES='" & AES & "'", "FMZOLL")
|
||||
End Function
|
||||
|
||||
Shared Function countSpedbuchEntryALL(filiale, bezugsnr) As Integer
|
||||
If If(bezugsnr, "") = "" Then Return 0
|
||||
Return SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM Speditionsbuch WHERE [FilialenNr]='" & filiale & "' AND AbfertigungsNr='" & bezugsnr & "'", "FMZOLL")
|
||||
End Function
|
||||
|
||||
Shared Function getFiliale(ByVal bezugsNr, ByRef filialeBez) As String
|
||||
If If(bezugsNr, "").ToString.Length > 4 Then
|
||||
Select Case bezugsNr.ToString.Substring(0, 4)
|
||||
@@ -578,9 +632,9 @@ Public Class cZOLL_IMPORT
|
||||
SPEDITIONSBUCH.Zollsystem = "E"
|
||||
If EZA_Nr <> "" Then
|
||||
' SPEDITIONSBUCH.AtlasBezNrEZA = EZA_Nr
|
||||
EZollEZADatenbereitstellung(EZA_Nr)
|
||||
EZollEZADatenbereitstellung(EZA_Nr, False)
|
||||
ElseIf AES_Nr <> "" Then
|
||||
EZollEZADatenbereitstellung(AES_Nr) ' ????
|
||||
EZollEZADatenbereitstellung(AES_Nr, True) ' ???? Warum wird hier nur auf EF geprüft??? AES ist doch -> AF!!!!
|
||||
ElseIf NCTS_Nr <> "" Then
|
||||
' SPEDITIONSBUCH.AtlasBezNrNCTS = NCTS_Nr
|
||||
EZollNCTSDatenbereitstellung(NCTS_Nr)
|
||||
@@ -1662,14 +1716,18 @@ Public Class cZOLL_IMPORT
|
||||
SPEDITIONSBUCH.Bürgschaft = Bürgschaft
|
||||
End Sub
|
||||
|
||||
Private Sub EZollEZADatenbereitstellung(EZA_Nr)
|
||||
Private Sub EZollEZADatenbereitstellung(EZA_Nr, isAES)
|
||||
|
||||
' Dim fNEF = DirectCast(Me.Owner, frmNacherfassungNEU)
|
||||
|
||||
Dim VorgangID As String = "EF"
|
||||
If isAES Then
|
||||
VorgangID = "AF"
|
||||
End If
|
||||
|
||||
Dim dEZOLL As DataTable = KDSQL.loadDgvBySql("SELECT LizenzNr, OperatorID, VorgangID, AnmID, GeaendertAm, GeaendertVon, CRN, LRN" &
|
||||
" FROM zsAnmRefs" &
|
||||
" WHERE (VorgangID = 'EF') AND (LRN = '" & EZA_Nr & "')" &
|
||||
" WHERE (VorgangID = '" & VorgangID & "' ) AND (LRN = '" & EZA_Nr & "')" &
|
||||
" ORDER BY GeaendertAm DESC", EZOLL_SQL)
|
||||
If dEZOLL Is Nothing Then notFound = True : Exit Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user