From f26b09f8d758832f8fcb6bcf1e4da4c4b09ada46 Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Thu, 13 Jun 2024 10:55:57 +0200 Subject: [PATCH] SpedBuch AMBAR --- .../usrCntlSpeditionsBuchSuche.Designer.vb | 61 ++++++++++++++----- .../usrCntlSpeditionsBuchSuche.vb | 51 ++++++++++++++-- 2 files changed, 93 insertions(+), 19 deletions(-) diff --git a/SDL/Speditionsbuch/usrCntlSpeditionsBuchSuche.Designer.vb b/SDL/Speditionsbuch/usrCntlSpeditionsBuchSuche.Designer.vb index b5988a5a..b8b49cde 100644 --- a/SDL/Speditionsbuch/usrCntlSpeditionsBuchSuche.Designer.vb +++ b/SDL/Speditionsbuch/usrCntlSpeditionsBuchSuche.Designer.vb @@ -198,6 +198,8 @@ Partial Class usrCntlSpeditionsBuchSuche Me.Label45 = New System.Windows.Forms.Label() Me.cboFilialeHandling = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.SplitContainer = New System.Windows.Forms.SplitContainer() + Me.Button25 = New System.Windows.Forms.Button() + Me.MyComboBox2 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cntxtCntxtSpeditionsbuch.SuspendLayout() Me.pnlRechts.SuspendLayout() CType(Me.DataGridView, System.ComponentModel.ISupportInitialize).BeginInit() @@ -686,7 +688,7 @@ Partial Class usrCntlSpeditionsBuchSuche DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] Me.DataGridView.RowHeadersDefaultCellStyle = DataGridViewCellStyle3 - Me.DataGridView.Size = New System.Drawing.Size(770, 227) + Me.DataGridView.Size = New System.Drawing.Size(770, 200) Me.DataGridView.TabIndex = 0 ' 'pnlAnzeige @@ -741,7 +743,7 @@ Partial Class usrCntlSpeditionsBuchSuche DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] Me.dgvLKW.RowHeadersDefaultCellStyle = DataGridViewCellStyle6 - Me.dgvLKW.Size = New System.Drawing.Size(450, 227) + Me.dgvLKW.Size = New System.Drawing.Size(450, 200) Me.dgvLKW.TabIndex = 35 Me.dgvLKW.Visible = False ' @@ -756,13 +758,15 @@ Partial Class usrCntlSpeditionsBuchSuche Me.pnlOpt.Controls.Add(Me.txtMaxSrch) Me.pnlOpt.Controls.Add(Me.lblErgebnis) Me.pnlOpt.Dock = System.Windows.Forms.DockStyle.Bottom - Me.pnlOpt.Location = New System.Drawing.Point(0, 227) + Me.pnlOpt.Location = New System.Drawing.Point(0, 200) Me.pnlOpt.Name = "pnlOpt" - Me.pnlOpt.Size = New System.Drawing.Size(1220, 163) + Me.pnlOpt.Size = New System.Drawing.Size(1220, 190) Me.pnlOpt.TabIndex = 1 ' 'pnlBerichte ' + Me.pnlBerichte.Controls.Add(Me.MyComboBox2) + Me.pnlBerichte.Controls.Add(Me.Button25) Me.pnlBerichte.Controls.Add(Me.Button24) Me.pnlBerichte.Controls.Add(Me.Button23) Me.pnlBerichte.Controls.Add(Me.Button22) @@ -796,7 +800,7 @@ Partial Class usrCntlSpeditionsBuchSuche Me.pnlBerichte.Dock = System.Windows.Forms.DockStyle.Left Me.pnlBerichte.Location = New System.Drawing.Point(197, 0) Me.pnlBerichte.Name = "pnlBerichte" - Me.pnlBerichte.Size = New System.Drawing.Size(886, 161) + Me.pnlBerichte.Size = New System.Drawing.Size(886, 188) Me.pnlBerichte.TabIndex = 6 Me.pnlBerichte.Visible = False ' @@ -806,7 +810,7 @@ Partial Class usrCntlSpeditionsBuchSuche Me.Button24.BackgroundImage = Global.SDL.My.Resources.Resources.Excel_logo Me.Button24.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center Me.Button24.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button24.Location = New System.Drawing.Point(715, 14) + Me.Button24.Location = New System.Drawing.Point(714, 7) Me.Button24.Name = "Button24" Me.Button24.Size = New System.Drawing.Size(41, 34) Me.Button24.TabIndex = 43 @@ -882,7 +886,7 @@ Partial Class usrCntlSpeditionsBuchSuche Me.MenuStrip1.Dock = System.Windows.Forms.DockStyle.None Me.MenuStrip1.ImageScalingSize = New System.Drawing.Size(24, 24) Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.KundenauswertungenToolStripMenuItem1}) - Me.MenuStrip1.Location = New System.Drawing.Point(601, 128) + Me.MenuStrip1.Location = New System.Drawing.Point(715, 158) Me.MenuStrip1.Name = "MenuStrip1" Me.MenuStrip1.Size = New System.Drawing.Size(163, 27) Me.MenuStrip1.TabIndex = 89 @@ -902,7 +906,7 @@ Partial Class usrCntlSpeditionsBuchSuche ' Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Image = CType(resources.GetObject("ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Image"), System.Drawing.Image) Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Name = "ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem" - Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Size = New System.Drawing.Size(308, 24) + Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Size = New System.Drawing.Size(316, 30) Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Text = "ZF Passau (Zeitraum auswählen)" Me.ZFFriedrichshafenAGZeitraumAuswählenToolStripMenuItem.Visible = False ' @@ -928,7 +932,7 @@ Partial Class usrCntlSpeditionsBuchSuche Me.cboHandlingssatz._value = "" Me.cboHandlingssatz.DropDownWidth = 300 Me.cboHandlingssatz.FormattingEnabled = True - Me.cboHandlingssatz.Location = New System.Drawing.Point(399, 137) + Me.cboHandlingssatz.Location = New System.Drawing.Point(399, 160) Me.cboHandlingssatz.Name = "cboHandlingssatz" Me.cboHandlingssatz.Size = New System.Drawing.Size(159, 21) Me.cboHandlingssatz.TabIndex = 60 @@ -938,7 +942,7 @@ Partial Class usrCntlSpeditionsBuchSuche Me.Button20.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button20.Image = Global.SDL.My.Resources.Resources.statistik_small Me.Button20.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.Button20.Location = New System.Drawing.Point(399, 109) + Me.Button20.Location = New System.Drawing.Point(399, 132) Me.Button20.Margin = New System.Windows.Forms.Padding(0) Me.Button20.Name = "Button20" Me.Button20.Size = New System.Drawing.Size(159, 28) @@ -952,7 +956,7 @@ Partial Class usrCntlSpeditionsBuchSuche Me.Label46.AutoSize = True Me.Label46.BackColor = System.Drawing.Color.WhiteSmoke Me.Label46.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.Label46.Location = New System.Drawing.Point(396, 96) + Me.Label46.Location = New System.Drawing.Point(396, 119) Me.Label46.Name = "Label46" Me.Label46.Size = New System.Drawing.Size(61, 13) Me.Label46.TabIndex = 58 @@ -1339,7 +1343,7 @@ Partial Class usrCntlSpeditionsBuchSuche Me.pnl.Dock = System.Windows.Forms.DockStyle.Left Me.pnl.Location = New System.Drawing.Point(0, 0) Me.pnl.Name = "pnl" - Me.pnl.Size = New System.Drawing.Size(197, 161) + Me.pnl.Size = New System.Drawing.Size(197, 188) Me.pnl.TabIndex = 5 ' 'Button15 @@ -1387,7 +1391,7 @@ Partial Class usrCntlSpeditionsBuchSuche Me.btnExcel.BackgroundImage = Global.SDL.My.Resources.Resources.Excel_logo Me.btnExcel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center Me.btnExcel.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.btnExcel.Location = New System.Drawing.Point(1089, 124) + Me.btnExcel.Location = New System.Drawing.Point(1089, 151) Me.btnExcel.Name = "btnExcel" Me.btnExcel.Size = New System.Drawing.Size(41, 34) Me.btnExcel.TabIndex = 3 @@ -1402,7 +1406,7 @@ Partial Class usrCntlSpeditionsBuchSuche Me.FlatButton7.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.FlatButton7.ForeColor = System.Drawing.Color.Black Me.FlatButton7.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.FlatButton7.Location = New System.Drawing.Point(1136, 124) + Me.FlatButton7.Location = New System.Drawing.Point(1136, 151) Me.FlatButton7.Name = "FlatButton7" Me.FlatButton7.Size = New System.Drawing.Size(41, 34) Me.FlatButton7.TabIndex = 4 @@ -2773,6 +2777,33 @@ Partial Class usrCntlSpeditionsBuchSuche Me.SplitContainer.SplitterWidth = 2 Me.SplitContainer.TabIndex = 3 ' + 'Button25 + ' + Me.Button25.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button25.Image = Global.SDL.My.Resources.Resources.statistik_small + Me.Button25.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Button25.Location = New System.Drawing.Point(561, 132) + Me.Button25.Margin = New System.Windows.Forms.Padding(0) + Me.Button25.Name = "Button25" + Me.Button25.Size = New System.Drawing.Size(128, 28) + Me.Button25.TabIndex = 94 + Me.Button25.Text = "Handling (AMBAR)" + Me.Button25.TextAlign = System.Drawing.ContentAlignment.MiddleRight + Me.Button25.UseVisualStyleBackColor = True + ' + 'MyComboBox2 + ' + Me.MyComboBox2._allowedValuesFreiText = Nothing + Me.MyComboBox2._allowFreiText = False + Me.MyComboBox2._value = "" + Me.MyComboBox2.DropDownWidth = 250 + Me.MyComboBox2.Font = New System.Drawing.Font("Microsoft Tai Le", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.MyComboBox2.FormattingEnabled = True + Me.MyComboBox2.Location = New System.Drawing.Point(561, 160) + Me.MyComboBox2.Name = "MyComboBox2" + Me.MyComboBox2.Size = New System.Drawing.Size(128, 22) + Me.MyComboBox2.TabIndex = 53 + ' 'usrCntlSpeditionsBuchSuche ' Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None @@ -2985,4 +3016,6 @@ Partial Class usrCntlSpeditionsBuchSuche Friend WithEvents txtVermerk As VERAG_PROG_ALLGEMEIN.MyTextBox Friend WithEvents Label48 As Label Friend WithEvents Button24 As Button + Friend WithEvents Button25 As Button + Friend WithEvents MyComboBox2 As VERAG_PROG_ALLGEMEIN.MyComboBox End Class diff --git a/SDL/Speditionsbuch/usrCntlSpeditionsBuchSuche.vb b/SDL/Speditionsbuch/usrCntlSpeditionsBuchSuche.vb index 4c86e554..5f834c23 100644 --- a/SDL/Speditionsbuch/usrCntlSpeditionsBuchSuche.vb +++ b/SDL/Speditionsbuch/usrCntlSpeditionsBuchSuche.vb @@ -196,7 +196,7 @@ Public Class usrCntlSpeditionsBuchSuche End With End Sub - Function getSpedBuchWhere() As String + Function getSpedBuchWhere(Optional ignoreFiliale = False) As String Dim sqlstr = "" If txtAvisiererKdNr.Text <> "" And IsNumeric(txtAvisiererKdNr.Text) Then : sqlstr &= " AND Speditionsbuch.[AvisiererKundenNr] LIKE @AvisiererKundenNr " ElseIf kdtxtAvisierer.Text <> "" Then : sqlstr &= " AND Speditionsbuch.[Avisierer] LIKE @Avisierer " : End If @@ -239,7 +239,9 @@ Public Class usrCntlSpeditionsBuchSuche End If End If If txtUnterNr.Text <> "" Then sqlstr &= " AND Speditionsbuch.[UnterNr] LIKE @UnterNr " - If cboFiliale._value <> "" Then sqlstr &= " AND Speditionsbuch.[FilialenNr] LIKE @FilialenNr " + If Not ignoreFiliale Then + If cboFiliale._value <> "" Then sqlstr &= " AND Speditionsbuch.[FilialenNr] LIKE @FilialenNr " + End If ' If cboFilialeHandling._value <> "" Then sqlstr &= " AND FilialenNrHandling IS NOT NULL AND [FilialenNrHandling] LIKE @FilialeHandling " @@ -477,6 +479,15 @@ Public Class usrCntlSpeditionsBuchSuche MyComboBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("FRONTOFFICE", "FRONTOFFICE")) + + + MyComboBox2.Items.Clear() + MyComboBox2.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", "")) + MyComboBox2.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG", "VERAG")) + MyComboBox2.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("IMEX", "IMEX")) + MyComboBox2.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("UNISPED", "UNISPED")) + + cboFilialeHandling.Items.Clear() cboFilialeHandling.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", "")) cboFilialeHandling.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("ALLE", "ALLE")) @@ -1567,7 +1578,7 @@ Public Class usrCntlSpeditionsBuchSuche End Sub - Function getrHandlingAussenstellen(Optional showDok As Boolean = True, Optional Handlingssatz As String = "") 'Firma As String, kdnrTmp As Integer, Optional showDok As Boolean = False, Optional ByRef VBNr As Integer = -1) As String + Function getrHandlingAussenstellen(Optional showDok As Boolean = True, Optional Handlingssatz As String = "", Optional whereOpt As String = "", Optional ignoreFiliale As Boolean = False) 'Firma As String, kdnrTmp As Integer, Optional showDok As Boolean = False, Optional ByRef VBNr As Integer = -1) As String Dim displayFilter = cbxFilterInBericht.Checked If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ZOLL_Auswertungen", "SDL") Then Dim sqlstr As String = "" @@ -1582,10 +1593,11 @@ Public Class usrCntlSpeditionsBuchSuche sqlstr &= " SELECT Speditionsbuch.*,Abfertigungsbezeichnung" sqlstr &= " FROM Speditionsbuch LEFT JOIN Abfertigungsarten ON Speditionsbuch.Abfertigungsart=Abfertigungsarten.Abfertigungsart " sqlstr &= " WHERE 1=1 " - sqlstr &= getSpedBuchWhere() + sqlstr &= getSpedBuchWhere(ignoreFiliale) + sqlstr &= whereOpt ' sqlstr &= " order by FilialenNr, AvisoId,Speditionsbuch.Abfertigungsart,Abfertigungsdatum" sqlstr &= " order by Speditionsbuch.Abfertigungsart,FilialenNr,Abfertigungsdatum" - + ' MsgBox(sqlstr) Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL", , getSpedbuchList()) Dim print As New frmPrintLayout @@ -1596,6 +1608,8 @@ Public Class usrCntlSpeditionsBuchSuche Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA Case "IMEX" : rpt.picVERAG.Image = My.Resources.IMEX_LOGO_simple : rpt.Label28.Text = "IMEX Customs Service GmbH" Case "ATILLA" : rpt.picVERAG.Image = My.Resources.Atilla : rpt.Label28.Text = "ATILLA Spedition" + Case "AMBAR" : rpt.picVERAG.Image = My.Resources.ambar_simple : rpt.Label28.Text = "AMBAR Logistc Services GmbH" : print.Text = "Handling / AMBAR Bad Reichenhall" + Case Else End Select @@ -1692,6 +1706,11 @@ Public Class usrCntlSpeditionsBuchSuche sumAbfBez = checkNull(rpt.Fields.Item("Abfertigungsbezeichnung").Value) + Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA + Case "AMBAR" + rpt.lblBarzahlungsbetrag.Visible = False + rpt.lblzuKassierenHandling.Visible = False + End Select sumAnz += anz sumBar += bar @@ -1714,6 +1733,12 @@ Public Class usrCntlSpeditionsBuchSuche rpt.txtUebersicht.Text = SumText + Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA + Case "AMBAR" + rpt.lblSumBarzahlungsbetrag.Visible = False + rpt.lblSumzuKassierenHandling.Visible = False + End Select + End Sub AddHandler rpt.GroupHeader1.Format, Sub() @@ -1733,6 +1758,11 @@ Public Class usrCntlSpeditionsBuchSuche rpt.lblGesHandlingsgebuehr.Text = geshandling.ToString("N2") SumText &= gesAnz.ToString("N0") & vbTab & bezeichnung & vbNewLine + Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA + Case "AMBAR" + rpt.lblGesBarzahlungsbetrag.Visible = False + rpt.lblGeszuKassierenHandling.Visible = False + End Select End Sub If showDok Then print.Viewer.LoadDocument(rpt) @@ -2496,5 +2526,16 @@ Public Class usrCntlSpeditionsBuchSuche End Function + Private Sub Button25_Click(sender As Object, e As EventArgs) Handles Button25.Click + Dim where = "" + Select Case MyComboBox2._value + Case "VERAG" : where = " AND FilialenNr IN (SELECT Filialen.FilialenNr FROM Filialen WHERE Filialen.Firma='VERAG' AND Filialen.FilialenNr NOT IN (4801,4802)) " + Case "IMEX" : where = " AND FilialenNr IN (5501) " + Case "UNISPED" : where = " AND FilialenNr IN (5601) " + 'Case "ATILLA" : where = " AND FilialenNr IN (SELECT Filialen.FilialenNr FROM Filialen WHERE Filialen.Firma='VERAG' AND Filialen.FilialenNr NOT IN (5601)) " + End Select + where &= " and Grenzstelle='AMB' " + getrHandlingAussenstellen(, "AMBAR an ALL", where, True) + End Sub End Class