From e545a16bfd6cd41bea87a0fa88f213477e393891 Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Wed, 8 Apr 2026 13:45:46 +0200 Subject: [PATCH] ATEZ EZA, Vermerke --- Aviso/ATEZ/frmATEZ_EZA.Designer.vb | 139 +++++++++++++++++++++++------ Aviso/ATEZ/frmATEZ_EZA.vb | 27 +++++- Aviso/frmHauptfenster.vb | 15 +++- Aviso/usrcntlAktDetails.vb | 18 ++-- 4 files changed, 158 insertions(+), 41 deletions(-) diff --git a/Aviso/ATEZ/frmATEZ_EZA.Designer.vb b/Aviso/ATEZ/frmATEZ_EZA.Designer.vb index a0deea1..805c66d 100644 --- a/Aviso/ATEZ/frmATEZ_EZA.Designer.vb +++ b/Aviso/ATEZ/frmATEZ_EZA.Designer.vb @@ -26,6 +26,7 @@ Partial Class frmATEZ_EZA Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmATEZ_EZA)) Me.btnSend = New System.Windows.Forms.Button() Me.pnlHead = New System.Windows.Forms.Panel() + Me.Label1 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.lblInfo = New System.Windows.Forms.Label() Me.Label8 = New System.Windows.Forms.Label() @@ -35,7 +36,6 @@ Partial Class frmATEZ_EZA Me.Label9 = New System.Windows.Forms.Label() Me.sbAdressierteZollstelle = New VERAG_PROG_ALLGEMEIN.MySearchBox() Me.txtDyMandant = New System.Windows.Forms.Label() - Me.Label1 = New System.Windows.Forms.Label() Me.txtDyNiederlassung = New System.Windows.Forms.Label() Me.lblBezugsnummer = New System.Windows.Forms.Label() Me.Button3 = New System.Windows.Forms.Button() @@ -50,8 +50,15 @@ Partial Class frmATEZ_EZA Me.dgvAnhaenge = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.columnName = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.Button2 = New System.Windows.Forms.Button() + Me.btnPrio_CommInv = New System.Windows.Forms.Button() + Me.Label5 = New System.Windows.Forms.Label() + Me.btnPrio_eFatura = New System.Windows.Forms.Button() + Me.btnPrio_Export = New System.Windows.Forms.Button() + Me.btnPrio_ftz = New System.Windows.Forms.Button() + Me.Panel1 = New System.Windows.Forms.Panel() Me.pnlHead.SuspendLayout() CType(Me.dgvAnhaenge, System.ComponentModel.ISupportInitialize).BeginInit() + Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'btnSend @@ -62,7 +69,7 @@ Partial Class frmATEZ_EZA Me.btnSend.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!) Me.btnSend.Image = Global.AVISO.My.Resources.Resources.ico_atez_declarantAI Me.btnSend.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.btnSend.Location = New System.Drawing.Point(473, 348) + Me.btnSend.Location = New System.Drawing.Point(473, 343) Me.btnSend.Margin = New System.Windows.Forms.Padding(2) Me.btnSend.Name = "btnSend" Me.btnSend.Padding = New System.Windows.Forms.Padding(5, 0, 5, 0) @@ -76,6 +83,8 @@ Partial Class frmATEZ_EZA ' Me.pnlHead.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.pnlHead.BackColor = System.Drawing.Color.White + Me.pnlHead.Controls.Add(Me.Button1) + Me.pnlHead.Controls.Add(Me.Button2) Me.pnlHead.Controls.Add(Me.Label1) Me.pnlHead.Controls.Add(Me.Label4) Me.pnlHead.Controls.Add(Me.lblInfo) @@ -93,6 +102,17 @@ Partial Class frmATEZ_EZA Me.pnlHead.Size = New System.Drawing.Size(675, 151) Me.pnlHead.TabIndex = 112 ' + 'Label1 + ' + Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Label1.AutoSize = True + Me.Label1.BackColor = System.Drawing.Color.White + Me.Label1.Location = New System.Drawing.Point(387, 13) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(89, 13) + Me.Label1.TabIndex = 106 + Me.Label1.Text = "Bezugsnummer:" + ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.White @@ -216,17 +236,6 @@ Partial Class frmATEZ_EZA Me.txtDyMandant.Text = "VERG" Me.txtDyMandant.TextAlign = System.Drawing.ContentAlignment.TopRight ' - 'Label1 - ' - Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.Label1.AutoSize = True - Me.Label1.BackColor = System.Drawing.Color.White - Me.Label1.Location = New System.Drawing.Point(387, 13) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(89, 13) - Me.Label1.TabIndex = 106 - Me.Label1.Text = "Bezugsnummer:" - ' 'txtDyNiederlassung ' Me.txtDyNiederlassung.BackColor = System.Drawing.Color.White @@ -275,9 +284,9 @@ Partial Class frmATEZ_EZA ' 'Button1 ' - Me.Button1.Location = New System.Drawing.Point(3, 383) + Me.Button1.Location = New System.Drawing.Point(553, 117) Me.Button1.Name = "Button1" - Me.Button1.Size = New System.Drawing.Size(178, 23) + Me.Button1.Size = New System.Drawing.Size(122, 23) Me.Button1.TabIndex = 153 Me.Button1.Text = "Clear Token Cache" Me.Button1.UseVisualStyleBackColor = True @@ -285,7 +294,7 @@ Partial Class frmATEZ_EZA 'btnAgg_Tnr ' Me.btnAgg_Tnr.BackColor = System.Drawing.Color.DeepSkyBlue - Me.btnAgg_Tnr.Location = New System.Drawing.Point(79, 345) + Me.btnAgg_Tnr.Location = New System.Drawing.Point(76, 3) Me.btnAgg_Tnr.Name = "btnAgg_Tnr" Me.btnAgg_Tnr.Size = New System.Drawing.Size(83, 23) Me.btnAgg_Tnr.TabIndex = 154 @@ -296,7 +305,7 @@ Partial Class frmATEZ_EZA 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Segoe UI", 8.0!) - Me.Label2.Location = New System.Drawing.Point(6, 350) + Me.Label2.Location = New System.Drawing.Point(3, 8) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(103, 17) Me.Label2.TabIndex = 149 @@ -305,7 +314,7 @@ Partial Class frmATEZ_EZA 'btnAgg_Origin ' Me.btnAgg_Origin.BackColor = System.Drawing.Color.DeepSkyBlue - Me.btnAgg_Origin.Location = New System.Drawing.Point(165, 345) + Me.btnAgg_Origin.Location = New System.Drawing.Point(162, 3) Me.btnAgg_Origin.Name = "btnAgg_Origin" Me.btnAgg_Origin.Size = New System.Drawing.Size(92, 23) Me.btnAgg_Origin.TabIndex = 155 @@ -315,7 +324,7 @@ Partial Class frmATEZ_EZA ' 'btnAgg_Unit ' - Me.btnAgg_Unit.Location = New System.Drawing.Point(260, 345) + Me.btnAgg_Unit.Location = New System.Drawing.Point(257, 3) Me.btnAgg_Unit.Name = "btnAgg_Unit" Me.btnAgg_Unit.Size = New System.Drawing.Size(79, 23) Me.btnAgg_Unit.TabIndex = 156 @@ -325,7 +334,7 @@ Partial Class frmATEZ_EZA ' 'btnAgg_desc ' - Me.btnAgg_desc.Location = New System.Drawing.Point(342, 345) + Me.btnAgg_desc.Location = New System.Drawing.Point(339, 3) Me.btnAgg_desc.Name = "btnAgg_desc" Me.btnAgg_desc.Size = New System.Drawing.Size(126, 23) Me.btnAgg_desc.TabIndex = 157 @@ -360,32 +369,97 @@ Partial Class frmATEZ_EZA ' 'Button2 ' - Me.Button2.Location = New System.Drawing.Point(402, 383) + Me.Button2.Location = New System.Drawing.Point(610, 96) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(65, 23) Me.Button2.TabIndex = 158 Me.Button2.Text = "json" Me.Button2.UseVisualStyleBackColor = True ' + 'btnPrio_CommInv + ' + Me.btnPrio_CommInv.BackColor = System.Drawing.Color.DeepSkyBlue + Me.btnPrio_CommInv.Location = New System.Drawing.Point(76, 28) + Me.btnPrio_CommInv.Name = "btnPrio_CommInv" + Me.btnPrio_CommInv.Size = New System.Drawing.Size(116, 23) + Me.btnPrio_CommInv.TabIndex = 159 + Me.btnPrio_CommInv.Tag = "1" + Me.btnPrio_CommInv.Text = "Handelsrechnung" + Me.btnPrio_CommInv.UseVisualStyleBackColor = False + ' + 'Label5 + ' + Me.Label5.Font = New System.Drawing.Font("Segoe UI", 8.0!) + Me.Label5.Location = New System.Drawing.Point(3, 33) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(103, 17) + Me.Label5.TabIndex = 160 + Me.Label5.Text = "Priorität:" + ' + 'btnPrio_eFatura + ' + Me.btnPrio_eFatura.BackColor = System.Drawing.Color.White + Me.btnPrio_eFatura.Location = New System.Drawing.Point(195, 28) + Me.btnPrio_eFatura.Name = "btnPrio_eFatura" + Me.btnPrio_eFatura.Size = New System.Drawing.Size(69, 23) + Me.btnPrio_eFatura.TabIndex = 161 + Me.btnPrio_eFatura.Tag = "0" + Me.btnPrio_eFatura.Text = "eFatura" + Me.btnPrio_eFatura.UseVisualStyleBackColor = False + ' + 'btnPrio_Export + ' + Me.btnPrio_Export.BackColor = System.Drawing.Color.White + Me.btnPrio_Export.Location = New System.Drawing.Point(267, 28) + Me.btnPrio_Export.Name = "btnPrio_Export" + Me.btnPrio_Export.Size = New System.Drawing.Size(69, 23) + Me.btnPrio_Export.TabIndex = 162 + Me.btnPrio_Export.Tag = "0" + Me.btnPrio_Export.Text = "Ausfuhr" + Me.btnPrio_Export.UseVisualStyleBackColor = False + ' + 'btnPrio_ftz + ' + Me.btnPrio_ftz.BackColor = System.Drawing.Color.White + Me.btnPrio_ftz.Location = New System.Drawing.Point(339, 28) + Me.btnPrio_ftz.Name = "btnPrio_ftz" + Me.btnPrio_ftz.Size = New System.Drawing.Size(69, 23) + Me.btnPrio_ftz.TabIndex = 163 + Me.btnPrio_ftz.Tag = "0" + Me.btnPrio_ftz.Text = "FTZ" + Me.btnPrio_ftz.UseVisualStyleBackColor = False + ' + 'Panel1 + ' + Me.Panel1.BackColor = System.Drawing.SystemColors.InactiveBorder + Me.Panel1.Controls.Add(Me.btnPrio_CommInv) + Me.Panel1.Controls.Add(Me.btnAgg_Tnr) + Me.Panel1.Controls.Add(Me.btnPrio_ftz) + Me.Panel1.Controls.Add(Me.Label2) + Me.Panel1.Controls.Add(Me.btnPrio_Export) + Me.Panel1.Controls.Add(Me.btnAgg_Origin) + Me.Panel1.Controls.Add(Me.btnPrio_eFatura) + Me.Panel1.Controls.Add(Me.btnAgg_Unit) + Me.Panel1.Controls.Add(Me.Label5) + Me.Panel1.Controls.Add(Me.btnAgg_desc) + Me.Panel1.Location = New System.Drawing.Point(0, 343) + Me.Panel1.Name = "Panel1" + Me.Panel1.Size = New System.Drawing.Size(470, 54) + Me.Panel1.TabIndex = 164 + ' 'frmATEZ_EZA ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ClientSize = New System.Drawing.Size(680, 413) - Me.Controls.Add(Me.Button2) - Me.Controls.Add(Me.btnAgg_desc) - Me.Controls.Add(Me.btnAgg_Tnr) - Me.Controls.Add(Me.btnAgg_Unit) - Me.Controls.Add(Me.btnAgg_Origin) - Me.Controls.Add(Me.Label2) - Me.Controls.Add(Me.Button1) + Me.ClientSize = New System.Drawing.Size(680, 409) Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.lblAnh) Me.Controls.Add(Me.pnlHead) Me.Controls.Add(Me.Label6) Me.Controls.Add(Me.btnSend) Me.Controls.Add(Me.dgvAnhaenge) + Me.Controls.Add(Me.Panel1) Me.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "frmATEZ_EZA" @@ -394,6 +468,7 @@ Partial Class frmATEZ_EZA Me.pnlHead.ResumeLayout(False) Me.pnlHead.PerformLayout() CType(Me.dgvAnhaenge, System.ComponentModel.ISupportInitialize).EndInit() + Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub @@ -423,4 +498,10 @@ Partial Class frmATEZ_EZA Friend WithEvents btnAgg_desc As Button Friend WithEvents Label4 As Label Friend WithEvents Button2 As Button + Friend WithEvents btnPrio_CommInv As Button + Friend WithEvents Label5 As Label + Friend WithEvents btnPrio_eFatura As Button + Friend WithEvents btnPrio_Export As Button + Friend WithEvents btnPrio_ftz As Button + Friend WithEvents Panel1 As Panel End Class diff --git a/Aviso/ATEZ/frmATEZ_EZA.vb b/Aviso/ATEZ/frmATEZ_EZA.vb index 037135d..538b8c0 100644 --- a/Aviso/ATEZ/frmATEZ_EZA.vb +++ b/Aviso/ATEZ/frmATEZ_EZA.vb @@ -146,6 +146,14 @@ Public Class frmATEZ_EZA If btnAgg_Unit.Tag = 1 Then AdditionalSettings.Add("unit_type") + Dim combineItemsPriorityDocumentType As String = "" + If btnPrio_CommInv.Tag = 1 Then combineItemsPriorityDocumentType = "commercial_invoice" + If btnPrio_eFatura.Tag = 1 Then combineItemsPriorityDocumentType = "invoice" + If btnPrio_Export.Tag = 1 Then combineItemsPriorityDocumentType = "tr_export_declaration" + If btnPrio_ftz.Tag = 1 Then combineItemsPriorityDocumentType = "ftz" + 'If btnPrio_CommInv.Tag = 1 Then combineItemsPriorityDocumentType = "packing_list" + + Dim ATEZ_RH_EZA As New VERAG_PROG_ALLGEMEIN.cRelayHub.cRelayHubJobOrderRequest With { .referenceNo = ioReference, .outputApplication = "dakosy/sftp/verg",'.outputApplication = "dakosy/sftp/vera", @@ -183,7 +191,8 @@ Public Class frmATEZ_EZA } }, .additionalSettings = New cRelayHubAdditionalSettings With { - .combineOptions = AdditionalSettings + .combineOptions = AdditionalSettings, + .combineItemsPriorityDocumentType = combineItemsPriorityDocumentType } } @@ -801,6 +810,22 @@ Public Class frmATEZ_EZA End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btnAgg_Tnr.Click, btnAgg_desc.Click, btnAgg_Origin.Click, btnAgg_Unit.Click + If sender.Tag = 0 Then + sender.Tag = 1 + sender.BackColor = Color.DeepSkyBlue + Else + sender.Tag = 0 + sender.BackColor = SystemColors.Control + End If + End Sub + Private Sub Buttonprio_Click(sender As Object, e As EventArgs) Handles btnPrio_CommInv.Click, btnPrio_ftz.Click, btnPrio_eFatura.Click, btnPrio_Export.Click + + If sender Is Not btnPrio_CommInv.Tag Then btnPrio_CommInv.Tag = 0 : btnPrio_CommInv.BackColor = SystemColors.Control + If sender Is Not btnPrio_eFatura.Tag Then btnPrio_eFatura.Tag = 0 : btnPrio_eFatura.BackColor = SystemColors.Control + If sender Is Not btnPrio_Export.Tag Then btnPrio_Export.Tag = 0 : btnPrio_Export.BackColor = SystemColors.Control + If sender Is Not btnPrio_ftz.Tag Then btnPrio_ftz.Tag = 0 : btnPrio_ftz.BackColor = SystemColors.Control + + If sender.Tag = 0 Then sender.Tag = 1 sender.BackColor = Color.DeepSkyBlue diff --git a/Aviso/frmHauptfenster.vb b/Aviso/frmHauptfenster.vb index afd2e64..5f55b30 100644 --- a/Aviso/frmHauptfenster.vb +++ b/Aviso/frmHauptfenster.vb @@ -207,12 +207,12 @@ Public Class frmHauptfenster If message.StartsWith("OpenKd_") Then Invoke(Sub() - Dim split = message.ToString.split("_") + Dim split = message.ToString.Split("_") FUNC.showKd(split(1), True) End Sub) ElseIf message.StartsWith("OpenAvisoSnd_") Then Invoke(Sub() - Dim split = message.ToString.split("_") + Dim split = message.ToString.Split("_") If split.Count > 1 AndAlso IsNumeric(split(1)) AndAlso split(1) > 0 Then Dim frmSendungsdetails As New frmSendungsdetailsNEU(split(1), -1) frmSendungsdetails.ShowDialog(Me) @@ -221,7 +221,7 @@ Public Class frmHauptfenster ElseIf message.StartsWith("OpenAviso_") Then Invoke(Sub() - Dim split = message.ToString.split("_") + Dim split = message.ToString.Split("_") If split.Count > 1 AndAlso IsNumeric(split(1)) AndAlso split(1) > 0 Then If IsNumeric(split(1)) AndAlso split(1) > 0 Then @@ -1513,7 +1513,14 @@ ELSE_ATILLA: sqlStrFirma &= " AND ( FIRMA='" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "' OR CLUSTER='" & VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER & "' OR FIRMA='ATILLA' ) " Else sqlStrFirma &= " AND ( FIRMA='" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "' OR CLUSTER='" & VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER & "' ) " + ' MsgBox(VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA) + 'If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERAG" Then + ' '+AMBAR + ' sqlStrFirma &= " AND ( FIRMA='" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "' OR (tblSendungen.FilialenNr IN('5701') AND tblSnd_Abfertigungsart_ID IN(1,38,39,46,66)) ) " + 'Else + ' sqlStrFirma &= " AND ( FIRMA='" & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA & "' ) " + 'End If End If Else @@ -2305,7 +2312,7 @@ ELSE_ATILLA: Dim t As String = txtSuche.Text ' t = t.Replace("/V003/", "") t = t.Replace("/", "") - Dim v() = t.split("-") + Dim v() = t.Split("-") 'Dim o As New cOptionenDAL If v.Length > 1 Then diff --git a/Aviso/usrcntlAktDetails.vb b/Aviso/usrcntlAktDetails.vb index 6ca7b21..e70d3a1 100644 --- a/Aviso/usrcntlAktDetails.vb +++ b/Aviso/usrcntlAktDetails.vb @@ -1236,6 +1236,11 @@ Public Class usrcntlAktDetails End If Case Else If paarId > 0 Then + Select Case vermerkCode + Case 101, 25 'Sonderfall -> BEzeichnung sollte übernommen werden + paarBez = gridVermerke.Rows(RowIndex).Cells("Hinweis_Vermerk").value.ToString.Replace("angefordert", "erhalten").ToString.Replace("offen", "erledigt") + End Select + myVermerk.Hinweis_Vermerk = paarBez myVermerk.VermerkCodeId = paarId Dim IdTmp = VermerkeDAL.SpeichernVermerk(myVermerk) @@ -1260,7 +1265,6 @@ Public Class usrcntlAktDetails End Select End If End Select - End If End Sub @@ -1354,11 +1358,11 @@ Public Class usrcntlAktDetails End If End If - Case 101, 25 - If paarId > 0 AndAlso r.Cells("VermerkIDAufgehoben").Value Is DBNull.Value Then - optionCell.Value = paarBez - optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk '" & paarBez & "' einzutragen." - End If + 'Case 101, 25 + ' If paarId > 0 AndAlso r.Cells("VermerkIDAufgehoben").Value Is DBNull.Value Then + ' optionCell.Value = paarBez + ' optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk '" & paarBez & "' einzutragen." + ' End If Case Else If paarId > 0 Then If Not existCodeInGridVermerke(r, gridvermerke, paarId, CStr(r.Cells("Hinweis_Vermerk").Value)) Then @@ -1417,7 +1421,7 @@ Public Class usrcntlAktDetails Select Case code Case 59 Return True - Case 2, 4, 6, 8, 10, 12, 30, 37, 34 + Case 2, 4, 6, 8, 10, 12, 30, 37, 34, 102 If text = "" Or DirectCast(r.Cells("Hinweis_Vermerk"), DataGridViewTextBoxCell).Value.ToString.Replace("erhalten", "angefordert") = text Then Return True End If