Merge branch 'ADMIN' of https://dev.azure.com/VeragAG/_git/ADMIN into ADMIN
This commit is contained in:
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.2.3.5")>
|
||||
<Assembly: AssemblyFileVersion("1.2.3.5")>
|
||||
<Assembly: AssemblyVersion("1.2.3.6")>
|
||||
<Assembly: AssemblyFileVersion("1.2.3.6")>
|
||||
|
||||
@@ -78,8 +78,8 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
|
||||
Next
|
||||
ElseIf programName.Contains("IDS") Then
|
||||
ids.initImportPfade(programName)
|
||||
setButtons(Not ids.VERARBEITUNG_PFAD = "", True)
|
||||
setButtons(Not ids.ZIEL_PFAD = "", True)
|
||||
setButtons(Not ids.VERARBEITUNG_PFAD = "")
|
||||
setButtons(Not ids.ZIEL_PFAD = "")
|
||||
If ids.VERARBEITUNG_PFAD = "" Then Exit Sub
|
||||
If ids.ZIEL_PFAD = "" Then Exit Sub
|
||||
For Each d In System.IO.Directory.GetFiles(ids.VERARBEITUNG_PFAD)
|
||||
@@ -130,7 +130,7 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
|
||||
ElseIf programName.Contains("UTA") Then
|
||||
DownloadSFtpDirectory(uta.API_STRING, New NetworkCredential(uta.API.Rows(0).Item("api_user").ToString, uta.API.Rows(0).Item("api_password").ToString), "", cnt, deleteFilesAfterDownload, "/TRX/" & year, renameFilesAfterDownload)
|
||||
ElseIf programName.Contains("IDS") Then
|
||||
'keinFTP (NOCH NICHT??)!
|
||||
DownloadSFtpDirectory(ids.API_STRING, New NetworkCredential(ids.API.Rows(0).Item("api_user").ToString, ids.API.Rows(0).Item("api_password").ToString), "", cnt, deleteFilesAfterDownload, "/IN/" & year, renameFilesAfterDownload)
|
||||
End If
|
||||
|
||||
|
||||
@@ -255,10 +255,16 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
|
||||
|
||||
'If file.IsRegularFile AndAlso file.Name.ToLower.EndsWith(".uta") AndAlso file.Length > 0 AndAlso IIf(renameAfterDownload, Not file.Name.ToLower.StartsWith("_"), True) Then
|
||||
|
||||
If file.IsRegularFile AndAlso file.Name.ToLower.EndsWith(".uta") AndAlso file.Length > 0 AndAlso IIf(renameAfterDownload, Not file.Name.ToLower.StartsWith("_"), Not file.Name.ToLower.StartsWith("_")) Then
|
||||
If file.IsRegularFile AndAlso file.Name.ToLower.EndsWith(IIf(programName.Contains("UTA"), ".uta", ".pdf")) AndAlso file.Length > 0 AndAlso IIf(renameAfterDownload, Not file.Name.ToLower.StartsWith("_"), Not file.Name.ToLower.StartsWith("_")) Then
|
||||
|
||||
Dim remoteFileName = "/" & file.Name
|
||||
Dim filePath = uta.VERARBEITUNG_PFAD & IIf(System.IO.File.Exists(uta.VERARBEITUNG_PFAD & file.Name), file.Name.Replace(".UTA", "_") & Now.ToString("yyMMdd_HHmmss.fff") & ".UTA", file.Name)
|
||||
Dim filePath = ""
|
||||
|
||||
If programName.Contains("UTA") Then
|
||||
filePath = uta.VERARBEITUNG_PFAD & IIf(System.IO.File.Exists(uta.VERARBEITUNG_PFAD & file.Name), file.Name.Replace(".UTA", "_") & Now.ToString("yyMMdd_HHmmss.fff") & ".UTA", file.Name)
|
||||
ElseIf programName.Contains("IDS") Then
|
||||
filePath = ids.VERARBEITUNG_PFAD & IIf(System.IO.File.Exists(ids.VERARBEITUNG_PFAD & file.Name), file.Name.Replace(".pdf", "_") & Now.ToString("yyMMdd_HHmmss.fff") & ".pdf", file.Name)
|
||||
End If
|
||||
|
||||
Dim downloadedFile As Stream = System.IO.File.Create(filePath)
|
||||
|
||||
@@ -285,7 +291,7 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
|
||||
downloadedFile.Dispose()
|
||||
|
||||
Dim fi As FileInfo = New FileInfo(filePath)
|
||||
If fi.Extension.ToLower = ".uta" Then
|
||||
If fi.Extension.ToLower = ".uta" AndAlso programName.Contains("UTA") Or fi.Extension.ToLower = ".pdf" AndAlso programName.Contains("IDS") Then
|
||||
ListBox3.Items.Add(frmStartOptions.cut_file(fi.Name)) 'zur Liste hinzufügen
|
||||
cnt += 1
|
||||
End If
|
||||
@@ -296,6 +302,79 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
|
||||
|
||||
End Function
|
||||
|
||||
Private Function createIDSInvoice(Dateiname As String, Optional isMail As Boolean = False)
|
||||
|
||||
Dim Zielpfad = ids.VERARBEITUNG_PFAD
|
||||
Dim customerNo = ""
|
||||
Dim invoiceNo = ""
|
||||
Dim dateNo = ""
|
||||
Dim outputDate = ""
|
||||
Dim customerString = "customer"
|
||||
Dim InvoiceString = "invoice"
|
||||
Dim dateString = "from"
|
||||
Dim filename = ""
|
||||
|
||||
|
||||
'0060003362_20012025_DE00707031
|
||||
|
||||
If Dateiname.Contains(customerString) Then
|
||||
customerNo = Dateiname.Substring(Dateiname.IndexOf(customerString) + customerString.Length, 10)
|
||||
Else
|
||||
customerNo = Dateiname.Substring(0, 10)
|
||||
End If
|
||||
|
||||
If Dateiname.Contains(InvoiceString) Then
|
||||
invoiceNo = Dateiname.Substring(Dateiname.IndexOf(InvoiceString) + InvoiceString.Length, 10)
|
||||
Else
|
||||
invoiceNo = Dateiname.Substring(Dateiname.LastIndexOf("_") + 1, 10)
|
||||
End If
|
||||
|
||||
If Dateiname.Contains(dateString) Then
|
||||
dateNo = Dateiname.Substring(Dateiname.IndexOf(dateString) + dateString.Length, 8)
|
||||
Dim parsedDate As DateTime = DateTime.ParseExact(dateNo, "dd/MM/yy", System.Globalization.CultureInfo.InvariantCulture)
|
||||
outputDate = parsedDate.ToString("dd.MM.yyyy")
|
||||
Else
|
||||
dateNo = Dateiname.Substring(Dateiname.IndexOf("_") + 1, 8)
|
||||
Dim parsedDate As DateTime = DateTime.ParseExact(dateNo, "ddMMyyyy", System.Globalization.CultureInfo.InvariantCulture)
|
||||
outputDate = parsedDate.ToString("dd.MM.yyyy")
|
||||
|
||||
End If
|
||||
|
||||
If outputDate IsNot Nothing AndAlso customerNo <> "" AndAlso invoiceNo <> "" Then
|
||||
|
||||
Dim idsInvoice As New cIDSInvoice(outputDate, customerNo, invoiceNo)
|
||||
If Not idsInvoice.hasEntry Then idsInvoice.SAVE()
|
||||
|
||||
|
||||
Try
|
||||
|
||||
'Dim htmlText = File.ReadAllText(pfad)
|
||||
|
||||
'If htmlText IsNot Nothing Then
|
||||
' If idsInvoice.isMail_IDS(htmlText) Then
|
||||
' If idsInvoice.getPDF_IDS(htmlText, filename, Zielpfad & invoiceNo & "_" & customerNo & ".pdf") Then
|
||||
' idsInvoice.DocumentName = filename
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
'End If
|
||||
|
||||
If Not isMail Then idsInvoice.DocumentName = Dateiname
|
||||
idsInvoice.Zeitstempel = Now()
|
||||
idsInvoice.SAVE()
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name, VERAG_PROG_ALLGEMEIN.ERROR_OP.LOG)
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Function ServerDateFile(credentials As NetworkCredential, fileUrl As String) As Date
|
||||
@@ -610,15 +689,14 @@ Public Class frmNachrichtenVerarbeitung_MDM_divers
|
||||
|
||||
If fi.Extension.ToLower = ".pdf" Then
|
||||
|
||||
If True Then
|
||||
|
||||
|
||||
If fi.Name.ToString.StartsWith("COPY_INVOICE_") Then
|
||||
|
||||
createIDSInvoice(fi.Name.ToString.Replace("COPY_INVOICE_", ""))
|
||||
|
||||
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("MDM", "MDM_DATEN", "IDS", Now.Year, Now.ToString("yyyyMMdd"), frmStartOptions.getFileName(d))
|
||||
|
||||
If DS.uploadDataToDATENSERVER(d,,,,,, True) Then
|
||||
If SQL.doSQL("Update [tblIDSInvoicesNew] SET [daId]='" & DS.da_id & "' where [DocumentName] = '" & DS.da_name & "' ", "FMZOLL") Then
|
||||
If SQL.doSQL("Update [tblIDSInvoicesNew] SET [daId]='" & DS.da_id & "' where [DocumentName] = '" & DS.da_name.ToString.Replace("COPY_INVOICE_", "") & "' ", "FMZOLL") Then
|
||||
frmStartOptions.moveFile_DateBack(d, zielpfad & "Invoice_PDF\" & Now.Year & "\" & Now.ToString("yyyyMMdd") & "\")
|
||||
cntDatenEingelesen += 1
|
||||
End If
|
||||
|
||||
1239
initATLASAufschubkonten/frmStartOptions.Designer.vb
generated
1239
initATLASAufschubkonten/frmStartOptions.Designer.vb
generated
File diff suppressed because it is too large
Load Diff
@@ -77,7 +77,7 @@ Public Class frmStartOptions
|
||||
cbxRMC.changeItem("")
|
||||
|
||||
txtUTAYear.Text = Now.Year
|
||||
|
||||
txtIDSYear.Text = Now.Year
|
||||
txtGJ_UNISPED.Text = Now.Year
|
||||
|
||||
txtEZOLLAnhDat._value = Now.ToShortDateString
|
||||
@@ -5376,7 +5376,8 @@ Public Class frmStartOptions
|
||||
Private Sub LinkLabel65_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel65.LinkClicked
|
||||
Me.Visible = False
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = cbxTestsystem.Checked
|
||||
Dim f As New frmNachrichtenVerarbeitung_MDM_divers("IDS", False, False, False, False)
|
||||
Dim f As New frmNachrichtenVerarbeitung_MDM_divers("IDS", False, False, cbxIDSUmbenenen.Checked, True)
|
||||
f.year = txtIDSYear.Text
|
||||
f.ShowDialog()
|
||||
Me.Visible = True
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user