Essensbestellungen, scanlist, etc.

This commit is contained in:
2025-02-26 14:35:25 +01:00
parent aecfcaffe0
commit b32a117a96
8 changed files with 709 additions and 636 deletions

View File

@@ -1279,6 +1279,22 @@ Public Class frmMDM_USTVAntrag
btnNachforderung.Visible = True
Panel5.BackColor = Color.SteelBlue
Panel5.ForeColor = Color.White
If USTV_ANTRAG.UStVAn_AntragEingereichtAm Is Nothing OrElse Not IsDate(USTV_ANTRAG.UStVAn_AntragEingereichtAm) Then
Dim f As New frmDatumsabfrage("Bitte Einreichdatum eingeben", False)
f.ShowDialog()
If f.DialogResult = DialogResult.OK Then
Dim pruefdatum As Date = CDate(f.Datum)
USTV_ANTRAG = New VERAG_PROG_ALLGEMEIN.cUSTVAntrag(UStVAn_ID)
USTV_ANTRAG.UStVAn_AntragEingereichtAm = pruefdatum
USTV_ANTRAG.SAVE()
cboStatus.changeItem(cUSTVStatus.STAT_EINGEREICHT)
init()
End If
End If
Case cUSTVStatus.STAT_ABGELEHNT
btnBearb.Visible = True
btnEingereicht.Visible = True
@@ -1336,16 +1352,21 @@ Public Class frmMDM_USTVAntrag
Private Sub btnEingereicht_Click(sender As Object, e As EventArgs) Handles btnEingereicht.Click
Dim f As New frmDatumsabfrage("Bitte Einreichtdatum eingeben", False)
f.ShowDialog()
If f.DialogResult = DialogResult.OK Then
Dim pruefdatum As Date = CDate(f.Datum)
USTV_ANTRAG = New VERAG_PROG_ALLGEMEIN.cUSTVAntrag(UStVAn_ID)
USTV_ANTRAG.UStVAn_AntragEingereichtAm = pruefdatum
USTV_ANTRAG.SAVE()
cboStatus.changeItem(cUSTVStatus.STAT_EINGEREICHT)
If USTV_ANTRAG.UStVAn_AntragEingereichtAm Is Nothing OrElse Not IsDate(USTV_ANTRAG.UStVAn_AntragEingereichtAm) Then
Dim f As New frmDatumsabfrage("Bitte Einreichdatum eingeben", False)
f.ShowDialog()
If f.DialogResult = DialogResult.OK Then
Dim pruefdatum As Date = CDate(f.Datum)
USTV_ANTRAG = New VERAG_PROG_ALLGEMEIN.cUSTVAntrag(UStVAn_ID)
USTV_ANTRAG.UStVAn_AntragEingereichtAm = pruefdatum
USTV_ANTRAG.SAVE()
cboStatus.changeItem(cUSTVStatus.STAT_EINGEREICHT)
init()
End If
End If
End Sub
Private Sub btnAbgelehnt_Click(sender As Object, e As EventArgs) Handles btnAbgelehnt.Click
@@ -1927,9 +1948,6 @@ Public Class frmMDM_USTVAntrag
SQL.doSQL("UPDATE tblUStVPositionen SET UStVPo_ID = " & counter & " WHERE UStVAn_ID=" & UStVAn_ID & " AND UStVPo_ID=" & USTV_POS.UStVPo_ID, "FMZOLL")
End If
Next
End Sub
@@ -2070,8 +2088,8 @@ Public Class frmMDM_USTVAntrag
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
USTV_ANTRAG.SAVE()
If IsDBNull(USTV_ANTRAG.FilialenNr) Then MsgBox("Für das Speditionsbuch muss die Filiale eingegeben werden.") : Exit Sub
If IsDBNull(USTV_ANTRAG.AbfertigungsNr) Then MsgBox("Für das Speditionsbuch muss die Abfertigungs-Nr eingegeben werden.") : Exit Sub
If IsDBNull(USTV_ANTRAG.FilialenNr) OrElse USTV_ANTRAG.FilialenNr Is Nothing OrElse USTV_ANTRAG.FilialenNr = 0 Then MsgBox("Für das Speditionsbuch muss die Filiale eingegeben werden.") : Exit Sub
If IsDBNull(USTV_ANTRAG.AbfertigungsNr) OrElse USTV_ANTRAG.AbfertigungsNr Is Nothing OrElse USTV_ANTRAG.AbfertigungsNr <= 0 Then MsgBox("Für das Speditionsbuch muss die Abfertigungs-Nr eingegeben werden.") : Exit Sub
Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr)
@@ -2091,7 +2109,7 @@ Public Class frmMDM_USTVAntrag
If .SAVE() Then MsgBox("Sped-Eintrag wurde angelegt")
End With
End Sub
End Sub
Private Sub initdgvErstattungen()

View File

@@ -70,9 +70,16 @@ Public Class ustCntlUSTV_AntragPosition
Case 4, 9 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblMSEInvoices] as inv inner join tblMSECustomers on inv.customer_number = customer_id where invoice_date='" & UStV_POS.UStVPo_ReDat & "' and country='" & Antrag_LandKz & "' AND partner_customer_number = " & kdnr & " AND daId is not null", "FMZOLL",,, -1)
Case 10 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblUTAImportNew] where Rechnungsdatum='" & UStV_POS.UStVPo_ReDat & "' and Abrechnungsnummer='" & UStV_POS.UStVPo_ReNr & "' and Lieferland_ISO2='" & Antrag_LandKz & "' AND daId is not null", "FMZOLL",,, -1)
Case 8 : da_id = sql.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNew.daId FROM [tblIDSTransactionsNew] INNER JOIN tbl_IDS_Länder ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode LEFT JOIN tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber where tblIDSTransactionsNew.[YearMonthDay] ='" & UStV_POS.UStVPo_ReDat & "' and ISNULL(tblIDSTransactionsNew.[OBONumber], ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) ='" & UStV_POS.UStVPo_ReNr & "' and tbl_IDS_Länder.Lieferland_ISO2='" & Antrag_LandKz & "' AND tblIDSInvoicesNew.daId is not null", "FMZOLL",,, -1)
Case 1 : da_id = 1 'VERAG-RECHNUGNEN werden immer direkt OHNE daid geöffnet!
Case -1 : IIf(UStV_POS.UStVPo_daId > 0, UStV_POS.UStVPo_daId, -1)
End Select
scanSonstiges.INIT_daId(da_id)
If da_id > -1 Then
scanSonstiges.INIT_daId(da_id)
Else
scanSonstiges.INIT(kdnr, "MDM", "MDM_DATEN", "DIVERSE")
End If
scanUSTVFABest.INIT(kdnr, "KUNDENDATEN", "FA_Bestaetigungen")
scanUSTVVollmachten.INIT(kdnr, "KUNDENDATEN", "USTV_Vollmachten")
@@ -427,4 +434,9 @@ Public Class ustCntlUSTV_AntragPosition
End Sub
Private Sub scanSonstiges_FileAdded(id As String, path As String, name As String) Handles scanSonstiges.FileAdded
getValues(UStV_POS, True)
UStV_POS.UStVPo_daId = id
UStV_POS.SAVE()
End Sub
End Class

View File

@@ -85,13 +85,13 @@ Public Class ustCntlUSTV_ErstattungPosition
If txtBelegNr.Text <> "" Then
UStV_ERS.Belegnummer = txtBelegNr.Text
Else
save = False
'save = False
End If
If txtBelegDatum.Text <> "" AndAlso IsDate(txtBelegDatum.Text) Then
UStV_ERS.Belegdatum = txtBelegDatum._value
Else
save = False
'save = False
End If
If txtUSTBetrag.Text <> "" Then

View File

@@ -1100,7 +1100,7 @@ Public Class frmEssensbestellungenAdministration
dt_nichtBezahlteEB = dt_nichtBezahlteEB.Select("eb_abgerechnet = 0", "eb_mitid").CopyToDataTable
If vbYes = MsgBox("Möchten Sie einen Reminder für die noch nicht bezahlten Essensbestellungen verschicken?" & vbNewLine & IIf(cboAbteilung._value Is "", " alle Abteilungen", "Abteilung " & cboAbteilung._value) & " im Gebäude: " & cboGebaeude._value, vbYesNoCancel) Then
If vbYes = MsgBox("Möchten Sie einen Reminder für die noch nicht bezahlten Essensbestellungen verschicken?" & vbNewLine & IIf(cboAbteilung._value Is "", "Alle Abteilungen", "Abteilung " & cboAbteilung._value) & " im Gebäude: " & cboGebaeude._value, vbYesNoCancel) Then
Dim displayView = New DataView(dt_nichtBezahlteEB, "", "eb_mitid", DataViewRowState.CurrentRows)
Dim distinctDT As DataTable = displayView.ToTable(True, "eb_mitid")
@@ -1132,8 +1132,8 @@ Public Class frmEssensbestellungenAdministration
If result IsNot Nothing AndAlso IsNumeric(result) Then
result = CDbl(result)
Select Case mit.mit_abteilung
Case "MDM" ' -> per Mail weil SDL keine Benachrichtigungen:
If mit.mit_email <> "" Then
Case "MDM", "EDV" ' -> per Mail weil SDL keine Benachrichtigungen hat und EDV nicht ins AVISO schaut:
If mit.mit_email <> "" AndAlso Not emailEmpf.Contains(mit.mit_email) Then
emailEmpf &= mit.mit_email & ";"
End If

File diff suppressed because it is too large Load Diff

View File

@@ -361,9 +361,9 @@ Partial Class usrcntlFremdrechnungen
Me.cbxMax1000Eintrage.CheckState = System.Windows.Forms.CheckState.Checked
Me.cbxMax1000Eintrage.Location = New System.Drawing.Point(8, 130)
Me.cbxMax1000Eintrage.Name = "cbxMax1000Eintrage"
Me.cbxMax1000Eintrage.Size = New System.Drawing.Size(111, 17)
Me.cbxMax1000Eintrage.Size = New System.Drawing.Size(117, 17)
Me.cbxMax1000Eintrage.TabIndex = 41
Me.cbxMax1000Eintrage.Text = "max. 200 Einträge"
Me.cbxMax1000Eintrage.Text = "max. 1000 Einträge"
Me.cbxMax1000Eintrage.UseVisualStyleBackColor = True
'
'lblEinträge