MDM Mail
This commit is contained in:
@@ -87,7 +87,7 @@ Public Class frmStartOptions
|
|||||||
|
|
||||||
Dim PARAM = "" 'INSERT_BENACHRICHTIGUNG_VERMERKE_TEAMS
|
Dim PARAM = "" 'INSERT_BENACHRICHTIGUNG_VERMERKE_TEAMS
|
||||||
|
|
||||||
PARAM = ""
|
PARAM = "mdm_mail_html"
|
||||||
|
|
||||||
Dim parameter() As String = Environment.GetCommandLineArgs().ToArray
|
Dim parameter() As String = Environment.GetCommandLineArgs().ToArray
|
||||||
If (parameter.Count - 1) >= 1 Then 'Höher als 1 weil der index 0 der Pfad zum programm ist
|
If (parameter.Count - 1) >= 1 Then 'Höher als 1 weil der index 0 der Pfad zum programm ist
|
||||||
@@ -375,9 +375,9 @@ Public Class frmStartOptions
|
|||||||
|
|
||||||
'Bsp:
|
'Bsp:
|
||||||
'ExportJob E-Invoice:processing mail: F:\vb.net\RoutineManager3\RoutineManager.exe mdm_mail_attach "
|
'ExportJob E-Invoice:processing mail: F:\vb.net\RoutineManager3\RoutineManager.exe mdm_mail_attach "
|
||||||
'pfad = F:\eee_e-invoice\0CD522B58DB96E184EFBD2C622DD4C3B781A2D35.html
|
'von = "d.breimaier@verag.ag"
|
||||||
'betreff = IDS, customer: 0060003360 Invoice: DE00360936 from 15/06/15" "15.11.2024 08:13:37" "
|
'pfad = "F:\eee_e-invoice\0CD522B58DB96E184EFBD2C622DD4C3B781A2D35.html"
|
||||||
'von = d.breimaier@verag.ag"
|
'betreff = "IDS, customer: 0060003360 Invoice: DE00360936 from 15/06/15"
|
||||||
|
|
||||||
pfad = parameter(2)
|
pfad = parameter(2)
|
||||||
betreff = parameter(3)
|
betreff = parameter(3)
|
||||||
@@ -385,7 +385,6 @@ Public Class frmStartOptions
|
|||||||
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
|
||||||
|
|
||||||
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
|
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----------------------
|
'---------------------IDS----------------------
|
||||||
importFileFromIDSMailAnhang(pfad, betreff, PARAM)
|
importFileFromIDSMailAnhang(pfad, betreff, PARAM)
|
||||||
@@ -1662,32 +1661,35 @@ Public Class frmStartOptions
|
|||||||
|
|
||||||
betreff = betreff.replace("WG: ", "")
|
betreff = betreff.replace("WG: ", "")
|
||||||
betreff = betreff.replace("FW: ", "")
|
betreff = betreff.replace("FW: ", "")
|
||||||
|
betreff = betreff.replace(": ", "")
|
||||||
|
betreff = betreff.ToString.ToLower.Replace(" ", "")
|
||||||
|
|
||||||
Dim customerNo = ""
|
Dim customerNo = ""
|
||||||
Dim invoiceNo = ""
|
Dim invoiceNo = ""
|
||||||
Dim dateNo = ""
|
Dim dateNo = ""
|
||||||
Dim outputDate = ""
|
Dim outputDate = ""
|
||||||
Dim customerString = "customer "
|
Dim customerString = "customer"
|
||||||
Dim InvoiceString = "Invoice: "
|
Dim InvoiceString = "invoice"
|
||||||
Dim dateString = "from "
|
Dim dateString = "from"
|
||||||
Dim filename = ""
|
Dim filename = ""
|
||||||
|
|
||||||
If betreff.Length >= 58 AndAlso betreff.Contains(customerString) Then
|
|
||||||
customerNo = betreff.Substring(betreff.IndexOf(customerString) + customerString.Length, 10)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If betreff.Length >= 58 AndAlso betreff.Contains(InvoiceString) Then
|
If betreff.Contains(customerString) Then
|
||||||
invoiceNo = betreff.Substring(betreff.IndexOf(InvoiceString) + InvoiceString.Length, 10)
|
customerNo = betreff.Substring(betreff.IndexOf(customerString) + customerString.Length, 10)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If betreff.Length >= 58 AndAlso betreff.Contains(dateString) Then
|
If betreff.Contains(InvoiceString) Then
|
||||||
dateNo = betreff.Substring(betreff.IndexOf(dateString) + dateString.Length, 8)
|
invoiceNo = betreff.Substring(betreff.IndexOf(InvoiceString) + InvoiceString.Length, 10)
|
||||||
Dim parsedDate As DateTime = DateTime.ParseExact(dateNo, "dd/MM/yy", System.Globalization.CultureInfo.InvariantCulture)
|
End If
|
||||||
outputDate = parsedDate.ToString("dd.MM.yyyy")
|
|
||||||
|
|
||||||
End If
|
If betreff.Contains(dateString) Then
|
||||||
|
dateNo = betreff.Substring(betreff.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")
|
||||||
|
|
||||||
If outputDate IsNot Nothing AndAlso customerNo <> "" AndAlso invoiceNo <> "" Then
|
End If
|
||||||
|
|
||||||
|
If outputDate IsNot Nothing AndAlso customerNo <> "" AndAlso invoiceNo <> "" Then
|
||||||
|
|
||||||
Dim idsInvoice As New cIDSInvoice(outputDate, customerNo, invoiceNo)
|
Dim idsInvoice As New cIDSInvoice(outputDate, customerNo, invoiceNo)
|
||||||
If Not idsInvoice.hasEntry Then idsInvoice.SAVE()
|
If Not idsInvoice.hasEntry Then idsInvoice.SAVE()
|
||||||
@@ -1703,7 +1705,7 @@ Public Class frmStartOptions
|
|||||||
|
|
||||||
If htmlText IsNot Nothing Then
|
If htmlText IsNot Nothing Then
|
||||||
If idsInvoice.isMail_IDS(htmlText) Then
|
If idsInvoice.isMail_IDS(htmlText) Then
|
||||||
If idsInvoice.getPDF_IDS(htmlText, filename, Zielpfad & idsInvoice.Invoicenumber & ".pdf") Then
|
If idsInvoice.getPDF_IDS(htmlText, filename, Zielpfad & idsInvoice.Invoicenumber & "_" & idsInvoice.CustomerCode & ".pdf") Then
|
||||||
idsInvoice.DocumentName = filename
|
idsInvoice.DocumentName = filename
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user