Gestellungsprüfung Summe Saldo

This commit is contained in:
2024-11-05 16:49:30 +01:00
parent d5ef03fca4
commit 10f2218c43
2 changed files with 31 additions and 37 deletions

View File

@@ -7411,48 +7411,15 @@ Public Class frmSendungsdetailsNEU
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)
Else
Dim Standort As String = ""
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
txtWarenwert.Text = Math.Round(calcWarenwerte, 2)
If txtWarenwertWaehrung._value = "" Then
txtWarenwertWaehrung._value = "EUR"
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