fakt Abrechnung, ustva, etc.

This commit is contained in:
2025-06-05 14:21:00 +02:00
parent 4fc5b7911b
commit 98f8c77821
11 changed files with 244 additions and 65 deletions

View File

@@ -1032,7 +1032,7 @@ Public Class cMDMFunctionsAllgemein
End Function
Shared Function generatePosList(USTV_ANTRAG As cUSTVAntrag, posId As String, Antrag_LandKz As String, SteuerNR As String, openFile As Boolean, type As String, ByRef dt As DataTable, Optional isVZ As Boolean = False) As String
Shared Function generatePosList(USTV_ANTRAG As cUSTVAntrag, posId As String, Antrag_LandKz As String, SteuerNR As String, openFile As Boolean, type As String, ByRef dt As DataTable, Optional isVZ As Boolean = False, Optional RK_ID As Integer = -1) As String
Dim sql As New SQL
@@ -1040,7 +1040,7 @@ Public Class cMDMFunctionsAllgemein
If posId <> "" Then
sqlWHere = " And UStVPo_ID in(" & posId & ")"
ElseIf isVZ Then
sqlWHere = " and UStVPo_VZ = 1 And UStVPo_VZ_RKID is null"
sqlWHere = " and UStVPo_VZ = 1 And (UStVPo_VZ_RKID is null" & IIf(RK_ID > 0, " or UStVPo_VZ_RKID = " & RK_ID & ")", ")")
End If
Dim StringSQL = "SELECT [UStVPo_ID] as Number ,[UStVPo_ReDat] as 'Date of Invoice',[UStVPo_ReNr] as 'Number of invoice' ,[UStVPo_Leistungsbezeichnung] as 'Name of service',[UStVPo_Leistender] as 'Name of supplier',leist.[UstV_Leistender_Strasse] + ' ' + leist.[UstV_Leistender_StrasseNr] as Street,