This commit is contained in:
2023-01-17 21:26:54 +01:00
parent 7450ece7d2
commit 765e1e8755

View File

@@ -361,6 +361,12 @@ Imports System.Data.SqlClient
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
Try
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 plp_Land ='" & Land & "'
/* " & If(Archiv IsNot Nothing, " AND plose_Archiv=@Archiv ", "") & "*/
group by [plose_RechnungsDatum],[plose_RechnungsNr],[plose_LieferantCode],[plose_Lieferant],[plose_WaehrungAbbuchung]
having sum(plose_MWSTBetrag)>0
order by plose_RechnungsDatum