zugferd check

This commit is contained in:
2026-09-28 09:17:05 +02:00
parent 406ece349c
commit 940ada8915

View File

@@ -8194,7 +8194,7 @@ repeatRequest:
End Sub End Sub
Private Function checkZugferd(sendNotificationEmails As Boolean) As Boolean Private Function checkZugferd(sendNotificationEmails As Boolean, Optional InvoicesUntilYesterday As Boolean = False) As Boolean
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
@@ -8202,7 +8202,13 @@ repeatRequest:
'aktuell verwendet Verag360 kein Zugferd und Sammelrechnung 6 geht aktuell noch nicht - 29.04.2026 Start der neuen Funktion! 'aktuell verwendet Verag360 kein Zugferd und Sammelrechnung 6 geht aktuell noch nicht - 29.04.2026 Start der neuen Funktion!
Dim dt As DataTable = SQL.loadDgvBySql("SELECT RK_ID, dsId, Firma_ID, RechnungsNr FROM [Rechnungsausgang] where [zugferdcheck_daid] is null and [zugferdcheck_datetime] is null and dsId is not null and cast(RechnungsDatum as Date) between '29.04.2026' and CONVERT(DATE, GETDATE()) and Sammelrechnung <> 6 and Firma_ID <> 19 ", "FMZOLL", 100, False) Dim DateString = "and CONVERT(DATE, GETDATE())"
If InvoicesUntilYesterday Then
DateString = "CONVERT(DATE, DATEADD(DAY, -1, GETDATE()))"
End If
Dim dt As DataTable = SQL.loadDgvBySql("SELECT RK_ID, dsId, Firma_ID, RechnungsNr FROM [Rechnungsausgang] where [zugferdcheck_daid] is null and [zugferdcheck_datetime] is null and dsId is not null and cast(RechnungsDatum as Date) between '29.04.2026' and " & DateString & " and Sammelrechnung <> 6 and Firma_ID <> 19 ", "FMZOLL", 100, False)
Dim sumTotal_IMEX As Integer = 0 Dim sumTotal_IMEX As Integer = 0
Dim sumTotal_VERAG As Integer = 0 Dim sumTotal_VERAG As Integer = 0
@@ -8491,7 +8497,7 @@ repeatRequest:
Private Function createMailTextZugferd(total As Integer, valid As Integer, invalid As Integer, Firma As String) As String Private Function createMailTextZugferd(total As Integer, valid As Integer, invalid As Integer, Firma As String) As String
Dim MailText = "Auflistung der gültigen/ungültigen ZUGFeRD-Prüfungen vom " & Now.ToShortDateString & " für " & Firma & " <br><br>" Dim MailText = "Auflistung der gültigen/ungültigen ZUGFeRD-Prüfungen vom " & Today.AddDays(-1).ToShortDateString & " für " & Firma & " <br><br>"
MailText &= "<table border=1>" MailText &= "<table border=1>"
MailText &= "<tr><td>Gültig</td><td>Ungültig</td><td>Gesamt</td></tr>" MailText &= "<tr><td>Gültig</td><td>Ungültig</td><td>Gesamt</td></tr>"
MailText &= "<tr>" MailText &= "<tr>"
@@ -8518,7 +8524,7 @@ repeatRequest:
End Select End Select
checkZugferd(sendNotificationEmails) checkZugferd(sendNotificationEmails, True)
End Sub End Sub
Private Sub LinkLabel54_LinkClicked_2(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel54.LinkClicked Private Sub LinkLabel54_LinkClicked_2(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel54.LinkClicked