plose, etc.
This commit is contained in:
@@ -367,25 +367,39 @@ Public Class cPLOSE_Inv_Data
|
||||
End Function
|
||||
|
||||
Public Shared Function countBackToCustomerNotSet(SQL As SQL) As Integer
|
||||
Return SQL.getValueTxtBySql("SELECT count(plInv_InvToCustomer) FROM [tblPLOSE_Inv_Data] where plInv_InvToCustomer Is null ", "FMZOLL",,, -1)
|
||||
Return SQL.getValueTxtBySql("SELECT count(*) FROM [tblPLOSE_Inv_Data] where plInv_InvToCustomer Is null ", "FMZOLL",,, -1)
|
||||
End Function
|
||||
|
||||
Public Shared Function checkPDFInvoices(Optional reDatVon As Date = Nothing, Optional reDatBis As Date = Nothing) As DataTable
|
||||
Public Shared Function countBackToCustomerNotSet(SQL As SQL, AdressenNrVon As Integer, AdressenNrBis As Integer) As Integer
|
||||
Return SQL.getValueTxtBySql("SELECT count(*) FROM [tblPLOSE_Inv_Data] inner join Adressen on Adressen.PLOSEKundenNr = plInv_PLOSEKundennummer where plInv_InvToCustomer Is null and Adressen.AdressenNr between " & AdressenNrVon & " AND " & AdressenNrBis, "FMZOLL",,, -1)
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function checkPDFInvoices(Optional reDatVon As Date = Nothing, Optional reDatBis As Date = Nothing, Optional dt As DataTable = Nothing, Optional AdressenNrVon As Integer = -1, Optional AdressenNrBis As Integer = -1) As Integer
|
||||
Try
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Dim sqlTime As String = ""
|
||||
Dim sqlAdressenNr As String = ""
|
||||
|
||||
If IsDate(reDatVon) AndAlso CDate(reDatVon) > "01.01.2020" AndAlso IsDate(reDatBis) AndAlso CDate(reDatBis) > "01.01.2020" Then
|
||||
sqlTime = " And cast([plInv_SupplierRechnungsDatum] As Date) between '" & reDatVon.ToShortDateString & "' and '" & reDatBis.ToShortDateString & "'"
|
||||
End If
|
||||
|
||||
Dim SQLstr = "Select [plInv_SupplierRechnungsNr] As RechnungsNr,plInv_SupplierRechnungsDatum As Rechnungsdatum,Adressen.AdressenNr,Adressen.[Name 1] As Kunde, kde_keineMWSt As keineMWST from [tblPLOSE_Inv_Data] INNER JOIN Adressen On [plInv_PLOSEKundennummer]=Adressen.PLOSEKundenNr INNER JOIN tblKundenErweitert On AdressenNr = kde_KundenNr where [plInv_daId] Is null " & sqlTime & " group by plInv_SupplierRechnungsNr, Adressen.AdressenNr, Adressen.[Name 1], plInv_SupplierRechnungsDatum, kde_keineMWSt"
|
||||
If AdressenNrVon > 0 AndAlso AdressenNrBis > 0 Then
|
||||
sqlAdressenNr = " AND Adressen.AdressenNr between " & AdressenNrVon & " AND " & AdressenNrBis
|
||||
End If
|
||||
|
||||
Dim dt = (New VERAG_PROG_ALLGEMEIN.SQL).loadDgvBySql(SQLstr, "FMZOLL")
|
||||
If dt IsNot Nothing Then
|
||||
Dim SQLstr = "Select [plInv_SupplierRechnungsNr] As RechnungsNr,plInv_SupplierRechnungsDatum As Rechnungsdatum,Adressen.AdressenNr,Adressen.[Name 1] As Kunde, kde_keineMWSt As keineMWST from [tblPLOSE_Inv_Data] INNER JOIN Adressen On [plInv_PLOSEKundennummer]=Adressen.PLOSEKundenNr INNER JOIN tblKundenErweitert On AdressenNr = kde_KundenNr where [plInv_daId] Is null " & sqlTime & sqlAdressenNr & " group by plInv_SupplierRechnungsNr, Adressen.AdressenNr, Adressen.[Name 1], plInv_SupplierRechnungsDatum, kde_keineMWSt"
|
||||
dt = (New VERAG_PROG_ALLGEMEIN.SQL).loadDgvBySql(SQLstr, "FMZOLL")
|
||||
Return dt.Rows.Count
|
||||
|
||||
Return dt
|
||||
Else
|
||||
Dim SQLstr = "Select count(plInv_SupplierRechnungsNr) from [tblPLOSE_Inv_Data] INNER JOIN Adressen On [plInv_PLOSEKundennummer]=Adressen.PLOSEKundenNr INNER JOIN tblKundenErweitert On AdressenNr = kde_KundenNr where [plInv_daId] Is null " & sqlTime & sqlAdressenNr & " group by plInv_SupplierRechnungsNr, Adressen.AdressenNr, Adressen.[Name 1], plInv_SupplierRechnungsDatum, kde_keineMWSt"
|
||||
Return SQL.getValueTxtBySql(SQLstr, "FMZOLL",,, 0)
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
@@ -402,8 +416,8 @@ Public Class cPLOSE_Inv_Data
|
||||
If jahr < 2020 Then Return False
|
||||
|
||||
|
||||
Dim REohneWaehrung As String = "SELECT [plInv_SupplierRechnungsDatum],[plInv_SupplierRechnungsNr],[plInv_SupplierCountry],[plInv_Lieferant]
|
||||
FROM [VERAG].[dbo].[tblPLOSE_Inv_Data]
|
||||
Dim REohneWaehrung As String = "Select [plInv_SupplierRechnungsDatum], [plInv_SupplierRechnungsNr], [plInv_SupplierCountry], [plInv_Lieferant]
|
||||
From [VERAG].[dbo].[tblPLOSE_Inv_Data]
|
||||
where YEAR( [plInv_SupplierRechnungsDatum]) = " & jahr & " and plInv_Currency is null " & IIf(kdNr > 0, " and plInv_PLOSEKundennummer = " & kdNr, "") & "
|
||||
Group by [plInv_SupplierCountry],[plInv_Lieferant],[plInv_SupplierRechnungsDatum],[plInv_SupplierRechnungsNr]"
|
||||
|
||||
|
||||
@@ -5460,9 +5460,9 @@ Public Class frmStartOptions
|
||||
If invoice IsNot Nothing And invoice.Columns.Contains("invoice_id") AndAlso invoice.Rows.Count > 0 Then
|
||||
|
||||
Dim dvInvoice As New DataView(invoice)
|
||||
' Dim distinctInv As DataTable = dvInvoice.ToTable(True, New String() {"invoice_id"})
|
||||
Dim distinctInv As DataTable = dvInvoice.ToTable(True, New String() {"invoice_id"})
|
||||
|
||||
Dim distinctInv As DataTable = (New SQL).loadDgvBySql("select distinct(invoice_id) FROM [VERAG].[dbo].[tblMSEInvoices] where invoice_date = '2026-03-15' and invoice_id is not null ", "FMZOLL")
|
||||
'Dim distinctInv As DataTable = (New SQL).loadDgvBySql("select distinct(invoice_id) FROM [VERAG].[dbo].[tblMSEInvoices] where invoice_date = '2026-03-15' and invoice_id is not null ", "FMZOLL")
|
||||
|
||||
|
||||
For Each r As DataRow In distinctInv.Rows
|
||||
@@ -7446,7 +7446,8 @@ repeatRequest:
|
||||
Private Sub lblIDS_plauscheck_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lblIDS_plauscheck.LinkClicked
|
||||
|
||||
Dim IDS As cIDS
|
||||
Dim dt = IDS.checkPDFInvoices()
|
||||
Dim dt As New DataTable
|
||||
IDS.checkPDFInvoices(,, dt)
|
||||
|
||||
If dt.Rows.Count > 0 Then
|
||||
|
||||
|
||||
Reference in New Issue
Block a user