This commit is contained in:
2025-04-11 12:13:42 +02:00
parent 4fa46772e1
commit 329621d2d8
2 changed files with 97 additions and 3 deletions

View File

@@ -296,6 +296,7 @@ Public Class frmMDM_USTVAntrag
txt3470.Text = If(USTV_ANTRAG.UStVAn_3470, "")
txtVZ.Text = If(USTV_ANTRAG.UStVAn_VZBetrag, "")
txtVZam.Text = If(USTV_ANTRAG.UStVAn_VZDatum, "")
txtBezugsNr.Text = If(USTV_ANTRAG.UStVAn_BezugsNr, "")
txtAbfNr.Text = If(USTV_ANTRAG.AbfertigungsNr, "")
txtEingereichtAm.Text = If(USTV_ANTRAG.UStVAn_AntragEingereichtAm, "")
@@ -318,6 +319,7 @@ Public Class frmMDM_USTVAntrag
USTV_ANTRAG.UStVAn_AntragArt = cboAntragArt._value
USTV_ANTRAG.UStVAn_StatusText = rtbStatusText.Text
USTV_ANTRAG.FilialenNr = cbxFiliale._value
USTV_ANTRAG.FilialenNr = cbxFiliale._value
If txt3470.Text <> "" AndAlso IsNumeric(txt3470.Text) Then
@@ -332,6 +334,13 @@ Public Class frmMDM_USTVAntrag
USTV_ANTRAG.UStVAn_VZBetrag = Nothing
End If
If txtVZam.Text <> "" AndAlso IsDate(txtVZam.Text) Then
USTV_ANTRAG.UStVAn_VZDatum = CDate(txtVZ.Text)
Else
USTV_ANTRAG.UStVAn_VZDatum = Nothing
End If
USTV_ANTRAG.UStVAn_BezugsNr = txtBezugsNr.Text
USTV_ANTRAG.AbfertigungsNr = txtAbfNr.Text
@@ -523,6 +532,8 @@ Public Class frmMDM_USTVAntrag
setinfofields()
If VERAG_PROG_ALLGEMEIN.cAllgemein.AUTO_ABF_NR Then btnAbfertigungsNrVergeben.Visible = True
End Sub
@@ -1370,6 +1381,9 @@ Public Class frmMDM_USTVAntrag
End Sub
Private Sub frmMDM_USTVAntrag_Shown(sender As Object, e As EventArgs) Handles Me.Shown
If IsNumeric(txtAbfNr.Text) AndAlso CInt(txtAbfNr.Text) > 0 Then btnAbfertigungsNrVergeben.Visible = False
Me.Top = 0
Me.Height = Screen.FromRectangle(Me.Bounds).WorkingArea.Size.Height
End Sub
@@ -1534,7 +1548,7 @@ Public Class frmMDM_USTVAntrag
End If
UstCntlUSTV_AntragPosition1.Enabled = False
UstCntlUSTV_AntragPosition1.Enabled = False
End If
End Sub
@@ -2446,6 +2460,26 @@ Public Class frmMDM_USTVAntrag
End Sub
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
Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr, 0)
If spedBuch.hasEntry Then MsgBox("Es existiert bereits ein Speditionsbucheintrag mit dieser Nr!") : Exit Sub
End If
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles btnAbfertigungsNrVergeben.Click
If Not IsNumeric(cbxFiliale._value) OrElse CInt(cbxFiliale._value) <= 0 Then
MsgBox("Bitte Filiale auswählen!") : Exit Sub
End If
txtAbfNr.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.getMaxPosNrIncrement(cbxFiliale._value, Now.Year)
cbxFiliale.Enabled = False
btnAbfertigungsNrVergeben.Visible = False
End Sub
Private Sub calcSumme()
Dim countSumme As Double = 0