MDM, UTA
This commit is contained in:
@@ -186,6 +186,39 @@ Public Class cTrdInvoice
|
||||
Return SQL.doSQL(sqlstr, "FMZOLL")
|
||||
End Function
|
||||
|
||||
Public Shared Function GET_RECHNUNGEN(ByRef dt As DataTable, von As Date, bis As Date, KundenNr As Integer) As Boolean
|
||||
Try
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
|
||||
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'
|
||||
ORDER BY tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnumme", 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()
|
||||
dt.Load(dr)
|
||||
'While dr.Read
|
||||
' dt.Load(dr)
|
||||
'End While
|
||||
dr.Close()
|
||||
|
||||
End Using
|
||||
End Using
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -320,6 +353,38 @@ Public Class cTrdProduct
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function GET_PRODUCTS(ByRef dt As DataTable, RechnungsDatum As Date, RechnungsNr As Integer) As Boolean
|
||||
Try
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
|
||||
Using cmd As New SqlCommand(" SELECT tblTrdinProduct.Leistungsnummer, tblTrdinProduct.Leistungsbezeichnung
|
||||
FROM tblTrdinProduct
|
||||
WHERE cast(tblTrdinProduct.Rechnungsdatum as Date) =@reDatum AND tblTrdinProduct.Rechnungsnummer=@RechnungsNr AND tblTrdinProduct.Steuerpflichtig=1
|
||||
ORDER BY tblTrdinProduct.Leistungsnummer, tblTrdinProduct.Leistungsbezeichnung", conn)
|
||||
|
||||
|
||||
cmd.Parameters.AddWithValue("@reDatum", RechnungsDatum)
|
||||
cmd.Parameters.AddWithValue("@RechnungsNr", RechnungsNr)
|
||||
'If Archiv IsNot Nothing Then cmd.Parameters.AddWithValue("@Archiv", If(Archiv, 1, 0))
|
||||
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
dt.Load(dr)
|
||||
'While dr.Read
|
||||
' dt.Load(dr)
|
||||
'End While
|
||||
dr.Close()
|
||||
|
||||
End Using
|
||||
End Using
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return False
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user