Monitoring Anpassung, MDM Plose Einarbeitung Consortio, Update SND DY Anm

This commit is contained in:
2023-01-10 10:07:34 +01:00
parent d2f9685c4e
commit b0bc10ec94
20 changed files with 263 additions and 64 deletions

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.4.3")>
<Assembly: AssemblyFileVersion("1.0.4.3")>
<Assembly: AssemblyVersion("1.0.4.4")>
<Assembly: AssemblyFileVersion("1.0.4.4")>

View File

@@ -771,6 +771,57 @@ Public Class cBrgDb
End Using
Return Nothing
End Function
Public Function getBrgSumFromBrgKto_FelligZukunft(ByVal brgKto As String, Optional where As String = "", Optional EinzahlungsbetraegeMitrechnen As Boolean = True, Optional faelligkeitsTAG As String = "", Optional faelligkeit As Object = Nothing) As String
Dim einzahlung = ""
If Not EinzahlungsbetraegeMitrechnen Then
einzahlung = " AND [brgak_art] NOT IN ('einzahlung') "
End If
Dim sql As String = ""
If faelligkeit Is Nothing Then
Dim faelligkeitWhere As String = ""
If faelligkeitsTAG <> "" Then
If faelligkeitsTAG = "16" Then
faelligkeitWhere = " And (DATEPART(day,[brgak_faelligkeitsdatum] )=" & faelligkeitsTAG & " Or [brgak_faelligkeitsdatum] Is null) "
Else
faelligkeitWhere = " And DATEPART(day,[brgak_faelligkeitsdatum] )=" & faelligkeitsTAG & " "
End If
End If
sql = "SELECT SUM(brgak_betrag) " &
" FROM tblBrgAufschub WHERE ( brgak_faelligkeitsdatum> getdate()) AND brgak_brgaktoId = '" & brgKto & "' " & where & einzahlung & faelligkeitWhere
Else
sql = "SELECT SUM(brgak_betrag) " &
" FROM tblBrgAufschub WHERE brgak_faelligkeitsdatum='" & CDate(faelligkeit).ToShortDateString & "' AND brgak_brgaktoId = '" & brgKto & "' " & where & einzahlung
End If
' MsgBox(sql)
' Dim daten As New List(Of cEntry)
Dim dr As SqlDataReader
Dim daten As New List(Of cBuergschaft)
Using conn As SqlConnection = VERAG_PROG_ALLGEMEIN.SQL.GetNewOpenConnectionADMIN()
Using cmd As New SqlCommand(sql, conn)
dr = cmd.ExecuteReader()
Try
Dim cnt As Integer = 0
If dr.Read Then
If Not dr.GetValue(0) Is DBNull.Value Then
Return dr.GetValue(0)
End If
End If
Return "0"
Catch ex As Exception
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Fehler mit der Datenbankverbindung:" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Datenbankfehler")
Finally
dr.Close()
End Try
End Using
End Using
Return Nothing
End Function
Public Function getBrgFromBrgKto(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal brgKto As String, Optional where As String = "", Optional EinzahlungsbetraegeMitrechnen As Boolean = True, Optional faelligkeitsTAG As String = "", Optional faelligkeit As Object = Nothing) As DataTable
Dim einzahlung = ""

View File

@@ -811,7 +811,7 @@ Public Class frmMain
Dim betrag As Double = 0
Dim betrag_oE As Double = 0
If ART = "ZOLL" Then
If ART = "ZOLL" Or ART = "EUST" Then
Dim betragBrg_16 As Double = BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,,, , CDate("16" & vonFaell.ToString(".MM.yyyy")))
Dim betragBrg_26 As Double = 0
If Now.Day <= 26 Then betragBrg_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.ToString(".MM.yyyy"))) '9
@@ -826,9 +826,26 @@ Public Class frmMain
betragBrg_oE_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("26" & Now.AddMonths(2).ToString(".MM.yyyy"))) '10
betrag_oE = CDbl(betragBrg_oE_16) + CDbl(betragBrg_oE_26)
'ElseIf ART = "EUST" Then
' Dim betragBrg_16 As Double = BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,,, , CDate("16" & vonFaell.ToString(".MM.yyyy")))
' Dim betragBrg_26 As Double = 0
' If Now.Day <= 26 Then betragBrg_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.ToString(".MM.yyyy"))) '9
' betragBrg_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.AddMonths(1).ToString(".MM.yyyy"))) '9
' betragBrg_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.AddMonths(2).ToString(".MM.yyyy"))) '10
' betrag = CDbl(betragBrg_16) + CDbl(betragBrg_26)
' Dim betragBrg_oE_16 As Double = BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("16" & vonFaell.ToString(".MM.yyyy")))
' Dim betragBrg_oE_26 As Double = 0
' If Now.Day <= 26 Then betragBrg_oE_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("26" & Now.ToString(".MM.yyyy"))) '9
' betragBrg_oE_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("26" & Now.AddMonths(1).ToString(".MM.yyyy"))) '9
' betragBrg_oE_26 += BRG.getBrgSumFromBrgKto(Nothing, Nothing, BRG_ID,, False, , CDate("26" & Now.AddMonths(2).ToString(".MM.yyyy"))) '10
' betrag_oE = CDbl(betragBrg_oE_16) + CDbl(betragBrg_oE_26)
Else
betrag = BRG.getBrgSumFromBrgKto(vonbrg.ToShortDateString, Now.ToShortDateString, BRG_ID)
betrag_oE = BRG.getBrgSumFromBrgKto(vonbrg.ToShortDateString, Now.ToShortDateString, BRG_ID,, False)
betrag = BRG.getBrgSumFromBrgKto_FelligZukunft(BRG_ID)
betrag_oE = BRG.getBrgSumFromBrgKto_FelligZukunft(BRG_ID,, False)
'betrag = BRG.getBrgSumFromBrgKto(vonbrg.ToShortDateString, Now.ToShortDateString, BRG_ID)
'betrag_oE = BRG.getBrgSumFromBrgKto(vonbrg.ToShortDateString, Now.ToShortDateString, BRG_ID,, False)
End If
@@ -868,7 +885,7 @@ Public Class frmMain
Try
Dim dt As DataTable
If ART = "ZOLL" Then
If ART = "ZOLL" Or ART = "EUST" Then
Dim dt_betragBrg_16 As DataTable = BRG.getBrgFromBrgKto(Nothing, Nothing, BRG_ID,,, , CDate("16" & vonFaell.ToString(".MM.yyyy")))
Dim dt_betragBrg_26 As New DataTable
If Now.Day <= 26 Then dt_betragBrg_26 = BRG.getBrgFromBrgKto(Nothing, Nothing, BRG_ID,, , , CDate("26" & Now.ToString(".MM.yyyy"))) '9