GVMS Feature implementiert

This commit is contained in:
2022-11-15 15:54:10 +01:00
parent 4598cce1d1
commit c4aaf70bee
6 changed files with 654 additions and 448 deletions

View File

@@ -27,6 +27,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.dgvListe = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ExportCSVToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ExportCSV2ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.btnOpenOver85Days = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.txtDatBis = New VERAG_PROG_ALLGEMEIN.MyTextBox()
@@ -63,7 +64,6 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.lblSaldo = New System.Windows.Forms.Label()
Me.lblZollsatz = New System.Windows.Forms.Label()
Me.lblReferenzwert = New System.Windows.Forms.Label()
Me.ExportCSV2ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
CType(Me.dgvListe, System.ComponentModel.ISupportInitialize).BeginInit()
Me.ContextMenuStrip1.SuspendLayout()
Me.Panel1.SuspendLayout()
@@ -78,24 +78,30 @@ Partial Class frmGesamtsicherheitenMenuNEU
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.dgvListe.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvListe.ContextMenuStrip = Me.ContextMenuStrip1
Me.dgvListe.Location = New System.Drawing.Point(-3, 307)
Me.dgvListe.Location = New System.Drawing.Point(-3, 288)
Me.dgvListe.Name = "dgvListe"
Me.dgvListe.ReadOnly = True
Me.dgvListe.Size = New System.Drawing.Size(606, 408)
Me.dgvListe.Size = New System.Drawing.Size(606, 427)
Me.dgvListe.TabIndex = 1
'
'ContextMenuStrip1
'
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ExportCSVToolStripMenuItem, Me.ExportCSV2ToolStripMenuItem})
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
Me.ContextMenuStrip1.Size = New System.Drawing.Size(181, 70)
Me.ContextMenuStrip1.Size = New System.Drawing.Size(171, 48)
'
'ExportCSVToolStripMenuItem
'
Me.ExportCSVToolStripMenuItem.Name = "ExportCSVToolStripMenuItem"
Me.ExportCSVToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
Me.ExportCSVToolStripMenuItem.Size = New System.Drawing.Size(170, 22)
Me.ExportCSVToolStripMenuItem.Text = "Export CSV"
'
'ExportCSV2ToolStripMenuItem
'
Me.ExportCSV2ToolStripMenuItem.Name = "ExportCSV2ToolStripMenuItem"
Me.ExportCSV2ToolStripMenuItem.Size = New System.Drawing.Size(170, 22)
Me.ExportCSV2ToolStripMenuItem.Text = "Export CSV Details"
'
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
@@ -137,7 +143,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(606, 309)
Me.Panel1.Size = New System.Drawing.Size(606, 288)
Me.Panel1.TabIndex = 0
'
'btnOpenOver85Days
@@ -147,7 +153,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.btnOpenOver85Days.FlatAppearance.BorderSize = 0
Me.btnOpenOver85Days.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnOpenOver85Days.ForeColor = System.Drawing.Color.Black
Me.btnOpenOver85Days.Location = New System.Drawing.Point(36, 244)
Me.btnOpenOver85Days.Location = New System.Drawing.Point(196, 210)
Me.btnOpenOver85Days.Name = "btnOpenOver85Days"
Me.btnOpenOver85Days.Size = New System.Drawing.Size(116, 20)
Me.btnOpenOver85Days.TabIndex = 32
@@ -452,7 +458,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.FlatButton2.FlatAppearance.BorderSize = 0
Me.FlatButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.FlatButton2.ForeColor = System.Drawing.Color.Black
Me.FlatButton2.Location = New System.Drawing.Point(513, 191)
Me.FlatButton2.Location = New System.Drawing.Point(513, 220)
Me.FlatButton2.Name = "FlatButton2"
Me.FlatButton2.Size = New System.Drawing.Size(81, 20)
Me.FlatButton2.TabIndex = 30
@@ -467,7 +473,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.btnSucheStarten.FlatAppearance.BorderSize = 0
Me.btnSucheStarten.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnSucheStarten.ForeColor = System.Drawing.Color.Black
Me.btnSucheStarten.Location = New System.Drawing.Point(32, 281)
Me.btnSucheStarten.Location = New System.Drawing.Point(32, 254)
Me.btnSucheStarten.Name = "btnSucheStarten"
Me.btnSucheStarten.Size = New System.Drawing.Size(81, 20)
Me.btnSucheStarten.TabIndex = 33
@@ -490,7 +496,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.txtbis._WaehrungZeichen = True
Me.txtbis.Anchor = System.Windows.Forms.AnchorStyles.Right
Me.txtbis.ForeColor = System.Drawing.Color.Black
Me.txtbis.Location = New System.Drawing.Point(513, 167)
Me.txtbis.Location = New System.Drawing.Point(513, 196)
Me.txtbis.MaxLineLength = -1
Me.txtbis.MaxLines_Warning = ""
Me.txtbis.MaxLines_Warning_Label = Nothing
@@ -516,7 +522,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.txtVon._WaehrungZeichen = True
Me.txtVon.Anchor = System.Windows.Forms.AnchorStyles.Right
Me.txtVon.ForeColor = System.Drawing.Color.Black
Me.txtVon.Location = New System.Drawing.Point(510, 124)
Me.txtVon.Location = New System.Drawing.Point(510, 153)
Me.txtVon.MaxLineLength = -1
Me.txtVon.MaxLines_Warning = ""
Me.txtVon.MaxLines_Warning_Label = Nothing
@@ -532,7 +538,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
Me.Label3.ForeColor = System.Drawing.Color.Honeydew
Me.Label3.Location = New System.Drawing.Point(510, 148)
Me.Label3.Location = New System.Drawing.Point(510, 177)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(24, 15)
Me.Label3.TabIndex = 22
@@ -545,7 +551,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
Me.Label2.ForeColor = System.Drawing.Color.Honeydew
Me.Label2.Location = New System.Drawing.Point(510, 105)
Me.Label2.Location = New System.Drawing.Point(510, 134)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(28, 15)
Me.Label2.TabIndex = 10
@@ -605,7 +611,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.btnNeu.FlatAppearance.BorderSize = 0
Me.btnNeu.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnNeu.ForeColor = System.Drawing.Color.Black
Me.btnNeu.Location = New System.Drawing.Point(522, 276)
Me.btnNeu.Location = New System.Drawing.Point(519, 253)
Me.btnNeu.Name = "btnNeu"
Me.btnNeu.Size = New System.Drawing.Size(75, 23)
Me.btnNeu.TabIndex = 34
@@ -617,8 +623,8 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.lblSaldo.Anchor = System.Windows.Forms.AnchorStyles.Right
Me.lblSaldo.AutoSize = True
Me.lblSaldo.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblSaldo.ForeColor = System.Drawing.Color.Honeydew
Me.lblSaldo.Location = New System.Drawing.Point(398, 21)
Me.lblSaldo.ForeColor = System.Drawing.Color.Red
Me.lblSaldo.Location = New System.Drawing.Point(398, 11)
Me.lblSaldo.Name = "lblSaldo"
Me.lblSaldo.Size = New System.Drawing.Size(82, 24)
Me.lblSaldo.TabIndex = 1
@@ -630,7 +636,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.lblZollsatz.AutoSize = True
Me.lblZollsatz.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblZollsatz.ForeColor = System.Drawing.Color.Honeydew
Me.lblZollsatz.Location = New System.Drawing.Point(399, 83)
Me.lblZollsatz.Location = New System.Drawing.Point(399, 116)
Me.lblZollsatz.Name = "lblZollsatz"
Me.lblZollsatz.Size = New System.Drawing.Size(63, 16)
Me.lblZollsatz.TabIndex = 9
@@ -642,18 +648,12 @@ Partial Class frmGesamtsicherheitenMenuNEU
Me.lblReferenzwert.AutoSize = True
Me.lblReferenzwert.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblReferenzwert.ForeColor = System.Drawing.Color.Honeydew
Me.lblReferenzwert.Location = New System.Drawing.Point(399, 56)
Me.lblReferenzwert.Location = New System.Drawing.Point(399, 89)
Me.lblReferenzwert.Name = "lblReferenzwert"
Me.lblReferenzwert.Size = New System.Drawing.Size(95, 16)
Me.lblReferenzwert.TabIndex = 6
Me.lblReferenzwert.Text = "Referenzwert: -"
'
'ExportCSV2ToolStripMenuItem
'
Me.ExportCSV2ToolStripMenuItem.Name = "ExportCSV2ToolStripMenuItem"
Me.ExportCSV2ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
Me.ExportCSV2ToolStripMenuItem.Text = "Export CSV Details"
'
'frmGesamtsicherheitenMenuNEU
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

View File

@@ -389,18 +389,21 @@ Public Class frmGesamtsicherheitenMenuNEU
Private Sub ExportCSV2ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExportCSV2ToolStripMenuItem.Click
If dgvListe.SelectedRows.Count > 0 Then
If dgvListe.Rows.Count > 0 Then
Dim list As New List(Of Integer)
For Each row As DataGridViewRow In dgvListe.SelectedRows
For Each row As DataGridViewRow In dgvListe.Rows
list.Add(CInt(row.Cells("gs_gsnr").Value))
Next
Dim frm As New frmGesamtsicherheitenNEU
frm.LoadDGVSicherheitenForExport(list)
SDL.cProgramFunctions.genExcelFromDGV_NEW(frm.dgvGesamtsicherheit)
Dim datumVon As String = DateTimePicker1.Value.AddDays(-1)
frm.LoadDataTableSicherheitenForExport(list, datumVon, txtDatBis.Text)
SDL.cProgramFunctions.genExcelFromDT_NEW(frm.dtSicherheiten)
End If
End Sub

View File

@@ -1,4 +1,5 @@

Imports System.Data.SqlTypes
Imports System.Linq.Expressions
Imports GrapeCity.Viewer.Common.Model
Imports Org.BouncyCastle.Cms
@@ -43,6 +44,8 @@ Public Class frmGesamtsicherheitenNEU
Public dataTable As New DataTable()
Public dtSicherheiten As New DataTable()
Private Sub frmGesamtsicherheitNEU_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -149,7 +152,7 @@ Public Class frmGesamtsicherheitenNEU
End Sub
Public Sub LoadDGVSicherheitenForExport(list As List(Of Integer))
Public Sub LoadDataTableSicherheitenForExport(list As List(Of Integer), datumVon As String, datumBis As String)
Dim gsnr As String
Dim counter = 0
@@ -162,15 +165,52 @@ Public Class frmGesamtsicherheitenNEU
Next
Dim SQLStringSicherheit As String = "select [gs_gsId] as Id, [gs_ATBNr] as 'ATB Verwahrlager', CAST(gs_datum as Date) as Datum, CONVERT(VARCHAR(5),gs_datum, 108) as Uhrzeit, [gs_warenwert] as Warenwert, [gs_sicherheitsbetrag] as Sicherheitbetrag, [gs_freitext] as Freitext, [gs_atr] as 'ATR ja/nein', [gs_ust] as '19% EUSt',
[gsp_ATCNr] as 'ATCNr oder MRN eroeffnet', CAST(gsp_erstellungsdatum as Date) as Datum, CONVERT(VARCHAR(5),gsp_erstellungsdatum, 108) as Uhrzeit, [gsp_warenwert] as Warenwert, [gsp_sicherheitsbetrag] as Sicherheitsbetrag, [gsp_freitext] as Freitext, [gs_saldo] as Saldo
Dim SQLStringSicherheit As String = "select [gs_ATBNr] as 'ATB Verwahrlager',[gs_gsnr] as 'GS Nr', CAST(gs_datum as Date) as Datum, CONVERT(VARCHAR(5),gs_datum, 108) as Uhrzeit, [gs_warenwert] as Warenwert, [gs_sicherheitsbetrag] as Sicherheitbetrag, [gs_saldo] as Saldo, [gs_freitext] as Freitext, [gs_atr] as 'ATR ja/nein', [gs_ust] as '19% EUSt',
[gsp_ATCNr] as 'ATCNr oder MRN eroeffnet', CAST(gsp_erstellungsdatum as Date) as Datum, CONVERT(VARCHAR(5),gsp_erstellungsdatum, 108) as Uhrzeit, [gsp_warenwert] as Warenwert, [gsp_sicherheitsbetrag] as Sicherheitsbetrag2, [gsp_freitext] as Freitext
from [tblGesamtsicherheit]
inner join [tblGesamtsicherheitsPositionen] on [tblGesamtsicherheit].gs_gsId = [tblGesamtsicherheitsPositionen].gsp_gsId
where [gs_gsnr] IN (" & gsnr & ")
order by gs_gsId"
dgvGesamtsicherheit.SET_SQL(SQLStringSicherheit, "AVISO", ,)
dgvGesamtsicherheit.LOAD()
dtSicherheiten = SQL.loadDgvBySql(SQLStringSicherheit, "AVISO", 100, True)
dtSicherheiten.Columns.Add("SSaldo")
Dim drFirst = dtSicherheiten.NewRow
drFirst.Item("ATB Verwahrlager") = "Uebertrag vom " & datumVon
drFirst.Item("SSaldo") = CDbl(dtSicherheiten.Rows(0).Item("Saldo"))
dtSicherheiten.Rows.InsertAt(drFirst, 0)
Dim sicherheitsbetragATBs As Double
Dim sicherheitsbetragATCs As Double
Dim saldo As Double
Dim c1 As Double
Dim saldoStart As Double
For i As Integer = 1 To dtSicherheiten.Rows.Count - 1
saldoStart = CDbl(dtSicherheiten.Rows(0).Item("SSaldo"))
saldo = CDbl(dtSicherheiten.Rows(i - 1).Item("SSaldo"))
sicherheitsbetragATCs = CDbl(dtSicherheiten.Rows(i).Item("Sicherheitbetrag"))
sicherheitsbetragATBs = CDbl(dtSicherheiten.Rows(i).Item("Sicherheitsbetrag2"))
c1 = saldo - sicherheitsbetragATCs + sicherheitsbetragATBs
dtSicherheiten.Rows(i)("SSaldo") = c1
Next
Dim drLast = dtSicherheiten.NewRow
drLast.Item("ATB Verwahrlager") = "Saldo zum " & datumBis
drLast.Item("SSaldo") = CDbl(dtSicherheiten.Rows(dtSicherheiten.Rows.Count - 1).Item("SSaldo"))
dtSicherheiten.Rows.InsertAt(drLast, dtSicherheiten.Rows.Count)
dtSicherheiten.Columns.Remove("Saldo")
End Sub
@@ -202,7 +242,7 @@ Public Class frmGesamtsicherheitenNEU
Dim sqlSearchSting As String = ""
If withFilterParam = True Then
sqlSearchSting &= "AND gsp_gsid IN (select gs_gsId from [tblGesamtsicherheit] where [gs_gsnr] = '" & gessicherheitID & "'"
sqlSearchSting &= "And gsp_gsid In (Select gs_gsId from [tblGesamtsicherheit] where [gs_gsnr] = '" & gessicherheitID & "'"
If txt_Suche.Text <> "" Then sqlSearchSting &= "AND ([gs_abfertigungsNr] Like '%" & txt_Suche.Text & "%' OR [gs_ATBNr] Like '%" & txt_Suche.Text & "%' OR [gs_LKWKZ] like '%" & txt_Suche.Text & "%' OR [gs_avisoId] like '%" & txt_Suche.Text & "%' OR [gs_freitext] like '%" & txt_Suche.Text & "%')"
If cbx_Suche_Warenort._value <> "" Then sqlSearchSting &= " AND gs_warenort like '%" & cbx_Suche_Warenort._value & "%'"
sqlSearchSting &= ")"

File diff suppressed because it is too large Load Diff

View File

@@ -1531,9 +1531,6 @@
mVCCPwiVeQBaqAV4Jfq5XQAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="MenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>296, 17</value>
</metadata>
<data name="Button6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAIdJREFUOE/V
@@ -1654,18 +1651,6 @@
<metadata name="clmnPreis.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clmnVK_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clmnFirma.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clmnLeistung.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clmnPreis.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="Button9.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABGdBTUEAALGPC/xhBQAAAHtJREFUSEvt
@@ -1898,9 +1883,6 @@
<metadata name="cntxtOptions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>174, 17</value>
</metadata>
<metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>404, 17</value>
</metadata>
<metadata name="ctxtWeitereFormulare.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>596, 17</value>
</metadata>

View File

@@ -7,6 +7,7 @@ Imports System.Data.SqlClient
Imports iTextSharp.text.pdf
Imports Microsoft.Office.Interop
Imports DocumentFormat.OpenXml.Presentation
Imports CefSharp
Public Class frmSendungsdetailsNEU
Public AvisoId As Integer
@@ -2170,6 +2171,8 @@ Public Class frmSendungsdetailsNEU
btnAufschub_Empf.Visible = (cboAbfertigungsart._value <> "23")
btnAufschub_VERAG.Visible = (cboAbfertigungsart._value <> "23")
setContextMenuGVMSControl()
If cboAbfertigungsart._value = "23" Then
SENDUNG_LIST(CURRENT_INDEX).tblSnd_aufschub = ""
ElseIf cboAbfertigungsart._value = "9" Then
@@ -2909,6 +2912,7 @@ Public Class frmSendungsdetailsNEU
Dim FilialeAktFirma = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale2(SENDUNG_LIST(CURRENT_INDEX).FilialenNr,, "")
Dim FilialeNeuFirma = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale2(cboFiliale._value,, "")
setContextMenuGVMSControl()
If FilialeNeuFirma <> "FRONTOFFICE" And FilialeAktFirma <> "FRONTOFFICE" Then
If FilialeAktFirma <> "" And FilialeNeuFirma <> "" Then
@@ -5126,7 +5130,6 @@ Public Class frmSendungsdetailsNEU
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
Mail = outl.CreateItem(0)
Dim OnylSND = -1
If sender Is AktuelleSendungAnhängeWählenToolStripMenuItem Then
'For Each r As DataGridViewRow In dgvAnhang.SelectedRows
@@ -5293,6 +5296,144 @@ Public Class frmSendungsdetailsNEU
Me.Cursor = Cursors.Default
End Sub
Private Sub AktuelleSendungGVMSToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AlleEIDRSendungenToolStripMenuItem.Click, AktuelleSendungToolStripMenuItem.Click
Me.Cursor = Cursors.WaitCursor
Try
VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.clearTMPPath("ClipBoard_TMP")
If True Then
Try
Dim outl As New Outlook.Application
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
Dim isReply As Boolean = False
If dgvAnhang.SelectedRows.Count = 1 AndAlso dgvAnhang.CurrentRow.Cells("anh_Typ").Value = "MSG" Then
Dim olSess = outl.Session
Dim PathTmpANH = VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(dgvAnhang.CurrentRow.Cells("anh_docId").Value)
Mail = CType(olSess.OpenSharedItem(PathTmpANH), Outlook.MailItem)
Mail = Mail.Reply()
isReply = True
Else
Mail = outl.CreateItem(0)
End If
Dim OnylSND = -1
If sender Is AktuelleSendungToolStripMenuItem Then
'For Each r As DataGridViewRow In dgvAnhang.SelectedRows
' Mail.Attachments.Add(VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(r.Cells("anh_docId").Value), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
'Next
OnylSND = CURRENT_INDEX
End If
'LEX
Mail.Subject = "GVMS: Kennzeichen: " & AVISO.LKW_Nr & " | Pos: " & SENDUNG_LIST(CURRENT_INDEX).FilialenNr & "/" & SENDUNG_LIST(CURRENT_INDEX).AbfertigungsNr
Dim DETextHTML = ""
DETextHTML &= "Sehr geehrter Geschäftspartner,<br>"
DETextHTML &= "<br>"
DETextHTML &= "hiermit bestätigen wir, dass die folgende(n) Sendung(en) durch uns im EIDR Verfahren erfasst wurden.<br>
Sie dürfen somit ins Zollgebiet des Vereinigten Königreichs einfahren und die Waren in den Freien Verkehr bringen.<br>"
DETextHTML &= "Bitte beachten Sie, dass Sie vor der Überfahrt einen GVMS-Eintrag erstellen müssen.<br>"
DETextHTML &= "Bitte verwenden Sie als Deklarationstyp die Entry In Declarant's Records (EIDR) und als Referenz die EORI-Nr.<br>"
DETextHTML &= "Wir übernehmen gerne die Eintragung für Sie bitte antworten Sie auf dieses Mail, wenn die Anmeldung durch uns durchgeführt werden sollte.<br><br>"
Dim ENTextHTML = ""
ENTextHTML &= "<br>"
ENTextHTML &= "Dear Business Partner,<br>"
ENTextHTML &= "<br>"
ENTextHTML &= "We hereby confirm that the following shipment(s) have been registered by us under the EIDR procedure.<br>
You may therefore enter the customs territory of the United Kingdom and release the goods for free circulation.<br>"
ENTextHTML &= "Please use Entry In Declarant's Records (EIDR) as declaration type and EORI no. as reference.<br>"
ENTextHTML &= "Please note that you must create a GVMS entry before crossing.<br>
We will be happy to make the entry for you - please reply to this email if the entry should be made by us"
ENTextHTML &= "You will find instructions attached.<br><br>"
ENTextHTML &= "Sendungen/Shipment(s):<br>"
Dim TextHTMLtable = ""
TextHTMLtable &= "<table border=1>"
TextHTMLtable &= "<tr><td>Pos</td><td>Referenz</td><td>Absender/Sender</td><td>Empfänger/Recipient</td><td>Sendung/Shipment</td><td>Kennzeichen/License plate</td><td>Frächter/Carrier</td><td>EORI</td></tr>"
Dim cnt = 1
For Each SND In SENDUNG_LIST
If True Then '(OnylSND >= 0 AndAlso SND Is SENDUNG_LIST(OnylSND)) Or (OnylSND < 0 And SND.FilialenNr = 7001) Then
TextHTMLtable &= "<tr>"
TextHTMLtable &= "<td><b>" & cnt & "</b></td>"
TextHTMLtable &= "<td><b>" & SND.FilialenNr & "/" & SND.AbfertigungsNr & "</b></td>"
TextHTMLtable &= "<td><b>" & SND.tblSnd_Absender & "</b></td>"
TextHTMLtable &= "<td><b>" & SND.tblSnd_Empfaenger & "</b></td>"
TextHTMLtable &= "<td><b>" & SND.tblSnd_Colli & " Pk. " & SND.tblSnd_Warenbezeichnung & " - " & SND.tblSnd_Gewicht & " kg </b></td>"
TextHTMLtable &= "<td><b>" & AVISO.LKW_Nr & "</b></td>"
TextHTMLtable &= "<td><b>" & AVISO.Frächter_KdNr & "</b></td>"
Dim KD As New VERAG_PROG_ALLGEMEIN.cKunde(SND.tblSnd_EmpfaengerKdNr)
If KD IsNot Nothing AndAlso KD IsNot Nothing Then
TextHTMLtable &= "<td><b>" & If(KD.EORITIN, "") & "</b></td>"
Else
TextHTMLtable &= "<td><b>-</b></td>"
End If
TextHTMLtable &= "</tr>"
cnt += 1
End If
Next
TextHTMLtable &= "</table>"
Dim EndTextHTML = ""
EndTextHTML &= "<br>"
EndTextHTML &= "<br>"
EndTextHTML &= "Für Rückfragen stehen wir gerne zur Verfügung/We are at your disposal for any questions<br>"
EndTextHTML &= "<br>"
EndTextHTML &= "Mit freundlichen Grüßen/Best regards<br>"
EndTextHTML &= VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME & "<br>"
EndTextHTML &= "<br>"
If isReply Then
Dim HTML = DETextHTML & ENTextHTML & TextHTMLtable & EndTextHTML & SDL.cFakturierung.getSignature("DE") & Mail.HTMLBody
Mail.HTMLBody = HTML
Mail.Display()
Else
Mail.HTMLBody = "<div style=""font-family:Calibri, Arial;font-size:15px;"">" & DETextHTML & ENTextHTML & TextHTMLtable & EndTextHTML & SDL.cFakturierung.getSignature("DE") & "</div>"
Mail.Display()
End If
'AvisoStatusFunctions.insertSendungsVermerk(SENDUNG_LIST(CURRENT_INDEX).tblSnd_SendungID, AvisoId, "Doks an Fremdspedition (SUBEN) weitergeleitet.", 46)
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Fehler beim Öffnen der Mail!")
End Try
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Fehler beim Öffnen der Mail!")
End Try
Me.Cursor = Cursors.Default
End Sub
Private Sub AMBARZollbeschauToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AMBARZollbeschauToolStripMenuItem.Click
Me.Cursor = Cursors.WaitCursor
@@ -5481,4 +5622,16 @@ Public Class frmSendungsdetailsNEU
Me.Cursor = Cursors.Default
End Sub
Private Sub setContextMenuGVMSControl()
If cboFiliale._value = "7001" AndAlso cboAbfertigungsart._value = "46" Then
GVMSInfoToolStripMenuItem.Visible = True
Else
GVMSInfoToolStripMenuItem.Visible = False
End If
End Sub
End Class