IDS
This commit is contained in:
1136
initATLASAufschubkonten/frmStartOptions.Designer.vb
generated
1136
initATLASAufschubkonten/frmStartOptions.Designer.vb
generated
File diff suppressed because it is too large
Load Diff
@@ -336,18 +336,13 @@ Public Class frmStartOptions
|
|||||||
Dim von = ""
|
Dim von = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If (parameter.Count - 1) >= 3 Then 'Höher als 1 weil der index 0 der Pfad zum programm ist
|
If (parameter.Count - 1) >= 3 Then 'Höher als 1 weil der index 0 der Pfad zum programm ist
|
||||||
|
|
||||||
'mdm_mail_attach %file% %subject% %datetimereceived% %from%"
|
'mdm_mail_attach %file% %subject% %datetimereceived% %from%" aus EEA-Attach
|
||||||
|
|
||||||
pfad = parameter(2)
|
pfad = parameter(2)
|
||||||
betreff = parameter(3)
|
betreff = parameter(3)
|
||||||
|
|
||||||
'pfad = "C:\Users\d.breimaier\Downloads\0CD522B58DB96E184EFBD2C622DD4C3B781A2D35.html"
|
|
||||||
'betreff = "IDS, customer 0060003360 Invoice: DE00360936 from 15/06/15"
|
|
||||||
'von = "d.breimaier@verag.ag"
|
|
||||||
|
|
||||||
If (parameter.Count - 1) >= 5 Then von = parameter(5)
|
If (parameter.Count - 1) >= 5 Then von = parameter(5)
|
||||||
|
|
||||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||||
@@ -365,6 +360,41 @@ Public Class frmStartOptions
|
|||||||
End If
|
End If
|
||||||
closeMe()
|
closeMe()
|
||||||
|
|
||||||
|
Case "mdm_mail_html"
|
||||||
|
Dim f As New frmInfo(PARAM)
|
||||||
|
f.Show()
|
||||||
|
Dim pfad = ""
|
||||||
|
Dim betreff = ""
|
||||||
|
Dim von = ""
|
||||||
|
|
||||||
|
|
||||||
|
If (parameter.Count - 1) >= 3 Then 'Höher als 1 weil der index 0 der Pfad zum programm ist
|
||||||
|
|
||||||
|
'mdm_mail_html %bodyfile% %subject% %datetimereceived% %from% aus EEA-Attach
|
||||||
|
'%bodyfile% = Pfad zur Body HTML/Text Datei
|
||||||
|
|
||||||
|
'Bsp:
|
||||||
|
'ExportJob E-Invoice:processing mail: F:\vb.net\RoutineManager3\RoutineManager.exe mdm_mail_attach "
|
||||||
|
'pfad = F:\eee_e-invoice\0CD522B58DB96E184EFBD2C622DD4C3B781A2D35.html
|
||||||
|
'betreff = IDS, customer: 0060003360 Invoice: DE00360936 from 15/06/15" "15.11.2024 08:13:37" "
|
||||||
|
'von = d.breimaier@verag.ag"
|
||||||
|
|
||||||
|
pfad = parameter(2)
|
||||||
|
betreff = parameter(3)
|
||||||
|
|
||||||
|
If (parameter.Count - 1) >= 5 Then von = parameter(5)
|
||||||
|
|
||||||
|
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||||
|
|
||||||
|
If von.Contains("ids.de@q8.com") Or von.Contains("isselh@q8.com") Or von.Contains("d.breimaier@verag.ag") Or von.Contains("s.kriegner@verag.ag") Then
|
||||||
|
'---------------------IDS----------------------
|
||||||
|
importFileFromIDSMailAnhang(pfad, betreff, PARAM)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
closeMe()
|
||||||
|
|
||||||
Case "MAIL_ATTACH_WORK_FILES"
|
Case "MAIL_ATTACH_WORK_FILES"
|
||||||
|
|
||||||
Dim f As New frmInfo(PARAM)
|
Dim f As New frmInfo(PARAM)
|
||||||
@@ -1617,17 +1647,23 @@ Public Class frmStartOptions
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
ElseIf betreff.contains("IDS, customer") AndAlso type = "mdm_mail_attach" Then 'Email mit Rechnungslink
|
ElseIf betreff.contains("IDS, customer") AndAlso type = "mdm_mail_html" Then 'Email mit Rechnungslink
|
||||||
|
|
||||||
|
'Bsp:
|
||||||
|
'ExportJob E-Invoice:processing mail: F:\vb.net\RoutineManager3\RoutineManager.exe mdm_mail_attach "
|
||||||
|
'pfad = F:\eee_e-invoice\0CD522B58DB96E184EFBD2C622DD4C3B781A2D35.html
|
||||||
|
'betreff = IDS, customer: 0060003360 Invoice: DE00360936 from 15/06/15" "15.11.2024 08:13:37" "
|
||||||
|
'von = d.breimaier@verag.ag"
|
||||||
|
|
||||||
Dim ids As New cIDS
|
Dim ids As New cIDS
|
||||||
ids.initImportPfade("IDS")
|
ids.initImportPfade("IDS")
|
||||||
Dim Zielpfad = ids.VERARBEITUNG_PFAD
|
Dim Zielpfad = ids.VERARBEITUNG_PFAD
|
||||||
|
|
||||||
If betreff.ToString.ToLower.Contains("ids") Then
|
|
||||||
betreff = betreff.replace("WG: ", "")
|
|
||||||
betreff = betreff.replace("FW: ", "")
|
|
||||||
|
|
||||||
Dim customerNo = ""
|
betreff = betreff.replace("WG: ", "")
|
||||||
|
betreff = betreff.replace("FW: ", "")
|
||||||
|
|
||||||
|
Dim customerNo = ""
|
||||||
Dim invoiceNo = ""
|
Dim invoiceNo = ""
|
||||||
Dim dateNo = ""
|
Dim dateNo = ""
|
||||||
Dim outputDate = ""
|
Dim outputDate = ""
|
||||||
@@ -1657,46 +1693,36 @@ Public Class frmStartOptions
|
|||||||
If Not idsInvoice.hasEntry Then idsInvoice.SAVE()
|
If Not idsInvoice.hasEntry Then idsInvoice.SAVE()
|
||||||
|
|
||||||
|
|
||||||
'Dim outlookApp As Object
|
'Dim outlookApp As Object
|
||||||
'Dim mailItem As Outlook.MailItem
|
'Dim mailItem As Outlook.MailItem
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
Dim htmlText = File.ReadAllText(pfad)
|
Dim htmlText = File.ReadAllText(pfad)
|
||||||
'outlookApp = CreateObject("Outlook.Application")
|
|
||||||
'mailItem = outlookApp.Session.OpenSharedItem(pfad)
|
|
||||||
|
|
||||||
If htmlText IsNot Nothing Then
|
|
||||||
If idsInvoice.isMail_IDS(htmlText) Then
|
|
||||||
If idsInvoice.getPDF_IDS(htmlText, filename, Zielpfad & idsInvoice.Invoicenumber & ".pdf") Then
|
|
||||||
idsInvoice.DocumentName = filename
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
If htmlText IsNot Nothing Then
|
||||||
|
If idsInvoice.isMail_IDS(htmlText) Then
|
||||||
|
If idsInvoice.getPDF_IDS(htmlText, filename, Zielpfad & idsInvoice.Invoicenumber & ".pdf") Then
|
||||||
|
idsInvoice.DocumentName = filename
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
idsInvoice.Zeitstempel = Now()
|
|
||||||
idsInvoice.SAVE()
|
|
||||||
Catch ex As Exception
|
|
||||||
|
|
||||||
Finally
|
End If
|
||||||
Try
|
idsInvoice.Zeitstempel = Now()
|
||||||
|
idsInvoice.SAVE()
|
||||||
'If mailItem IsNot Nothing Then
|
Catch ex As Exception
|
||||||
' Marshal.ReleaseComObject(mailItem)
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name, VERAG_PROG_ALLGEMEIN.ERROR_OP.LOG)
|
||||||
'End If
|
End Try
|
||||||
Catch ex As Exception
|
|
||||||
|
|
||||||
End Try
|
|
||||||
|
|
||||||
End Try
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -5381,4 +5407,48 @@ Public Class frmStartOptions
|
|||||||
f.ShowDialog()
|
f.ShowDialog()
|
||||||
Me.Visible = True
|
Me.Visible = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Button26_Click(sender As Object, e As EventArgs) Handles Button26.Click
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LinkLabel66_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel66.LinkClicked
|
||||||
|
|
||||||
|
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
|
||||||
|
If txtMRNPrefix.Text = "" Then Exit Sub
|
||||||
|
|
||||||
|
|
||||||
|
Dim dtRE = sql.loadDgvBySql_Param(" select RK_ID, Belegdaten, Weitere_Reg_Nr from RechnungsausgangPositionen where Belegdaten is not null and Left(Belegdaten ," & txtMRNPrefix.Text.Length & ") = '" & txtMRNPrefix.Text & "' and Weitere_Reg_Nr is null", "FMZOLL")
|
||||||
|
|
||||||
|
|
||||||
|
If dtRE.Rows.Count > 0 Then
|
||||||
|
Dim i As Integer = 0
|
||||||
|
If vbYes = MsgBox("Möchten Sie bei " & dtRE.Rows.Count & " die alte MRN-Nr hinzufügen?" & vbNewLine & "(Daten werden nur erweitert, nicht überschrieben!!!)", vbYesNoCancel) Then
|
||||||
|
|
||||||
|
|
||||||
|
For Each r In dtRE.Rows
|
||||||
|
Dim mrnAlt = sql.DLookup("Weitere_Reg_Nr", "[AVISO].[dbo].[tbl_DY_Zollmeldungen_Import]", "[Weitere_Reg_Nr] is not null and [Registriernummer_MRN] = '" & r.Item("Belegdaten") & "'", "AVISO")
|
||||||
|
If mrnAlt IsNot Nothing AndAlso mrnAlt <> "" Then
|
||||||
|
|
||||||
|
If sql.doSQL("update RechnungsausgangPositionen set Weitere_Reg_Nr ='" & mrnAlt & "' where RK_ID= " & r.Item("RK_ID") & " AND Belegdaten = '" & r.Item("Belegdaten") & "'", "FMZOLL") Then
|
||||||
|
i += 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
MsgBox(i & " Rechnungspositionen wurden aktualisiert." & IIf((i < dtRE.Rows.Count), vbNewLine & " Zu den anderen Rechnungen konnte keine Verknüpfung gefunden werden!", ""))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
MsgBox("Keine Rechnungen mit MRN-Präfix" & txtMRNPrefix.Text)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user