cPlose Anpassung
This commit is contained in:
@@ -244,6 +244,7 @@ Imports System.Data.SqlClient
|
||||
GET_Antraege_PLOSE(LIST, von, bis, KundenNr, Land, Archiv)
|
||||
GET_Antraege_ByLieferantCode(LIST, "'90'", von, bis, KundenNr, Land, Archiv) 'SOFICO
|
||||
|
||||
cPLOSE_USTV_ANTR.reOrderList(LIST)
|
||||
Return LIST
|
||||
End Function
|
||||
|
||||
@@ -262,10 +263,11 @@ Imports System.Data.SqlClient
|
||||
where cast(plose_SupplierRechnungsDatum as date) between @von and @bis and AdressenNr=@AdressenNr
|
||||
AND plose_LieferantCode IN (" & LieferantCode & ")
|
||||
AND plp_Land ='" & Land & "'
|
||||
" & If(Archiv IsNot Nothing, " AND plose_Archiv=@Archiv ", "") & "
|
||||
/* " & If(Archiv IsNot Nothing, " AND plose_Archiv=@Archiv ", "") & "*/
|
||||
group by [plose_SupplierRechnungsDatum],[plose_SupplierRechnungsNr],[plose_LieferantCode],[plose_Lieferant],[plose_WaehrungAbbuchung]
|
||||
having sum(plose_MWSTBetrag)>0
|
||||
", conn)
|
||||
order by plose_SupplierRechnungsDatum
|
||||
", conn)
|
||||
|
||||
cmd.Parameters.AddWithValue("@von", von)
|
||||
cmd.Parameters.AddWithValue("@bis", bis)
|
||||
@@ -314,11 +316,12 @@ Imports System.Data.SqlClient
|
||||
INNER JOIN Adressen on PLOSEKundenNr=plose_POLSEKundennummer
|
||||
INNER JOIN [tblPLOSE_Produktbeschreibung] ON [plp_ProductCode]=[plose_ProduktCode]
|
||||
where cast(plose_RechnungsDatum as date) between @von and @bis and AdressenNr=@AdressenNr
|
||||
AND plose_LieferantCode IN (0,7)
|
||||
AND plose_LieferantCode IN (0,1,7)
|
||||
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]
|
||||
having sum(plose_MWSTBetrag)>0
|
||||
order by plose_RechnungsDatum
|
||||
", conn)
|
||||
|
||||
cmd.Parameters.AddWithValue("@von", von)
|
||||
@@ -358,6 +361,62 @@ Imports System.Data.SqlClient
|
||||
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
|
||||
|
||||
' Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
' Using cmd As New SqlCommand("SELECT [plose_RechnungsDatum],[plose_RechnungsNr],[plose_Lieferant],[plose_LieferantCode],sum([plose_NettobetragWaehrungAbbuchung])[plose_NettobetragWaehrungAbbuchung],sum([plose_MWSTBetragWaehrungAbbuchung])[plose_MWSTBetragWaehrungAbbuchung] ,sum([plose_BruttobetragWaehrungAbbuchung] )[plose_BruttobetragWaehrungAbbuchung], [plose_WaehrungAbbuchung]
|
||||
' ,sum([plose_NettobetragTransaktion])[plose_NettobetragTransaktion],sum([plose_MWSTBetrag])[plose_MWSTBetrag] ,sum([plose_BruttobetragTransaktion] )[plose_BruttobetragTransaktion]
|
||||
' FROM [tblPLOSE_Details]
|
||||
' INNER JOIN Adressen on PLOSEKundenNr=plose_POLSEKundennummer
|
||||
' INNER JOIN [tblPLOSE_Produktbeschreibung] ON [plp_ProductCode]=[plose_ProduktCode]
|
||||
' where cast(plose_RechnungsDatum as date) between @von and @bis and AdressenNr=@AdressenNr
|
||||
' AND plose_LieferantCode IN (0,1,7)
|
||||
' 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
|
||||
' ", conn)
|
||||
|
||||
' cmd.Parameters.AddWithValue("@von", von)
|
||||
' cmd.Parameters.AddWithValue("@bis", bis)
|
||||
' cmd.Parameters.AddWithValue("@AdressenNr", KundenNr)
|
||||
' If Archiv IsNot Nothing Then cmd.Parameters.AddWithValue("@Archiv", If(Archiv, 1, 0))
|
||||
|
||||
' Dim dr = cmd.ExecuteReader()
|
||||
' While dr.Read
|
||||
|
||||
' Dim cPLOSE_USTV_ANT As New cPLOSE_USTV_ANTR
|
||||
' cPLOSE_USTV_ANT.plose_RechnungsDatum = dr.Item("plose_RechnungsDatum")
|
||||
' cPLOSE_USTV_ANT.plose_RechnungsNr = dr.Item("plose_RechnungsNr")
|
||||
' cPLOSE_USTV_ANT.plose_Lieferant = dr.Item("plose_Lieferant")
|
||||
' cPLOSE_USTV_ANT.plose_LieferantCode = dr.Item("plose_LieferantCode")
|
||||
' cPLOSE_USTV_ANT.plose_NettobetragTransaktion = dr.Item("plose_NettobetragTransaktion")
|
||||
' cPLOSE_USTV_ANT.plose_MWSTBetrag = dr.Item("plose_MWSTBetrag")
|
||||
' cPLOSE_USTV_ANT.plose_BruttobetragTransaktion = dr.Item("plose_BruttobetragTransaktion")
|
||||
' cPLOSE_USTV_ANT.plose_NettobetragWaehrungAbbuchung = dr.Item("plose_NettobetragWaehrungAbbuchung")
|
||||
' cPLOSE_USTV_ANT.plose_MWSTBetragWaehrungAbbuchung = dr.Item("plose_MWSTBetragWaehrungAbbuchung")
|
||||
' cPLOSE_USTV_ANT.plose_BruttobetragWaehrungAbbuchung = dr.Item("plose_BruttobetragWaehrungAbbuchung")
|
||||
' cPLOSE_USTV_ANT.plose_WaehrungAbbuchung = dr.Item("plose_WaehrungAbbuchung")
|
||||
|
||||
' LIST.Add(cPLOSE_USTV_ANT)
|
||||
|
||||
' End While
|
||||
' dr.Close()
|
||||
|
||||
' End Using
|
||||
' End Using
|
||||
' Return True
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
' End Try
|
||||
' Return False
|
||||
|
||||
'End Function
|
||||
|
||||
|
||||
|
||||
'Public Shared Function GET_Antraege(von As Date, bis As Date, KundenNr As Integer, Optional Archiv As Object = Nothing) As List(Of cPLOSE_USTV_ANTR)
|
||||
' Try
|
||||
@@ -427,8 +486,9 @@ Imports System.Data.SqlClient
|
||||
UPDATE [tblPLOSE_Details]
|
||||
set plose_Archiv=1, [plose_ArchiviertDatum]=GETDATE()
|
||||
FROM [tblPLOSE_Details] INNER JOIN Adressen on PLOSEKundenNr=plose_POLSEKundennummer
|
||||
INNER JOIN [tblPLOSE_Produktbeschreibung] ON [plp_ProductCode]=[plose_ProduktCode]
|
||||
WHERE cast(plose_RechnungsDatum as date) between @von and @bis and AdressenNr=@KundenNr
|
||||
|
||||
AND plose_LieferantCode IN (0,1,7) AND plp_Land ='IT'
|
||||
", "FMZOLL",, list)
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -453,4 +513,9 @@ Public Class cPLOSE_USTV_ANTR
|
||||
Property plose_MWSTBetrag As Object = Nothing ' Decimal (12, 2) NULL,
|
||||
Property plose_BruttobetragTransaktion As Object = Nothing ' Decimal (12, 2) NULL,
|
||||
|
||||
|
||||
Public Shared Sub reOrderList(ByRef LIST As List(Of cPLOSE_USTV_ANTR))
|
||||
LIST.Sort(Function(x, y) x.plose_RechnungsDatum.CompareTo(y.plose_RechnungsDatum))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user