BH, Helferfunktionen, CHAT Refactor!!!!!!
This commit is contained in:
@@ -71,6 +71,31 @@ Public Class cMSEAPI
|
||||
Return SQL.getValueTxtBySql("SELECT count(InvToCustomer) FROM [tblMSEInvoices] where InvToCustomer Is null ", "FMZOLL",,, -1)
|
||||
End Function
|
||||
|
||||
Public Shared Function checkPDFInvoices(Optional reDatVon As Date = Nothing, Optional reDatBis As Date = Nothing) As DataTable
|
||||
Try
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Dim sqlTime As String = ""
|
||||
|
||||
If IsDate(reDatVon) AndAlso CDate(reDatVon) > "01.01.2020" AndAlso IsDate(reDatBis) AndAlso CDate(reDatBis) > "01.01.2020" Then
|
||||
sqlTime = " And cast(invoice_date As Date) between '" & reDatVon.ToShortDateString & "' and '" & reDatBis.ToShortDateString & "'"
|
||||
End If
|
||||
|
||||
Dim SQLstr = "Select invoice_id As RechnungsNr,[invoice_date] As Rechnungsdatum, Adressen.AdressenNr As KundenNr,Adressen.[Name 1] As Kunde, kde_keineMWSt As keineMWST from tblMSEInvoices inner join [tblMSECustomers] On [customer_number] = [customer_id] INNER JOIN Adressen On Adressen.MSEKundenNr = [customer_number] INNER JOIN tblKundenErweitert On AdressenNr = kde_KundenNr where daId Is null " & sqlTime & " group by invoice_id, Adressen.AdressenNr, Adressen.[Name 1], invoice_date, kde_keineMWSt"
|
||||
|
||||
Dim dt = (New VERAG_PROG_ALLGEMEIN.SQL).loadDgvBySql(SQLstr, "FMZOLL")
|
||||
|
||||
Return dt
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
Return Nothing
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user