This commit is contained in:
2019-11-26 14:42:17 +01:00
parent d4dfcd1744
commit de1d935624
13 changed files with 450 additions and 78 deletions

View File

@@ -323,6 +323,7 @@ Public Class cZOLL_IMPORT
If avisoLinkId = 0 Or SendungId = 0 Then
Dim DY As DAKOSY_Worker.cDakosy_Zollanmeldungen = DAKOSY_Worker.cDakosy_Zollanmeldungen.LOADByBezugsNr(If(EZA_Nr <> "", EZA_Nr, NCTS_Nr))
If DY IsNot Nothing Then
@@ -340,6 +341,8 @@ Public Class cZOLL_IMPORT
If SPEDITIONSBUCH.Abfertigungsdatum Is Nothing Then SPEDITIONSBUCH.Abfertigungsdatum = Now.ToShortDateString
If SendungId > 0 Then SPEDITIONSBUCH.SendungID = SendungId
' Dim fNEF = DirectCast(Me.Owner, frmNacherfassungNEU)
If SendungId = 0 And SPEDITIONSBUCH.SendungID > 0 Then SendungId = SPEDITIONSBUCH.SendungID 'Falls falsch übergeben
If SendungId > 0 Then SENDUNG = New VERAG_PROG_ALLGEMEIN.cSendungen(SendungId)
@@ -385,6 +388,7 @@ Public Class cZOLL_IMPORT
BenutzerTmp = getBenutzerShort(BenutzerTmp)
If BelegNrTmp.EndsWith(",") Then BelegNrTmp = BelegNrTmp.Substring(0, BelegNrTmp.Length - 1)
SPEDITIONSBUCH.Bar = True
If SPEDITIONSBUCH.ErfassungsNr = "" Then SPEDITIONSBUCH.ErfassungsNr = "VERA/" & VERAG_PROG_ALLGEMEIN.cAllgemein.NIEDERLASSUNG & "/" & BenutzerTmp & "/" & CDate(SPEDITIONSBUCH.Abfertigungsdatum).ToShortDateString & "/" & BelegNrTmp & "/" & BetragTmp
If SPEDITIONSBUCH.Barzahlungsbetrag = 0 Then SPEDITIONSBUCH.Barzahlungsbetrag = BetragTmp
@@ -427,7 +431,7 @@ Public Class cZOLL_IMPORT
End If
If avisoLinkId > 0 Then
SPEDITIONSBUCH.AvisoID = avisoLinkId
Dim sgut = CInt((New SQL).getValueTxtBySql("SELECT count(*) FROM tblSendungen WHERE tblSnd_AvisoID='" & avisoLinkId & "' ", "AVISO"))
If sgut = 1 Then
SPEDITIONSBUCH.SgutKompl = "K"
@@ -512,6 +516,15 @@ Public Class cZOLL_IMPORT
' If autoImport And Not notFound Then
If SENDUNG IsNot Nothing AndAlso SENDUNG.tblSnd_Abfertigungsart_ID > 0 Then
If SENDUNG.tblSnd_Abfertigungsart_ID = 23 Then
If SENDUNG.tblSnd_anzahlHandling IsNot Nothing AndAlso IsNumeric(SENDUNG.tblSnd_anzahlHandling) Then
SPEDITIONSBUCH.Abfertigungsanzahl = SENDUNG.tblSnd_anzahlHandling
Else
SPEDITIONSBUCH.Abfertigungsanzahl = 0
End If
End If
If (SENDUNG.tblSnd_Abfertigungsart_ID = 26 Or SENDUNG.tblSnd_Abfertigungsart_ID = 28) And NCTS_Nr <> "" Then
'Überstellungs-T
SPEDITIONSBUCH.Abfertigungsart = 5
@@ -532,6 +545,8 @@ Public Class cZOLL_IMPORT
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
'notFound = Me.notFound
If autoImport AndAlso Not checkIfAutoOK() Then
@@ -612,7 +627,7 @@ Public Class cZOLL_IMPORT
Public Function checkIfAutoOK() As Boolean
Try
If If(SPEDITIONSBUCH.Personalnummer, "") = "" Then Return False
If SPEDITIONSBUCH.Personalnummer Is Nothing Then Return False
If If(SPEDITIONSBUCH.Vermittler, "") = "" Then Return False
If Not IsNumeric(If(SPEDITIONSBUCH.Abfertigungsart, "")) Then Return False
If SPEDITIONSBUCH.Abfertigungsanzahl = 0 Then Return False