diff --git a/SDL/My Project/AssemblyInfo.vb b/SDL/My Project/AssemblyInfo.vb index 9069cfaf..ae162299 100644 --- a/SDL/My Project/AssemblyInfo.vb +++ b/SDL/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/SDL/USTV/frmMDM_USTVAntrag.vb b/SDL/USTV/frmMDM_USTVAntrag.vb index 2480ce9b..b9bcf2a9 100644 --- a/SDL/USTV/frmMDM_USTVAntrag.vb +++ b/SDL/USTV/frmMDM_USTVAntrag.vb @@ -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 diff --git a/SDL/USTV/ustCntlUSTV_AntragPosition.vb b/SDL/USTV/ustCntlUSTV_AntragPosition.vb index 4c035502..0bc91288 100644 --- a/SDL/USTV/ustCntlUSTV_AntragPosition.vb +++ b/SDL/USTV/ustCntlUSTV_AntragPosition.vb @@ -1,5 +1,6 @@  +Imports com.sun.org.apache.bcel.internal.generic Imports VERAG_PROG_ALLGEMEIN Public Class ustCntlUSTV_AntragPosition @@ -57,11 +58,14 @@ Public Class ustCntlUSTV_AntragPosition Select Case If(UStV_POS.UStVPo_SchnittstellenNr, -1) Case 6, 0 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [plInv_daId] FROM [tblPLOSE_Inv_Data] where plInv_SupplierRechnungsDatum='" & UStV_POS.UStVPo_ReDat & "' and plInv_SupplierRechnungsNr='" & UStV_POS.UStVPo_ReNr & "' and plInv_SupplierCountry='" & Antrag_LandKz & "' AND [plInv_daId] is not null", "FMZOLL",,, -1) Case 7 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [rmc_daId] FROM [tblRMCImport] where rmc_reDatum='" & UStV_POS.UStVPo_ReDat & "' and rmc_reNr='" & UStV_POS.UStVPo_ReNr & "' and rmc_landKZ='" & Antrag_LandKz & "' AND [rmc_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='" & UStV_POS.UStVPo_ReDat & "' and country='" & Antrag_LandKz & "' AND partner_customer_number = " & kdnr & " AND daId is not null", "FMZOLL",,, -1) + Case 5 : da_id = sql.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblUTAImportNew] where Rechnungsdatum='" & UStV_POS.UStVPo_ReDat & "' and Abrechnungsnummer='" & UStV_POS.UStVPo_ReNr & "' and Lieferland_ISO2='" & Antrag_LandKz & "' AND daId is not null", "FMZOLL",,, -1) + End Select - scanSonstiges.INIT_daId(da_id) - scanUSTVFABest.INIT(kdnr, "KUNDENDATEN", "FA_Bestaetigungen") - scanUSTVVollmachten.INIT(kdnr, "KUNDENDATEN", "USTV_Vollmachten") + scanSonstiges.INIT_daId(da_id) + scanUSTVFABest.INIT(kdnr, "KUNDENDATEN", "FA_Bestaetigungen") + scanUSTVVollmachten.INIT(kdnr, "KUNDENDATEN", "USTV_Vollmachten") gridAktiv = True End Sub @@ -73,7 +77,12 @@ Public Class ustCntlUSTV_AntragPosition UStV_POS.UStVPo_Zeitstempel = Now - 'TO DO!!!!! + 'TO DO-> aktuell nur RechnungsNr!!!!! + If txtRgNr._value <> "" Then + UStV_POS.UStVPo_ReNr = txtRgNr._value + End If + + End Sub Private Sub ustCntlUSTV_AntragPosition_KeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles Me.PreviewKeyDown diff --git a/SDL/mdm/frmMDMDatenverarbetiung.vb b/SDL/mdm/frmMDMDatenverarbetiung.vb index 5d36f791..4e16e301 100644 --- a/SDL/mdm/frmMDMDatenverarbetiung.vb +++ b/SDL/mdm/frmMDMDatenverarbetiung.vb @@ -1182,7 +1182,6 @@ Public Class frmMDMDatenverarbetiung clmns &= dt_CSV_selected.Rows(i)(j).ToString.Replace(";", ", ") & ";" Next outFile.WriteLine(clmns) - Next outFile.Close() Next diff --git a/VERAG_PROG_ALLGEMEIN/Schnittstellen/MSE/cMSEAPI.vb b/VERAG_PROG_ALLGEMEIN/Schnittstellen/MSE/cMSEAPI.vb index b44c91a2..7660c098 100644 --- a/VERAG_PROG_ALLGEMEIN/Schnittstellen/MSE/cMSEAPI.vb +++ b/VERAG_PROG_ALLGEMEIN/Schnittstellen/MSE/cMSEAPI.vb @@ -1019,7 +1019,7 @@ Public Class cMSEAPI If r("url") <> "" AndAlso r("name") <> "" AndAlso r("name").contains("VAT") Then 'only VAT-Invoices Dim inv As New cMSEInvoices(r("name"), r("invoice_id")) - If IsDBNull(inv.daId) Then 'verhindert unnötige Downloads + If inv.daId Is Nothing Then 'verhindert unnötige Downloads Dim filepath = VERAG_PROG_ALLGEMEIN.cFormularManager.getPDFViaSpirePDF_FromURLStream(r("url"), r("name"), PDFRECHNUNGENPFAD, False) If filepath <> "" AndAlso uploadToDs Then Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("MDM", "MDM_DATEN", "MSE", Now.Year, Now.ToString("yyyyMMdd"), r("name"))