This commit is contained in:
2023-12-18 15:28:45 +01:00
21 changed files with 2246 additions and 316 deletions

View File

@@ -182,6 +182,29 @@ Public Class cAdressen
Return False
End Function
Function getUIDMehrfachverwendung() As Boolean
If If(UstIdKz, String.Empty) <> String.Empty And If(UstIdNr, String.Empty) <> String.Empty Then
Dim count As Integer = SQL.getValueTxtBySql("SELECT count(*) FROM [Adressen] INNER JOIN Kunden ON KundenNr=AdressenNr WHERE [UstIdKz]='" & UstIdKz & "' AND [UstIdNr]='" & UstIdNr & "'", "FMZOLL")
If count > 0 Then
Return True
End If
End If
Return False
End Function
Function getDTUIDMehrfachverwendung(adressenNr) As DataTable
Dim dt_UID As New DataTable
If If(UstIdKz, String.Empty) <> String.Empty And If(UstIdNr, String.Empty) <> String.Empty Then
dt_UID = SQL.loadDgvBySql_Param("SELECT KundenNr FROM [Adressen] INNER JOIN Kunden ON KundenNr=AdressenNr WHERE [UstIdKz]='" & UstIdKz & "' AND [UstIdNr]='" & UstIdNr & "' and not KundenNr='" & adressenNr & "'", "FMZOLL")
End If
Return dt_UID
End Function
Public Function SAVE(Optional newFlag = False) As Boolean 'obj As Object, tablename As String, where As String) As Boolean
If newFlag Then INIT_NEWKD_DATA()
If AdressenNr <= 0 Then

View File

@@ -11,11 +11,13 @@ Public Class cAsfinagMaut
Property VATamount As Object = Nothing
Property totalAmount As Object = Nothing
Property additionalData As Object = Nothing
Property receiptnumber As Object = Nothing
Property receiptCreated As Boolean = False
Public hasEntry = False
Dim SQL As New SQL
Dim SQL As New SQL
Sub New()
@@ -30,8 +32,10 @@ Public Class cAsfinagMaut
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("VATamount", VATamount))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("totalAmount", totalAmount))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("additionalData", additionalData))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("receiptnumber", receiptnumber))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("receiptCreated", receiptCreated))
Return list
End Function
End Function
@@ -76,23 +80,24 @@ Public Class cAsfinagMaut
Public Function getInsertCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim str As String = ""
Dim values As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "],"
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
values = values.Substring(0, values.Length - 1) 'wg. ','
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim str As String = ""
Dim values As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "],"
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
values = values.Substring(0, values.Length - 1) 'wg. ','
Return (" INSERT INTO tblAsfinagMaut (" & str & ") VALUES(" & values & ") ")
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ""
End Function
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ""
End Function
End Class
End Class

View File

@@ -229,26 +229,27 @@ Public Class cUIDPruefung
If UID_TMP.uid_valid Then
r("Ergebnis") = "OK"
For Each row As DataRow In dt.Select("UstIdnr = '" & r("UstIdnr") & "'")
For Each row As DataRow In dt.Select("UstIdnr = '" & r("UstIdnr") & "' AND UstIdKz ='" & r("UstIdKz") & "'")
row("Ergebnis") = r("Ergebnis")
Next
' Bei ungültig soll er einzeln durchgehen! Besprochen mit A.Stockenhuber
Else
r("Ergebnis") = "UNGÜLTIG"
For Each row As DataRow In dt.Select("UstIdnr = '" & r("UstIdnr") & "'")
row("Ergebnis") = r("Ergebnis")
Next
' For Each row As DataRow In dt.Select("UstIdnr = '" & r("UstIdnr") & "' AND UstIdKz ='" & r("UstIdKz") & "'")
' row("Ergebnis") = r("Ergebnis")
' Next
End If
Else
r("Ergebnis") = "ERROR"
r("Error-Code") = errorCode.ToString()
r("Error-Text") = FO.GetCodeText(errorCode)
For Each row As DataRow In dt.Select("UstIdnr = '" & r("UstIdnr") & "'")
row("Ergebnis") = r("Ergebnis")
row("Error-Code") = r("Error-Code")
row("Error-Text") = r("Error-Text")
Next
' Bei ERROR soll er ebenfalls einzeln durchgehen! Besprochen mit A.Stockenhuber
'For Each row As DataRow In dt.Select("UstIdnr = '" & r("UstIdnr") & "' AND UstIdKz ='" & r("UstIdKz") & "'")
' row("Ergebnis") = r("Ergebnis")
' row("Error-Code") = r("Error-Code")
' row("Error-Text") = r("Error-Text")
'Next
End If