Compare commits

...

4 Commits

Author SHA1 Message Date
da8c599ec3 gesamtsicherheiten, Ref, Mail, etc. 2026-04-09 13:01:47 +02:00
0a66718faa Merge branch 'master' of https://git.it.verag.ag/edv/VERAGAddIn 2026-03-26 08:28:45 +01:00
719b1bf562 fix 2026-03-26 08:28:42 +01:00
5faf41f513 neue Logik für DFDS 2026-03-26 08:16:29 +01:00
4 changed files with 96 additions and 80 deletions

View File

@@ -36,7 +36,7 @@
<PublishUrl>\\ftps.verag.ag\g\FTP\Programme\VeragAddin\</PublishUrl>
<InstallUrl>http://ftps.verag.ag/VERAGAddin/</InstallUrl>
<TargetCulture>de</TargetCulture>
<ApplicationVersion>1.0.1.138</ApplicationVersion>
<ApplicationVersion>1.0.1.140</ApplicationVersion>
<AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision>
<UpdateEnabled>true</UpdateEnabled>
<UpdateInterval>0</UpdateInterval>
@@ -392,10 +392,11 @@
<SignManifests>true</SignManifests>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>AL20231110.pfx</ManifestKeyFile>
<ManifestKeyFile>
</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>75156A186435E8542612CE6E7E26CA9FCE0A5BAF</ManifestCertificateThumbprint>
<ManifestCertificateThumbprint>D21E170FE10FFCC8532FBDEFB75A35DB90661CC0</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>

View File

@@ -52,7 +52,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.3.0" newVersion="6.0.3.0" />
<bindingRedirect oldVersion="0.0.0.0-6.0.3.0" newVersion="6.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />

View File

@@ -44,9 +44,6 @@
Me.components = New System.ComponentModel.Container()
Me.Tab1 = Me.Factory.CreateRibbonTab
Me.Group1 = Me.Factory.CreateRibbonGroup
Me.NotifyIcon1 = New System.Windows.Forms.NotifyIcon(Me.components)
Me.btnInfo = Me.Factory.CreateRibbonButton
Me.btnUnsichtbar = Me.Factory.CreateRibbonButton
Me.btnAVISOUnleashed = Me.Factory.CreateRibbonButton
Me.Button1 = Me.Factory.CreateRibbonButton
Me.btnAvisoMail2 = Me.Factory.CreateRibbonButton
@@ -54,6 +51,9 @@
Me.btnVollmachten = Me.Factory.CreateRibbonButton
Me.btnVertraege = Me.Factory.CreateRibbonButton
Me.btnGestellungsgarantien = Me.Factory.CreateRibbonButton
Me.btnInfo = Me.Factory.CreateRibbonButton
Me.btnUnsichtbar = Me.Factory.CreateRibbonButton
Me.NotifyIcon1 = New System.Windows.Forms.NotifyIcon(Me.components)
Me.Tab1.SuspendLayout()
Me.Group1.SuspendLayout()
Me.SuspendLayout()
@@ -76,22 +76,6 @@
Me.Group1.Label = "AVISO"
Me.Group1.Name = "Group1"
'
'NotifyIcon1
'
Me.NotifyIcon1.Text = "NotifyIcon1"
Me.NotifyIcon1.Visible = True
'
'btnInfo
'
Me.btnInfo.Label = "?"
Me.btnInfo.Name = "btnInfo"
'
'btnUnsichtbar
'
Me.btnUnsichtbar.Label = "i"
Me.btnUnsichtbar.Name = "btnUnsichtbar"
Me.btnUnsichtbar.Visible = False
'
'btnAVISOUnleashed
'
Me.btnAVISOUnleashed.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge
@@ -145,6 +129,22 @@
Me.btnGestellungsgarantien.Name = "btnGestellungsgarantien"
Me.btnGestellungsgarantien.ShowImage = True
'
'btnInfo
'
Me.btnInfo.Label = "?"
Me.btnInfo.Name = "btnInfo"
'
'btnUnsichtbar
'
Me.btnUnsichtbar.Label = "i"
Me.btnUnsichtbar.Name = "btnUnsichtbar"
Me.btnUnsichtbar.Visible = False
'
'NotifyIcon1
'
Me.NotifyIcon1.Text = "NotifyIcon1"
Me.NotifyIcon1.Visible = True
'
'rbnMailItem
'
Me.Name = "rbnMailItem"

View File

@@ -740,41 +740,51 @@ Public Class AVISO_Mail_Functions
Dim dt As New DataTable()
dt.Columns.AddRange({
New DataColumn("Record"),
New DataColumn("Consignee"),
New DataColumn("Quantity"),
New DataColumn("GrossWeight"),
New DataColumn("OrderCustoms"),
New DataColumn("OperationType"),
New DataColumn("Description"),
New DataColumn("LinkText"),
New DataColumn("LinkUrl")
})
New DataColumn("Record"),
New DataColumn("Consignee"),
New DataColumn("Quantity"),
New DataColumn("GrossWeight"),
New DataColumn("OrderCustoms"),
New DataColumn("Address"),
New DataColumn("Code"),
New DataColumn("OperationType"),
New DataColumn("Links") ' store ALL links (doc + cmr)
})
Dim doc As New HtmlAgilityPack.HtmlDocument()
doc.LoadHtml(mailItem.HTMLBody)
Dim rows = doc.DocumentNode.SelectNodes("//tr[td]")
Dim rows = doc.DocumentNode.SelectNodes("//tr")
If rows Is Nothing Then Return dt
For Each row In rows
Dim cells = row.SelectNodes("td")
If cells Is Nothing OrElse cells.Count < 8 Then Continue For
If cells Is Nothing Then Continue For
Dim linkNode = cells(7).SelectSingleNode(".//a")
Dim recordText As String = Clean(cells(0).InnerText)
dt.Rows.Add(
Clean(cells(0).InnerText),
Clean(cells(1).InnerText),
Clean(cells(2).InnerText),
Clean(cells(3).InnerText),
Clean(cells(4).InnerText),
Clean(cells(5).InnerText),
Clean(cells(6).InnerText),
If(linkNode IsNot Nothing, Clean(linkNode.InnerText), ""),
If(linkNode IsNot Nothing, linkNode.GetAttributeValue("href", ""), "")
)
If Not IsNumeric(recordText) Then Continue For
Dim linkNodes = row.SelectNodes(".//a")
Dim links As New List(Of String)
If linkNodes IsNot Nothing Then
For Each ln In linkNodes
Dim href = ln.GetAttributeValue("href", "")
If href <> "" Then links.Add(href)
Next
End If
Dim GetCell = Function(index As Integer) As String
If cells.Count > index Then
Return Clean(cells(index).InnerText)
End If
Return ""
End Function
dt.Rows.Add(recordText, GetCell(1), GetCell(2), GetCell(3), GetCell(4), GetCell(5), GetCell(6), GetCell(7), String.Join("|", links))
Next
@@ -783,54 +793,59 @@ Public Class AVISO_Mail_Functions
Dim sendungsNrOld As String = ""
Dim missingDocuments As String = ""
For Each r In dt.Rows
For Each r As DataRow In dt.Rows
If r("LinkUrl") <> "" AndAlso r("LinkUrl").ToString.Contains("https://web01.ekoltransport.com.tr/dfdsdocumentservice/download/") Then
Dim links = r("Links").ToString().Split("|"c)
Dim link As String = r("LinkUrl")
For Each linkRaw In links
If link.EndsWith("%20") And link.Length > 3 Then
link = link.Remove(link.Length - 3)
End If
If String.IsNullOrWhiteSpace(linkRaw) Then Continue For
Dim sendungsNr As String = r("Record")
If linkRaw.Contains("dfdsdocumentservice/download") Or linkRaw.Contains("quadronet.dfds.com/link") Then
Dim Descr As String = r("Description")
Dim link As String = linkRaw.Trim()
If Descr <> "" Then
Descr = Descr.ToString.Replace(";", "_")
Descr = Descr.ToString.Replace(".", "_")
Descr = Descr.ToString.Replace(" ", "_")
Descr = VERAG_PROG_ALLGEMEIN.cDATENSERVER.replaceInvalidCahr(Descr)
End If
If sendungsNrOld <> "" AndAlso sendungsNrOld <> sendungsNr Then
counter = 1
End If
Dim file = VERAG_PROG_ALLGEMEIN.cFormularManager.getFile_FromURLStream(link, r("Record") & "_" & counter & "_" & IIf(Descr <> "", Descr, ""),, False)
If IO.File.Exists(file) Then
ATT.Add(file)
Else
If missingDocuments <> "" Then
missingDocuments &= vbNewLine & r("Record") & "_" & counter & "_" & IIf(Descr <> "", Descr, "")
Else
missingDocuments = "fehlende Dokumente: " & vbNewLine & r("Record") & "_" & counter & "_" & IIf(Descr <> "", Descr, "")
If link.EndsWith("%20") Then
link = link.Substring(0, link.Length - 3)
End If
End If
counter += 1
Dim sendungsNr As String = r("Record").ToString()
Dim descr As String = r("Consignee").ToString()
sendungsNrOld = r("Record")
If descr <> "" Then
descr = descr.Replace(";", "_").Replace(".", "_").Replace(" ", "_")
descr = VERAG_PROG_ALLGEMEIN.cDATENSERVER.replaceInvalidCahr(descr)
End If
If sendungsNrOld <> "" AndAlso sendungsNrOld <> sendungsNr Then
counter = 1
End If
Dim filename As String = sendungsNr & "_" & counter &
If(descr <> "", "_" & descr, "")
Dim file = VERAG_PROG_ALLGEMEIN.cFormularManager.getFile_FromURLStream_NEW(link, filename,, False)
If IO.File.Exists(file) Then
ATT.Add(file)
Else
If missingDocuments <> "" Then
missingDocuments &= vbNewLine & filename
Else
missingDocuments = "fehlende Dokumente:" & vbNewLine & filename
End If
End If
counter += 1
sendungsNrOld = sendungsNr
End If
Next
Next
If missingDocuments <> "" Then
INFO = missingDocuments
End If