MDM, Sendungsanhang, MDMAntraege

This commit is contained in:
2024-10-21 11:46:46 +02:00
parent 068255be9a
commit 207a3e68d9
5 changed files with 20 additions and 8 deletions

View File

@@ -122,6 +122,10 @@ Public Class frmMDM_USTVAntrag
Select Case If(r.Cells("UStVPo_SchnittstellenNr").Value, -1)
Case 6, 0 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) [plInv_daId] FROM [tblPLOSE_Inv_Data] where plInv_SupplierRechnungsDatum='" & r.Cells("UStVPo_ReDat").Value & "' and plInv_SupplierRechnungsNr='" & r.Cells("UStVPo_ReNr").Value & "' and plInv_SupplierCountry='" & Antrag_LandKz & "' AND [plInv_daId] is not null", "FMZOLL",,, -1)
Case 4 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblMSEInvoices] as inv inner join tblMSECustomers on inv.customer_number = customer_id where invoice_date='" & r.Cells("UStVPo_ReDat").Value & "' and country='" & Antrag_LandKz & "' AND partner_customer_number = " & USTV_ANTRAG.UStVAn_KuNr & " AND daId is not null", "FMZOLL",,, -1)
Case 5 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblUTAImportNew] where Rechnungsdatum='" & r.Cells("UStVPo_ReDat").Value & "' and Abrechnungsnummer='" & r.Cells("UStVPo_ReNr").Value & "' and Lieferland_ISO2='" & Antrag_LandKz & "' AND daId is not null", "FMZOLL",,, -1)
Case 7 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) [rmc_daId] FROM [tblRMCImport] where rmc_reDatum='" & r.Cells("UStVPo_ReDat").Value & "' and rmc_reNr='" & r.Cells("UStVPo_ReNr").Value & "' and rmc_landKZ='" & Antrag_LandKz & "' AND [rmc_daId] is not null", "FMZOLL",,, -1)
End Select