UID-Pruefung, BH, etc.

This commit is contained in:
2025-11-07 09:58:39 +01:00
parent cf130e2056
commit a0dd0b0213
3 changed files with 473 additions and 448 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,7 @@ Public Class usrCntlBH
Private Sub usrCntlBH_Load(sender As Object, e As EventArgs) Handles Me.Load
'MyComboBox1.fillWithSQL(" SELECT tblUStVAntrag.UStVAn_LandKz,tblUStVAntrag.UStVAn_LandKz FROM tblUStVAntrag GROUP BY tblUStVAntrag.UStVAn_LandKz HAVING (((tblUStVAntrag.UStVAn_LandKz) Is Not Null)) ", False, "FMZOLL", True)
cboAbfVerbFirma.fillWithSQL(" SELECT distinct([Firma]) FROM [VERAG].[dbo].[Filialen] order by [Firma]", False, "FMZOLL", True)
cboAbfVerbFirma.fillWithSQL("SELECT distinct([Firma]) FROM [VERAG].[dbo].[Filialen] order by [Firma]", False, "FMZOLL", True)
cboAbfVerbFirma.changeItem(VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA)
cbxFirmaUID.Items.Add(New MyListItem("AMBAR", "AMBAR"))
@@ -84,8 +84,6 @@ Public Class usrCntlBH
Next
End Select
' If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_abteilung = "MDM" Then CheckBox1.Checked = True : cbxSDLLeistungenSperre.Checked = True 'VERALTET
'txtOPRisikoBetragVon._value = ""
txtOPUmsatzVon.Text = "01.01." & (Now.Year - 1)
txtOPUmsatzBis.Text = "31.12." & (Now.Year - 1)
txtBagatellgrenzeBei._value = 800
@@ -797,7 +795,7 @@ Public Class usrCntlBH
f.ShowDialog(Me)
End Sub
Private Sub Button13_Click(sender As Object, e As EventArgs) Handles btnZinsbelastung.Click
Private Sub btnZinsbelastung_Click(sender As Object, e As EventArgs) Handles btnZinsbelastung.Click
If txtKdNrvon.Text = "" OrElse Not IsNumeric(txtKdNrvon.Text) Then
txtKdNrvon.Focus()
@@ -1341,15 +1339,13 @@ Public Class usrCntlBH
Try
If txtUID_Jahr.Text <> "" AndAlso IsNumeric(txtUID_Jahr.Text) AndAlso txtUID_Jahr.Text.Length = 4 Then
If txtUID_Monat.Text = "" OrElse txtUID_Monat.Text <> "" AndAlso IsNumeric(txtUID_Monat.Text) AndAlso CInt(txtUID_Monat.Text) > 0 AndAlso CInt(txtUID_Monat.Text) < 13 Then
Dim SQL_UID As String = "SELECT [uid_KundenNr] as KdNr , Adressen.[Name 1],[uid_UstIdKz] as UstIdKz,[uid_UstIdNr] as UstIdnr, case when [uid_valid] = 1 then 'GUELTIG' else 'UNGUELTIG' end as Ergebnis, cast([uid_Datum] as date) as Pruefdatum,Convert(varchar(8), [uid_Datum], 108) As Pruefzeit, [tblUIDPruefung].[firma] as Firma, cast(Adressen.UstIdGeprüft as date) as [letzte Prüfung], uid_pruefungstool as Quelle, uid_Sachbearbeiter as Sachbearbeiter, Filialen.FilialenNr
FROM [VERAG].[dbo].[tblUIDPruefung] inner join Adressen on Adressen.AdressenNr = [uid_KundenNr] inner Join kunden On KundenNr=AdressenNr inner join Filialen On Filialen.FilialenNr=Kunden.FilialenNr
where YEAR(uid_Datum) = " & txtUID_Jahr.Text & IIf(txtUID_Monat.Text <> "", " AND MONTH(uid_Datum) = " & txtUID_Monat.Text, "") & IIf(cbxFirmaUID._value <> "", " And [tblUIDPruefung].[firma] = '" & cbxFirmaUID._value & "'", "") & IIf(cbx_nur_ungueltige.Checked, " AND [uid_valid] = 0 ", "") & " ORDER BY Filialen.FilialenNr "
where YEAR(uid_Datum) = " & txtUID_Jahr.Text & IIf(txtUID_Monat.Text <> "", " AND MONTH(uid_Datum) = " & txtUID_Monat.Text, "") & IIf(cbxFirmaUID._value <> "", " And Filialen.Firma = '" & cbxFirmaUID._value & "'", "") & IIf(cbx_nur_ungueltige.Checked, " AND [uid_valid] = 0 ", "") & " ORDER BY Filialen.FilialenNr "
Me.Cursor = Cursors.WaitCursor
Dim dt_UID As DataTable = SQL.loadDgvBySql(SQL_UID, "FMZOLL")
@@ -1435,4 +1431,6 @@ Public Class usrCntlBH
Try : Process.Start(sender.tag) : Catch : End Try
End If
End Sub
End Class

View File

@@ -219,7 +219,7 @@ Public Class cUIDPruefung
Case "FINANZONLINE"
Dim FO As New VERAG_PROG_ALLGEMEIN.cFinanzOnlineWebService
'VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERAG" WARUM?
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "" Then VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERAG"
FO.initValues()
Dim counter = 0
Dim errorCounter As Integer = 0