Gestellungsprüfung Summe Saldo
This commit is contained in:
@@ -7411,48 +7411,15 @@ Public Class frmSendungsdetailsNEU
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Math.Round(calcWarenwerte, 2) <> Math.Round(SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert, 2) Then
|
If Math.Round(calcWarenwerte, 2) <> Math.Round(SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert, 2) AndAlso SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert <> "" Then
|
||||||
MsgBox("Warenwert für Gestellung stimmt nicht überein!" & vbNewLine & "Berechnerter Warenwert: " & Math.Round(calcWarenwerte, 2) & vbNewLine & "Eingetragener Warenwert: " & Math.Round(SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert, 2), MsgBoxStyle.Critical)
|
MsgBox("Warenwert für Gestellung stimmt nicht überein!" & vbNewLine & "Berechnerter Warenwert: " & Math.Round(calcWarenwerte, 2) & vbNewLine & "Eingetragener Warenwert: " & Math.Round(SENDUNG_LIST(CURRENT_INDEX).tblSnd_Warenwert, 2), MsgBoxStyle.Critical)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Dim Standort As String = ""
|
txtWarenwert.Text = Math.Round(calcWarenwerte, 2)
|
||||||
|
If txtWarenwertWaehrung._value = "" Then
|
||||||
|
txtWarenwertWaehrung._value = "EUR"
|
||||||
Select Case SENDUNG_LIST(CURRENT_INDEX).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
|
|
||||||
Exit Sub
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim saldo = GesSichRef.CalcSaldo()
|
|
||||||
If calcWarenwerte > saldo Then
|
|
||||||
MsgBox("Gestellung kann NICHT durchgeführt werden!" & vbNewLine & "Eingetragener Warenwert: " & calcWarenwerte & " übersteigt den vorhandenen Saldo von: " & saldo, MsgBoxStyle.Critical)
|
|
||||||
Else
|
|
||||||
MsgBox("Gestellung kann durchgeführt werden!")
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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 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
|
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"))
|
Dim frMZA As New SDL.frmZollanmeldung("AA", Nothing, AVISO, SND, Now.ToString("yy"))
|
||||||
frMZA.Show()
|
frMZA.Show()
|
||||||
AddHandler frMZA.FormClosed, Sub()
|
AddHandler frMZA.FormClosed, Sub()
|
||||||
|
|||||||
Reference in New Issue
Block a user