ustva, fakt.

This commit is contained in:
2025-03-27 08:38:36 +01:00
parent 755df1e8ec
commit f1f0c203b8
3 changed files with 36 additions and 15 deletions

View File

@@ -635,7 +635,11 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
USTV_POS.UStVPo_Zeitstempel = Now()
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
If USTV_POS.UStVPo_daId <> "" AndAlso USTV_POS.UStVPo_daId > 0 Then
USTV_POS.UStVPo_daId_loeschbar = False
Else
USTV_POS.UStVPo_daId_loeschbar = True
End If
' USTV_POS.UStVPo_daId = ANTRAG.plose_daId
' Berechnungen
@@ -842,7 +846,12 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_ReNr = r.Item("rmc_reNr").ToString
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
USTV_POS.UStVPo_daId = r.Item("rmc_daId")
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
If USTV_POS.UStVPo_daId <> "" AndAlso USTV_POS.UStVPo_daId > 0 Then
USTV_POS.UStVPo_daId_loeschbar = False
Else
USTV_POS.UStVPo_daId_loeschbar = True
End If
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
@@ -909,7 +918,11 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_ReNr = r.Item("invoice_number") & " - " & kdNr & IIf(Antrag_LandKz = "BE", "/Belgium", "")
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
USTV_POS.UStVPo_daId = r.Item("daId")
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
If USTV_POS.UStVPo_daId > 0 Then
USTV_POS.UStVPo_daId_loeschbar = False
Else
USTV_POS.UStVPo_daId_loeschbar = True
End If
If Not alreadyExistsMitLeistungsBez(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
@@ -977,7 +990,11 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_ReNr = r.Item("Rechnungsnummer").ToString
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
USTV_POS.UStVPo_daId = r.Item("daId")
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
If USTV_POS.UStVPo_daId > 0 Then
USTV_POS.UStVPo_daId_loeschbar = False
Else
USTV_POS.UStVPo_daId_loeschbar = True
End If
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
@@ -1047,7 +1064,11 @@ Public Class frmMDM_USTVAntrag
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
USTV_POS.UStVPo_daId = sql.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNew.daId FROM [tblIDSTransactionsNew] INNER JOIN tbl_IDS_Länder ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode LEFT JOIN tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber where tblIDSTransactionsNew.[YearMonthDay] ='" & USTV_POS.UStVPo_ReDat & "' AND ISNULL(tblIDSTransactionsNew.[OBONumber], ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) ='" & USTV_POS.UStVPo_ReNr & "' and tbl_IDS_Länder.Lieferland_ISO2='" & Antrag_LandKz & "' AND tblIDSInvoicesNew.daId is not null", "FMZOLL")
If USTV_POS.UStVPo_daId > 0 Then USTV_POS.UStVPo_daId_loeschbar = False
If USTV_POS.UStVPo_daId <> "" AndAlso USTV_POS.UStVPo_daId > 0 Then
USTV_POS.UStVPo_daId_loeschbar = False
Else
USTV_POS.UStVPo_daId_loeschbar = True
End If
If Not alreadyExists(USTV_ANTRAG.UStVAn_KuNr, USTV_ANTRAG.UStVAn_LandNr, USTV_POS) Then
USTV_POS.UStVPo_Schnittstelle = True