This commit is contained in:
2023-01-18 10:13:52 +01:00

View File

@@ -361,6 +361,12 @@ Imports System.Data.SqlClient
End Function End Function
Public Shared Function getWhereDblEntry() As String
Return " AND (SELECT count(*) FROM [tblUStVAntrag] as ANTRAG2 inner join [tblUStVPositionen] as POS2 on ANTRAG2.UStVAn_ID= POS2.UStVAn_ID
WHERE POS2.UStVPo_SchnittstellenNr=6 AND [plose_RechnungsNr] = POS2.UStVPo_ReNr AND [plose_RechnungsDatum]=POS2.UStVPo_ReDat ) = 0 "
End Function
Public Shared Function GET_Antraege_PLOSE(ByRef LIST As List(Of cPLOSE_USTV_ANTR), von As Date, bis As Date, KundenNr As Integer, Land As String, Optional Archiv As Object = Nothing) As Boolean Public Shared Function GET_Antraege_PLOSE(ByRef LIST As List(Of cPLOSE_USTV_ANTR), von As Date, bis As Date, KundenNr As Integer, Land As String, Optional Archiv As Object = Nothing) As Boolean
Try Try
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
@@ -375,6 +381,7 @@ Imports System.Data.SqlClient
AND plose_LieferantCode IN (0,1,7,9) AND plose_LieferantCode IN (0,1,7,9)
AND plp_Land ='" & Land & "' AND plp_Land ='" & Land & "'
/* " & If(Archiv IsNot Nothing, " AND plose_Archiv=@Archiv ", "") & "*/ /* " & If(Archiv IsNot Nothing, " AND plose_Archiv=@Archiv ", "") & "*/
group by [plose_RechnungsDatum],[plose_RechnungsNr],[plose_LieferantCode],[plose_Lieferant],[plose_WaehrungAbbuchung] group by [plose_RechnungsDatum],[plose_RechnungsNr],[plose_LieferantCode],[plose_Lieferant],[plose_WaehrungAbbuchung]
having sum(plose_MWSTBetrag)>0 having sum(plose_MWSTBetrag)>0
order by plose_RechnungsDatum order by plose_RechnungsDatum