merge
This commit is contained in:
@@ -293,7 +293,7 @@ Public Class cUStVPositionen
|
||||
Property UStVPo_ReNr As Object = Nothing ' NVARCHAR(20) NULL,
|
||||
Property UStVPo_USteuerbetrag As Object = Nothing ' MONEY Not NULL,
|
||||
Property UStVPo_Leistungsbezeichnung As Object = Nothing ' NVARCHAR(255) NULL,
|
||||
Property UStVPo_Leistender As Object = Nothing ' NVARCHAR(65) NULL,
|
||||
Property UStVPo_Leistender As String = "" ''NVARCHAR(65) NULL,
|
||||
Property UStVPo_Schnittstelle As Object = Nothing ' BIT Default ((0)) Not NULL,
|
||||
Property UStVPo_SchnittstellenNr As Object = Nothing ' SMALLINT Default ((0)) Not NULL,
|
||||
Property UStVPo_Umrechnungskurs As Object = Nothing ' FLOAT(53) NULL,
|
||||
@@ -301,7 +301,8 @@ Public Class cUStVPositionen
|
||||
Property UStVPo_Sachbearbeiter As Object = Nothing ' NVARCHAR(15) NULL,
|
||||
Property UStVPo_Zeitstempel As Object = Nothing ' DATETIME Default (getdate()) NULL,
|
||||
Property UStVPo_daId As Object = Nothing
|
||||
Property UStVPo_daId_loeschbar As Object = Nothing
|
||||
Property UStVPo_daId_loeschbar As Boolean = True
|
||||
Property UStVPo_LeistenderId As Integer '
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
@@ -401,6 +402,7 @@ Public Class cUStVPositionen
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_Zeitstempel", UStVPo_Zeitstempel))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_daId", UStVPo_daId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_daId_loeschbar", UStVPo_daId_loeschbar))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_LeistenderId", UStVPo_LeistenderId))
|
||||
Return list
|
||||
End Function
|
||||
|
||||
|
||||
@@ -11,17 +11,28 @@ Public Class cUStVLeistender
|
||||
Property UstV_Leistender_Land As Object = Nothing
|
||||
Property UstV_Leistender_UstNr As Object = Nothing
|
||||
Property UstV_Leistender_Adresse As Boolean
|
||||
Property UStV_LeistenderId As Integer
|
||||
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
Sub New(UStV_Leistender)
|
||||
Sub New(UStV_Leistender As String)
|
||||
Me.UStV_Leistender = UStV_Leistender
|
||||
LOAD()
|
||||
End Sub
|
||||
|
||||
Sub New(Id As Integer)
|
||||
Me.UStV_LeistenderId = Id
|
||||
LOADBYID()
|
||||
End Sub
|
||||
|
||||
Sub New(UStV_Leistender As String, Land As String)
|
||||
Me.UStV_Leistender = UStV_Leistender
|
||||
LOADByLand(Land)
|
||||
End Sub
|
||||
|
||||
|
||||
Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
@@ -33,6 +44,7 @@ Public Class cUStVLeistender
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UstV_Leistender_Land", UstV_Leistender_Land))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UstV_Leistender_UstNr", UstV_Leistender_UstNr))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UstV_Leistender_Adresse", UstV_Leistender_Adresse))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStV_LeistenderId", UStV_LeistenderId,, True))
|
||||
Return list
|
||||
End Function
|
||||
|
||||
@@ -60,9 +72,9 @@ Public Class cUStVLeistender
|
||||
End Function
|
||||
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblUStVLeistender WHERE UStV_Leistender=@UStV_Leistender ", conn)
|
||||
cmd.Parameters.AddWithValue("@UStV_Leistender", UStV_Leistender)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
@@ -82,14 +94,73 @@ Public Class cUStVLeistender
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Function getUpdateCmd() As String
|
||||
Public Sub LOADBYID()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblUStVLeistender WHERE UStV_LeistenderId=@UStV_LeistenderId ", conn)
|
||||
cmd.Parameters.AddWithValue("@UStV_LeistenderId", UStV_LeistenderId)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In getParameterList()
|
||||
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
|
||||
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(Me, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(Me, dr.Item(li.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
hasEntry = True
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub LOADByLand(Land As String)
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblUStVLeistender WHERE UStV_Leistender=@UStV_Leistender and left(UstV_Leistender_UstNr, 2) = '" & Land & "'", conn)
|
||||
cmd.Parameters.AddWithValue("@UStV_Leistender", UStV_Leistender)
|
||||
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In getParameterList()
|
||||
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
|
||||
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(Me, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(Me, dr.Item(li.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
hasEntry = True
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Function getUpdateCmd() As String
|
||||
Try
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
|
||||
|
||||
@@ -247,36 +247,45 @@ Public Class cIDS
|
||||
|
||||
|
||||
Else
|
||||
Try
|
||||
|
||||
Dim ymd = isleernothing((currentRow(0)))
|
||||
Dim cc = isleernothing((currentRow(1)))
|
||||
Dim pyn = isleernothing((currentRow(2)))
|
||||
Dim occ = isleernothing((currentRow(5)))
|
||||
Dim oc = isleernothing((currentRow(6)))
|
||||
Dim ptc = isleernothing((currentRow(7)))
|
||||
|
||||
Dim ids As New cIDS(ymd, pyn, cc, occ, oc, ptc)
|
||||
Dim ymd = isleernothing((currentRow(0)))
|
||||
Dim cc = isleernothing((currentRow(1)))
|
||||
Dim pyn = isleernothing((currentRow(2)))
|
||||
Dim occ = isleernothing((currentRow(5)))
|
||||
Dim oc = isleernothing((currentRow(6)))
|
||||
Dim ptc = isleernothing((currentRow(7)))
|
||||
Dim ids As New cIDS(ymd, pyn, cc, occ, oc, ptc)
|
||||
|
||||
With ids
|
||||
.YearMonthDay = isleernothing((currentRow(0)))
|
||||
.CustomerCode = isleernothing((currentRow(1)))
|
||||
.Paymentsummarynumber = isleernothing((currentRow(2)))
|
||||
.CustomerName = isleernothing((currentRow(3)))
|
||||
.OutletCountry = isleernothing((currentRow(4)))
|
||||
.OutletCountryCode = isleernothing((currentRow(5)))
|
||||
.OutletCode = isleernothing((currentRow(6)))
|
||||
.ProductTypeCode = isleernothing((currentRow(7)))
|
||||
.TransactionVolume = isleernothing((currentRow(8)))
|
||||
.AmminclVAT = isleernothing((currentRow(9)))
|
||||
.TotalNetAmount = isleernothing((currentRow(10)))
|
||||
.VATAmount = isleernothing((currentRow(11)))
|
||||
.avpriceexclVAT = isleernothing((currentRow(12)))
|
||||
.VRNumber = isleernothing((currentRow(13)))
|
||||
.OBONumber = isleernothing((currentRow(14)))
|
||||
Dim avprive = isleernothing((currentRow(12)))
|
||||
|
||||
With ids
|
||||
.YearMonthDay = isleernothing((currentRow(0)))
|
||||
.CustomerCode = isleernothing((currentRow(1)))
|
||||
.Paymentsummarynumber = isleernothing((currentRow(2)))
|
||||
.CustomerName = isleernothing((currentRow(3)))
|
||||
.OutletCountry = isleernothing((currentRow(4)))
|
||||
.OutletCountryCode = isleernothing((currentRow(5)))
|
||||
.OutletCode = isleernothing((currentRow(6)))
|
||||
.ProductTypeCode = isleernothing((currentRow(7)))
|
||||
.TransactionVolume = isleernothing((currentRow(8)))
|
||||
.AmminclVAT = isleernothing((currentRow(9)))
|
||||
.TotalNetAmount = isleernothing((currentRow(10)))
|
||||
.VATAmount = isleernothing((currentRow(11)))
|
||||
.avpriceexclVAT = IIf(avprive <> "" AndAlso IsNumeric(avprive), avprive, 0)
|
||||
.VRNumber = isleernothing((currentRow(13)))
|
||||
.OBONumber = isleernothing((currentRow(14)))
|
||||
|
||||
Console.WriteLine("IDS: " & isleernothing((currentRow(1))) & " - " & lngRecordCount & " - " & isleernothing((currentRow(10))))
|
||||
.SAVE()
|
||||
|
||||
End With
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
Console.WriteLine("IDS: " & isleernothing((currentRow(1))) & " - " & lngRecordCount & " - " & isleernothing((currentRow(10))))
|
||||
.SAVE()
|
||||
End With
|
||||
End If
|
||||
|
||||
Loop
|
||||
|
||||
@@ -193,7 +193,7 @@ Public Class cTrdInvoice
|
||||
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
|
||||
Using cmd As New SqlCommand(" SELECT tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer, tblTrdinInvoice.SteuerbetragLokal, tblTrdinInvoice.UStVAn_ID
|
||||
Using cmd As New SqlCommand(" SELECT tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer, tblTrdinInvoice.SteuerbetragLokal, tblTrdinInvoice.UStVAn_ID, tblTrdinInvoice.FilialenNr
|
||||
FROM tblTrdinInvoice
|
||||
WHERE tblTrdinInvoice.Rechnungsdatum Between @von And @bis AND tblTrdinInvoice.SteuerbetragLokal<>0 AND tblTrdinInvoice.RechnungsKundenNr=@AdressenNr AND tblTrdinInvoice.WährungLokal='EUR'" & IIf(Archiv, " ", " AND isnull(tblTrdinInvoice.UStVAn_ID,0) = 0 ") & "
|
||||
ORDER BY tblTrdinInvoice.Rechnungsdatum, tblTrdinInvoice.Rechnungsnummer", conn)
|
||||
|
||||
@@ -155,7 +155,7 @@ Public Class cUIDPruefung
|
||||
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
Case "AMBAR" : where = " And Filialen.FilialenNr IN (5701)"
|
||||
Case "IMEX" : where = " And Filialen.FilialenNr IN (5501)"
|
||||
Case "ATILLA" : where = " And Filialen.FilialenNr IN (4801 )"
|
||||
Case "ATILLA" : where = " And Filialen.FilialenNr IN (4801)"
|
||||
Case "UNISPED" : where = " AND Filialen.firma='UNISPED' "
|
||||
Case Else : where = " AND Filialen.firma='VERAG' " '" And isnull(FilialenNr,'') Not IN (5501,5701)"
|
||||
End Select
|
||||
|
||||
Reference in New Issue
Block a user