diff --git a/SDL/My Project/AssemblyInfo.vb b/SDL/My Project/AssemblyInfo.vb index cdd56e0c..4f76127f 100644 --- a/SDL/My Project/AssemblyInfo.vb +++ b/SDL/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/SDL/USTV/frmMDM_USTVAntrag.vb b/SDL/USTV/frmMDM_USTVAntrag.vb index 2d607f19..bd76ff01 100644 --- a/SDL/USTV/frmMDM_USTVAntrag.vb +++ b/SDL/USTV/frmMDM_USTVAntrag.vb @@ -3545,6 +3545,12 @@ Public Class frmMDM_USTVAntrag Else + Dim Fehlertext As String = "" + If Not checkSpedbuchEintrag(Fehlertext) Then + If Fehlertext <> "" Then MsgBox(Fehlertext) + Exit Sub + End If + Dim hasVZ = IIf(item.Name.Contains("_VZ"), True, False) Dim f As New SDL.frmAbrechnungsMaskeEinzeln(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr, IIf(USTV_ANTRAG.UStVAn_ErstattungsbetragEUR >= 0, "AG", "AR"), hasVZ) @@ -3616,5 +3622,28 @@ Public Class frmMDM_USTVAntrag End Sub + Private Function checkSpedbuchEintrag(ByRef Fehlertext As String) + + Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr, 0) + + 'If spedBuch.VermittlerOffertenNr <> spedBuch.Abfertigungsart Then + + If spedBuch.VermittlerOffertenNr <> (CInt(spedBuch.Abfertigungsart) - 100) Then + Fehlertext = "Speditionsbucheintrag prüfen!" & vbNewLine & "OffertenNr stimmen nicht überein!" + Return False + End If + + If spedBuch.ErfassungsNr = "" Then + Fehlertext = "Speditionsbucheintrag prüfen!" & vbNewLine & "Erfassungs-Nr nicht gesetzt!" + Return False + End If + + Return True + + + + + End Function + End Class \ No newline at end of file