This commit is contained in:
2024-11-07 08:42:10 +01:00
5 changed files with 36 additions and 41 deletions

View File

@@ -38,6 +38,33 @@ Public Class usrCntlSND_ATBGestellung
If Not IsNumeric(SND.AbfertigungsNr) OrElse CInt(SND.AbfertigungsNr) < 100000 Then MsgBox("Abfertigungsnummer angeben!") : Exit Sub
If If(SND.tblSnd_ATB_T1, "") = "" Then MsgBox("MRN (Gestellung) angeben!") : Exit Sub
Dim Standort As String = ""
Select Case SND.FilialenNr
Case 4803, 4809
Standort = "VERAG AG"
Case 5601
Standort = "Unisped GmbH"
Case 5701
Standort = "AMBAR"
Case 4810,
Standort = "VERAG GmbH"
Case 5103
Standort = "VERAG CS"
Case 5501
Standort = "IMEX"
End Select
Dim GesSichRef = New VERAG_PROG_ALLGEMEIN.cGesamtsicherheitsReferenz(Standort)
If GesSichRef Is Nothing Then MsgBox("Verwahrungsreferenz kann nicht ermittelt werden!") : Exit Sub
Dim saldo = CDbl(GesSichRef.CalcSaldo())
If SND.tblSnd_Warenwert > saldo Then
If MsgBox("Gestellung kann NICHT durchgeführt werden!" & vbNewLine & "Eingetragener Warenwert: " & SND.tblSnd_Warenwert & " übersteigt den vorhandenen Sicherheitssaldo von: " & saldo & vbNewLine & "Trotzdem fortfahren", vbYesNoCancel) <> vbYes Then Exit Sub
End If
Dim frMZA As New SDL.frmZollanmeldung("AA", Nothing, AVISO, SND, Now.ToString("yy"))
frMZA.Show()
AddHandler frMZA.FormClosed, Sub()