This commit is contained in:
2025-04-14 08:57:35 +02:00
parent a96203522c
commit 5718ca74f8
2 changed files with 45 additions and 19 deletions

View File

@@ -2464,7 +2464,7 @@ Public Class frmMDM_USTVAntrag
Private Sub txtAbfNr_TextChanged(sender As Object, e As EventArgs) Handles txtAbfNr.TextChanged
If IsNumeric(txtAbfNr.Text) AndAlso CInt(txtAbfNr.Text) > 10000 AndAlso USTV_ANTRAG.AbfertigungsNr <> txtAbfNr.Text AndAlso Not btnAbfertigungsNrVergeben.Visible Then
If IsNumeric(txtAbfNr.Text) AndAlso CInt(txtAbfNr.Text) > 10000 AndAlso USTV_ANTRAG.AbfertigungsNr <> txtAbfNr.Text AndAlso (Not btnAbfertigungsNrVergeben.Visible) Then
Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, txtAbfNr.Text, 0)
If spedBuch.hasEntry Then
MsgBox("Es existiert bereits ein Speditionsbucheintrag mit dieser Nr!")
@@ -2498,6 +2498,32 @@ Public Class frmMDM_USTVAntrag
cbxFiliale.Enabled = False
btnAbfertigungsNrVergeben.Visible = False
End Sub
Private Sub txtAbfNr_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtAbfNr.PreviewKeyDown
If e.KeyValue = 9 Then
If IsNumeric(txtAbfNr.Text) AndAlso CInt(txtAbfNr.Text) > 10000 AndAlso USTV_ANTRAG.AbfertigungsNr <> txtAbfNr.Text Then
Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, txtAbfNr.Text, 0)
If spedBuch.hasEntry Then
MsgBox("Es existiert bereits ein Speditionsbucheintrag mit dieser Nr!")
Exit Sub
End If
If txtBezugsNr.Text = "" AndAlso txtAbfNr.Text.ToString.Length >= 6 Then
txtBezugsNr.Text = txtAbfNr.Text.Substring(txtAbfNr.Text.ToString.Length - 6, 6)
txtBezugsNr.Text = txtBezugsNr.Text.TrimStart("0"c)
End If
End If
End If
End Sub
Private Sub calcSumme()