AT-ZOLL eingereicht Fiskal Checkliste
This commit is contained in:
162
Aviso/frmATZollEingereichtSetzen.vb
Normal file
162
Aviso/frmATZollEingereichtSetzen.vb
Normal file
@@ -0,0 +1,162 @@
|
||||
Imports SDL
|
||||
Imports SDL.EORI
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class frmATZollEingereichtSetzen
|
||||
|
||||
Public AVISO As VERAG_PROG_ALLGEMEIN.cAviso = Nothing
|
||||
Public SND As VERAG_PROG_ALLGEMEIN.cSendungen = Nothing
|
||||
Dim AvisoDAL As New VERAG_PROG_ALLGEMEIN.cAvisoDAL
|
||||
|
||||
Sub New(AVISO, SND)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
Me.AVISO = AVISO
|
||||
Me.SND = SND
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub frmAnkunftSetzen_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
lblUIDPruefdatum.Text = "-"
|
||||
lblEORIPruefdatum.Text = "-"
|
||||
|
||||
If AVISO IsNot Nothing Then
|
||||
lblEmpf.Text = If(SND.tblSnd_Empfaenger, "")
|
||||
lblAbfNr.Text = SND.FilialenNr & "/" & SND.AbfertigungsNr
|
||||
lblWare.Text = If(SND.tblSnd_Gewicht, "") & " kg, " & If(SND.tblSnd_Colli, "") & " Pk. " & If(SND.tblSnd_Warenbezeichnung, "")
|
||||
|
||||
End If
|
||||
|
||||
If SND IsNot Nothing Then
|
||||
If SND.tblSnd_EmpfaengerKdNr > 0 Then
|
||||
|
||||
lblNr.Text = SND.tblSnd_PosUnterNr
|
||||
|
||||
Dim ADRESSEN As New VERAG_PROG_ALLGEMEIN.cAdressen(SND.tblSnd_EmpfaengerKdNr)
|
||||
Dim KUNDEN As New VERAG_PROG_ALLGEMEIN.cKunde(SND.tblSnd_EmpfaengerKdNr)
|
||||
If ADRESSEN IsNot Nothing Then
|
||||
txtUid.Text = If(ADRESSEN.UstIdKz, "") & If(ADRESSEN.UstIdNr, "")
|
||||
|
||||
Dim UID_Pruef = VERAG_PROG_ALLGEMEIN.cUIDPruefung.LOADByKdNrNewestDate(SND.tblSnd_EmpfaengerKdNr)
|
||||
If UID_Pruef IsNot Nothing Then
|
||||
lblUIDPruefdatum.Text = UID_Pruef.uid_Datum.ToShortDateString
|
||||
If UID_Pruef.uid_Datum.ToShortDateString = Now.ToShortDateString Then
|
||||
cbxUID.Checked = True
|
||||
picUIDAbfrage.Image = My.Resources.ok
|
||||
Else
|
||||
check_UID(ADRESSEN)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If KUNDEN IsNot Nothing Then
|
||||
txtEori.Text = If(KUNDEN.EORITIN, "")
|
||||
check_EORI(KUNDEN)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btn_Click(sender As Object, e As EventArgs) Handles btn.Click
|
||||
|
||||
Me.DialogResult = DialogResult.OK
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Me.DialogResult = DialogResult.Cancel
|
||||
End Sub
|
||||
|
||||
Private Sub frmAnkunftSetzen_KeyDown(sender As Object, e As KeyEventArgs)
|
||||
If e.KeyCode = Keys.Return Then
|
||||
btn.PerformClick()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Sub check_EORI(KUNDE As VERAG_PROG_ALLGEMEIN.cKunde)
|
||||
If If(KUNDE.EORITIN, "") = "" Then Exit Sub
|
||||
|
||||
picEORIAbfrage.BackgroundImage = Nothing
|
||||
|
||||
|
||||
Dim EORI_ERG = SDL.cEORIWebService.ValidateEoriNumber(KUNDE.EORITIN)
|
||||
|
||||
|
||||
If EORI_ERG.Result.Count > 0 Then
|
||||
|
||||
If EORI_ERG.Result(0).Status = 0 Or EORI_ERG.Result(0).Status = 1 Then
|
||||
|
||||
Select Case EORI_ERG.Result(0).Status
|
||||
Case 0 : cbxEORI.Checked = True : picEORIAbfrage.BackgroundImage = My.Resources.ok
|
||||
Case 1 : cbxEORI.Checked = False : picEORIAbfrage.BackgroundImage = My.Resources.del
|
||||
End Select
|
||||
|
||||
Else
|
||||
MsgBox("Fehler bei der Prüfung der EORI-Nummer. WebService evtl. nicht verfügbar.")
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Sub check_UID(ADRESSE)
|
||||
If ADRESSE.UstIdNr Is Nothing Then Exit Sub
|
||||
If ADRESSE.UstIdKz Is Nothing Then Exit Sub
|
||||
If ADRESSE.UstIdKz = "" Then Exit Sub
|
||||
If ADRESSE.UstIdNr = "" Then Exit Sub
|
||||
|
||||
picUIDAbfrage.BackgroundImage = Nothing
|
||||
' Button5.Visible = False
|
||||
|
||||
|
||||
Dim FO As New VERAG_PROG_ALLGEMEIN.cFinanzOnlineWebService
|
||||
FO.initValues()
|
||||
|
||||
If FO.Call_Web_Service_MethodUID_Login_NEU2020() = 0 Then
|
||||
Dim UID_TMP = FO.Call_Web_Service_MethodUID_Abfrage_NEU2020(ADRESSE.AdressenNr,, , , 2)
|
||||
If UID_TMP IsNot Nothing Then
|
||||
If UID_TMP.uid_valid Then
|
||||
'setKD(kdNr)
|
||||
picUIDAbfrage.BackgroundImage = My.Resources.ok
|
||||
Else
|
||||
picUIDAbfrage.BackgroundImage = My.Resources.del
|
||||
End If
|
||||
Else
|
||||
picUIDAbfrage.BackgroundImage = Nothing
|
||||
End If
|
||||
|
||||
FO.Call_Web_Service_MethodUID_Logout_NEU2020()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnCheckEORI_Click(sender As Object, e As EventArgs) Handles btnCheckEORI.Click
|
||||
If SND IsNot Nothing Then
|
||||
If SND.tblSnd_EmpfaengerKdNr > 0 Then
|
||||
|
||||
End If
|
||||
Dim KUNDEN As New VERAG_PROG_ALLGEMEIN.cKunde(SND.tblSnd_EmpfaengerKdNr)
|
||||
If KUNDEN IsNot Nothing Then
|
||||
txtEori.Text = If(KUNDEN.EORITIN, "")
|
||||
check_EORI(KUNDEN)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnCheckUID_Click(sender As Object, e As EventArgs) Handles btnCheckUID.Click
|
||||
If SND IsNot Nothing Then
|
||||
If SND.tblSnd_EmpfaengerKdNr > 0 Then
|
||||
|
||||
End If
|
||||
Dim ADRESSEN As New VERAG_PROG_ALLGEMEIN.cAdressen(SND.tblSnd_EmpfaengerKdNr)
|
||||
If ADRESSEN IsNot Nothing Then
|
||||
check_UID(ADRESSEN)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user