ustva, uta, etc.
This commit is contained in:
@@ -187,7 +187,7 @@ Public Class cTrdInvoice
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function GET_RECHNUNGEN(ByRef dt As DataTable, von As Date, bis As Date, KundenNr As Integer) As Boolean
|
||||
Public Shared Function GET_RECHNUNGEN(ByRef dt As DataTable, von As Date, bis As Date, KundenNr As Integer, Optional Archiv As Object = Nothing) As Boolean
|
||||
Try
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
@@ -195,13 +195,13 @@ Public Class cTrdInvoice
|
||||
|
||||
Using cmd As New SqlCommand(" SELECT tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer, tblTrdinInvoice.SteuerbetragLokal, tblTrdinInvoice.UStVAn_ID
|
||||
FROM tblTrdinInvoice
|
||||
WHERE tblTrdinInvoice.Rechnungsdatum Between @von And @bis AND tblTrdinInvoice.SteuerbetragLokal<>0 AND tblTrdinInvoice.RechnungsKundenNr=@AdressenNr AND tblTrdinInvoice.WährungLokal='EUR'
|
||||
WHERE tblTrdinInvoice.Rechnungsdatum Between @von And @bis AND tblTrdinInvoice.SteuerbetragLokal<>0 AND tblTrdinInvoice.RechnungsKundenNr=@AdressenNr AND tblTrdinInvoice.WährungLokal='EUR' AND isnull(tblTrdinInvoice.UStVAn_ID,0) = " & IIf(Archiv IsNot Nothing AndAlso Archiv, 1, 0) & "
|
||||
ORDER BY tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer", 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))
|
||||
If Archiv IsNot Nothing Then cmd.Parameters.AddWithValue("@Archiv", If(Archiv, 1, 0))
|
||||
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
dt.Load(dr)
|
||||
|
||||
Reference in New Issue
Block a user