gestellungsgarantien, Vertraege, offeneAntraege, IDS
This commit is contained in:
@@ -3,7 +3,6 @@ Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Reflection
|
||||
Imports DocumentFormat.OpenXml.Office2016.Drawing.ChartDrawing
|
||||
|
||||
Public Class cIDS
|
||||
|
||||
@@ -664,12 +663,17 @@ Public Class cIDS
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Public Shared Function checkInvoices() As DataTable
|
||||
Public Shared Function checkInvoices(Optional reDatVon As Date = Nothing, Optional reDatBis As Date = Nothing) As DataTable
|
||||
Try
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Dim SQLstr = " "
|
||||
|
||||
Dim SQLstr = "select * from tblIDSInvoicesNew where invoice_id not in (select TotalInvoiceId from tblIDSInvoicesNewSplittedByCountry) and Year(YearMonthDay) >= 2025"
|
||||
If IsDate(reDatVon) AndAlso cDate(reDatVon) > "01.01.2020" AndAlso IsDate(reDatBis) AndAlso cDate(reDatBis) > "01.01.2020" Then
|
||||
SQLstr &= "select Invoicenumber as RechnungsNr ,YearMonthDay as Rechnungsdatum, Adressen.AdressenNr as KundenNr,Adressen.[Name 1] as Kunde, kde_keineMWSt,daId from tblIDSInvoicesNew Inner join [tbl_IDS_Kunden] on [tbl_IDS_Kunden].CustomerCode =tblIDSInvoicesNew.CustomerCode and isnull([tbl_IDS_Kunden].KdNrAlt, 1) = 0 Inner join Adressen on Adressen.AdressenNr = [tbl_IDS_Kunden].KdNrVERAG INNER JOIN tblKundenErweitert on Adressen.AdressenNr = kde_KundenNr where invoice_id not in (select TotalInvoiceId from tblIDSInvoicesNewSplittedByCountry) AND YearMonthDay >= '" & reDatVon.ToShortDateString & "' and YearMonthDay < '" & reDatBis.ToShortDateString & "'"
|
||||
Else
|
||||
SQLstr &= "select * from tblIDSInvoicesNew where invoice_id not in (select TotalInvoiceId from tblIDSInvoicesNewSplittedByCountry) AND Year(YearMonthDay) >= 2025"
|
||||
End If
|
||||
|
||||
Dim dt = (New VERAG_PROG_ALLGEMEIN.SQL).loadDgvBySql(SQLstr, "FMZOLL")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user