MDM -> IDS, etc.

This commit is contained in:
2026-05-12 17:31:19 +02:00
parent 71bb4278eb
commit afdc1c3822
6 changed files with 547 additions and 496 deletions

View File

@@ -1,6 +1,5 @@
Imports System.IO
Imports Microsoft.Office.Interop
Imports VERAG_PROG_ALLGEMEIN
Public Class frmAbrechnungsMaske
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

View File

@@ -23,12 +23,12 @@ Partial Class usrCntlSpeditionsBuchSuche
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(usrCntlSpeditionsBuchSuche))
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.cntxtCntxtSpeditionsbuch = New System.Windows.Forms.ContextMenuStrip(Me.components)
@@ -85,10 +85,11 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.Button21 = New System.Windows.Forms.Button()
Me.btnSpedBuchEinnahmen = New System.Windows.Forms.Button()
Me.pnlBerichte = New System.Windows.Forms.Panel()
Me.cbxHandlingAbrechnen = New System.Windows.Forms.CheckBox()
Me.CheckBox4 = New System.Windows.Forms.CheckBox()
Me.cbxDetailbericht = New System.Windows.Forms.CheckBox()
Me.MyComboBox2 = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Button25 = New System.Windows.Forms.Button()
Me.cboHandlingssatz_AMBAR = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.btnHandling_AMBAR = New System.Windows.Forms.Button()
Me.Button24 = New System.Windows.Forms.Button()
Me.Button23 = New System.Windows.Forms.Button()
Me.lblKdAusFortschritt = New System.Windows.Forms.Label()
@@ -100,7 +101,7 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.ZFSteyrZeitraumAuswählenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ZFThyrnauZeitraumAuswählenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.AuswertungDiversZeitraumAuswählenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Button20 = New System.Windows.Forms.Button()
Me.btnHandling = New System.Windows.Forms.Button()
Me.Button19 = New System.Windows.Forms.Button()
Me.Button18 = New System.Windows.Forms.Button()
Me.Button16 = New System.Windows.Forms.Button()
@@ -213,7 +214,7 @@ 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.cbxHandlingAbrechnen = New System.Windows.Forms.CheckBox()
Me.FlowLayoutPanel1 = New System.Windows.Forms.FlowLayoutPanel()
Me.cntxtCntxtSpeditionsbuch.SuspendLayout()
Me.pnlRechts.SuspendLayout()
CType(Me.DataGridView, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -238,6 +239,7 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.SplitContainer.Panel1.SuspendLayout()
Me.SplitContainer.Panel2.SuspendLayout()
Me.SplitContainer.SuspendLayout()
Me.FlowLayoutPanel1.SuspendLayout()
Me.SuspendLayout()
'
'TabPage1
@@ -681,35 +683,35 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.DataGridView.AllowUserToDeleteRows = False
Me.DataGridView.AllowUserToOrderColumns = True
Me.DataGridView.AllowUserToResizeRows = False
DataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.DataGridView.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle7
DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.DataGridView.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1
Me.DataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.DataGridView.ContextMenuStrip = Me.cntxtCntxtSpeditionsbuch
DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.DataGridView.DefaultCellStyle = DataGridViewCellStyle8
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.DataGridView.DefaultCellStyle = DataGridViewCellStyle2
Me.DataGridView.Dock = System.Windows.Forms.DockStyle.Fill
Me.DataGridView.Location = New System.Drawing.Point(450, 0)
Me.DataGridView.Name = "DataGridView"
DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.DataGridView.RowHeadersDefaultCellStyle = DataGridViewCellStyle9
DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.DataGridView.RowHeadersDefaultCellStyle = DataGridViewCellStyle3
Me.DataGridView.Size = New System.Drawing.Size(789, 262)
Me.DataGridView.TabIndex = 0
'
@@ -736,35 +738,35 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.dgvLKW.AllowUserToOrderColumns = True
Me.dgvLKW.AllowUserToResizeRows = False
Me.dgvLKW.BackgroundColor = System.Drawing.Color.WhiteSmoke
DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvLKW.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1
DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvLKW.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4
Me.dgvLKW.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvLKW.ContextMenuStrip = Me.cntxtCntxtSpeditionsbuch
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvLKW.DefaultCellStyle = DataGridViewCellStyle2
DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvLKW.DefaultCellStyle = DataGridViewCellStyle5
Me.dgvLKW.Dock = System.Windows.Forms.DockStyle.Left
Me.dgvLKW.Location = New System.Drawing.Point(0, 0)
Me.dgvLKW.Name = "dgvLKW"
DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvLKW.RowHeadersDefaultCellStyle = DataGridViewCellStyle3
DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight
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, 262)
Me.dgvLKW.TabIndex = 35
Me.dgvLKW.Visible = False
@@ -1069,17 +1071,14 @@ Partial Class usrCntlSpeditionsBuchSuche
'
Me.pnlBerichte.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.pnlBerichte.Controls.Add(Me.FlowLayoutPanel1)
Me.pnlBerichte.Controls.Add(Me.cbxHandlingAbrechnen)
Me.pnlBerichte.Controls.Add(Me.CheckBox4)
Me.pnlBerichte.Controls.Add(Me.cbxDetailbericht)
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.lblKdAusFortschritt)
Me.pnlBerichte.Controls.Add(Me.cboHandlingssatz)
Me.pnlBerichte.Controls.Add(Me.MenuStrip1)
Me.pnlBerichte.Controls.Add(Me.Button20)
Me.pnlBerichte.Controls.Add(Me.Button19)
Me.pnlBerichte.Controls.Add(Me.Button18)
Me.pnlBerichte.Controls.Add(Me.Button16)
@@ -1099,6 +1098,18 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.pnlBerichte.TabIndex = 6
Me.pnlBerichte.Visible = False
'
'cbxHandlingAbrechnen
'
Me.cbxHandlingAbrechnen.AutoSize = True
Me.cbxHandlingAbrechnen.BackColor = System.Drawing.Color.WhiteSmoke
Me.cbxHandlingAbrechnen.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cbxHandlingAbrechnen.Location = New System.Drawing.Point(4, 107)
Me.cbxHandlingAbrechnen.Name = "cbxHandlingAbrechnen"
Me.cbxHandlingAbrechnen.Size = New System.Drawing.Size(140, 17)
Me.cbxHandlingAbrechnen.TabIndex = 96
Me.cbxHandlingAbrechnen.Text = "Handling abrechnen"
Me.cbxHandlingAbrechnen.UseVisualStyleBackColor = False
'
'CheckBox4
'
Me.CheckBox4.AutoSize = True
@@ -1121,32 +1132,32 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.cbxDetailbericht.Text = "Detailbericht"
Me.cbxDetailbericht.UseVisualStyleBackColor = False
'
'MyComboBox2
'cboHandlingssatz_AMBAR
'
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(169, 162)
Me.MyComboBox2.Name = "MyComboBox2"
Me.MyComboBox2.Size = New System.Drawing.Size(128, 22)
Me.MyComboBox2.TabIndex = 53
Me.cboHandlingssatz_AMBAR._allowedValuesFreiText = Nothing
Me.cboHandlingssatz_AMBAR._allowFreiText = False
Me.cboHandlingssatz_AMBAR._value = ""
Me.cboHandlingssatz_AMBAR.DropDownWidth = 250
Me.cboHandlingssatz_AMBAR.Font = New System.Drawing.Font("Microsoft Tai Le", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cboHandlingssatz_AMBAR.FormattingEnabled = True
Me.cboHandlingssatz_AMBAR.Location = New System.Drawing.Point(3, 59)
Me.cboHandlingssatz_AMBAR.Name = "cboHandlingssatz_AMBAR"
Me.cboHandlingssatz_AMBAR.Size = New System.Drawing.Size(128, 22)
Me.cboHandlingssatz_AMBAR.TabIndex = 53
'
'Button25
'btnHandling_AMBAR
'
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(169, 134)
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
Me.btnHandling_AMBAR.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnHandling_AMBAR.Image = Global.SDL.My.Resources.Resources.statistik_small
Me.btnHandling_AMBAR.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnHandling_AMBAR.Location = New System.Drawing.Point(165, 28)
Me.btnHandling_AMBAR.Margin = New System.Windows.Forms.Padding(0)
Me.btnHandling_AMBAR.Name = "btnHandling_AMBAR"
Me.btnHandling_AMBAR.Size = New System.Drawing.Size(128, 28)
Me.btnHandling_AMBAR.TabIndex = 94
Me.btnHandling_AMBAR.Text = "Handling (AMBAR)"
Me.btnHandling_AMBAR.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnHandling_AMBAR.UseVisualStyleBackColor = True
'
'Button24
'
@@ -1189,7 +1200,7 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.cboHandlingssatz._value = ""
Me.cboHandlingssatz.DropDownWidth = 300
Me.cboHandlingssatz.FormattingEnabled = True
Me.cboHandlingssatz.Location = New System.Drawing.Point(7, 162)
Me.cboHandlingssatz.Location = New System.Drawing.Point(3, 31)
Me.cboHandlingssatz.Name = "cboHandlingssatz"
Me.cboHandlingssatz.Size = New System.Drawing.Size(159, 21)
Me.cboHandlingssatz.TabIndex = 60
@@ -1253,19 +1264,19 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.AuswertungDiversZeitraumAuswählenToolStripMenuItem.Text = "Flender Bocholt (Zeitraum auswählen)"
Me.AuswertungDiversZeitraumAuswählenToolStripMenuItem.Visible = False
'
'Button20
'btnHandling
'
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(7, 134)
Me.Button20.Margin = New System.Windows.Forms.Padding(0)
Me.Button20.Name = "Button20"
Me.Button20.Size = New System.Drawing.Size(159, 28)
Me.Button20.TabIndex = 59
Me.Button20.Text = "Handling an Außenstellen"
Me.Button20.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button20.UseVisualStyleBackColor = True
Me.btnHandling.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnHandling.Image = Global.SDL.My.Resources.Resources.statistik_small
Me.btnHandling.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnHandling.Location = New System.Drawing.Point(0, 0)
Me.btnHandling.Margin = New System.Windows.Forms.Padding(0)
Me.btnHandling.Name = "btnHandling"
Me.btnHandling.Size = New System.Drawing.Size(159, 28)
Me.btnHandling.TabIndex = 59
Me.btnHandling.Text = "Handling an Außenstellen"
Me.btnHandling.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnHandling.UseVisualStyleBackColor = True
'
'Button19
'
@@ -2957,17 +2968,16 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.SplitContainer.SplitterWidth = 2
Me.SplitContainer.TabIndex = 3
'
'cbxHandlingAbrechnen
'FlowLayoutPanel1
'
Me.cbxHandlingAbrechnen.AutoSize = True
Me.cbxHandlingAbrechnen.BackColor = System.Drawing.Color.WhiteSmoke
Me.cbxHandlingAbrechnen.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cbxHandlingAbrechnen.Location = New System.Drawing.Point(7, 115)
Me.cbxHandlingAbrechnen.Name = "cbxHandlingAbrechnen"
Me.cbxHandlingAbrechnen.Size = New System.Drawing.Size(140, 17)
Me.cbxHandlingAbrechnen.TabIndex = 96
Me.cbxHandlingAbrechnen.Text = "Handling abrechnen"
Me.cbxHandlingAbrechnen.UseVisualStyleBackColor = False
Me.FlowLayoutPanel1.Controls.Add(Me.btnHandling)
Me.FlowLayoutPanel1.Controls.Add(Me.cboHandlingssatz)
Me.FlowLayoutPanel1.Controls.Add(Me.btnHandling_AMBAR)
Me.FlowLayoutPanel1.Controls.Add(Me.cboHandlingssatz_AMBAR)
Me.FlowLayoutPanel1.Location = New System.Drawing.Point(3, 123)
Me.FlowLayoutPanel1.Name = "FlowLayoutPanel1"
Me.FlowLayoutPanel1.Size = New System.Drawing.Size(319, 59)
Me.FlowLayoutPanel1.TabIndex = 97
'
'usrCntlSpeditionsBuchSuche
'
@@ -3014,6 +3024,7 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.SplitContainer.Panel2.ResumeLayout(False)
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer.ResumeLayout(False)
Me.FlowLayoutPanel1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
@@ -3160,7 +3171,7 @@ Partial Class usrCntlSpeditionsBuchSuche
Friend WithEvents Button19 As Button
Friend WithEvents cboFilialeHandling As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents Label45 As Label
Friend WithEvents Button20 As Button
Friend WithEvents btnHandling As Button
Friend WithEvents Panel2 As Panel
Friend WithEvents MyComboBox1 As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents lstFilialeHandling As VERAG_PROG_ALLGEMEIN.MyListBox
@@ -3183,8 +3194,8 @@ Partial Class usrCntlSpeditionsBuchSuche
Friend WithEvents txtVermerk As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents lblVermerke As Label
Friend WithEvents Button24 As Button
Friend WithEvents Button25 As Button
Friend WithEvents MyComboBox2 As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents btnHandling_AMBAR As Button
Friend WithEvents cboHandlingssatz_AMBAR As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents SendungsdetailsÖffnenToolStripMenuItem As ToolStripMenuItem
Friend WithEvents ZFSteyrZeitraumAuswählenToolStripMenuItem As ToolStripMenuItem
Friend WithEvents cbxRptDetailsZahlungsdetails As CheckBox
@@ -3201,4 +3212,5 @@ Partial Class usrCntlSpeditionsBuchSuche
Friend WithEvents cbxfehlZahlung_AVISOID As CheckBox
Friend WithEvents cbxfehlZahlung_SENDUNG As CheckBox
Friend WithEvents cbxHandlingAbrechnen As CheckBox
Friend WithEvents FlowLayoutPanel1 As FlowLayoutPanel
End Class

View File

@@ -296,7 +296,4 @@
AElFTkSuQmCC
</value>
</data>
<metadata name="MenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>546, 17</value>
</metadata>
</root>

View File

@@ -501,11 +501,11 @@ Public Class usrCntlSpeditionsBuchSuche
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"))
cboHandlingssatz_AMBAR.Items.Clear()
cboHandlingssatz_AMBAR.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cboHandlingssatz_AMBAR.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG", "VERAG"))
cboHandlingssatz_AMBAR.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("IMEX", "IMEX"))
cboHandlingssatz_AMBAR.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("UNISPED", "UNISPED"))
cboFilialeHandling.Items.Clear()
@@ -579,8 +579,12 @@ Public Class usrCntlSpeditionsBuchSuche
For Each p In pnlBerichte.Controls
p.Visible = False
Next
Button25.Visible = True
MyComboBox2.Visible = True
btnHandling_AMBAR.Visible = True
cboHandlingssatz_AMBAR.Visible = True
btnHandling.Visible = False
cboHandlingssatz.Visible = False
End If
@@ -1726,6 +1730,7 @@ Public Class usrCntlSpeditionsBuchSuche
dt_summen.Columns.Add("HANDLING", GetType(Double))
dt_summen.Columns.Add("zu_kassieren_BAR", GetType(Double))
dt_summen.Columns.Add("Grenzstelle", GetType(String))
dt_summen.Columns.Add("FilialNr", GetType(Integer))
@@ -1791,29 +1796,40 @@ Public Class usrCntlSpeditionsBuchSuche
If Not IsDBNull(rpt.Fields.Item("Grenzstelle").Value) Then
Dim grenzstelle As String = rpt.Fields.Item("Grenzstelle").Value.ToString()
Dim existingRow = dt_summen.AsEnumerable().FirstOrDefault(Function(r) r.Field(Of String)("Grenzstelle") = grenzstelle)
Dim filialNr As Integer = -1
If existingRow IsNot Nothing Then
If existingRow Is Nothing Then
existingRow("Anzahl") = CInt(existingRow("Anzahl")) + anz
existingRow("BAR") = CDbl(existingRow("BAR")) + bar
existingRow("HANDLING") = CDbl(existingRow("HANDLING")) + handling
existingRow("zu_kassieren_BAR") = CDbl(existingRow("zu_kassieren_BAR")) + zukassBAR
Else
Dim R As DataRow = dt_summen.NewRow()
R("Anzahl") = anz
R("BAR") = bar
R("HANDLING") = handling
R("zu_kassieren_BAR") = zukassBAR
R("Grenzstelle") = grenzstelle
dt_summen.Rows.Add(R)
Dim filialNrTemp = SQL.getValueTxtBySql("SELECT grz_filialNr from tblGrenzstelle where grz_BezeichnungCBO = '" & grenzstelle & "'", "AVISO")
If filialNrTemp <> "" AndAlso IsNumeric(filialNrTemp) Then
filialNr = CInt(filialNrTemp)
End If
End If
End If
If existingRow IsNot Nothing Then
sumAnz += anz
existingRow("Anzahl") = CInt(existingRow("Anzahl")) + anz
existingRow("BAR") = CDbl(existingRow("BAR")) + bar
existingRow("HANDLING") = CDbl(existingRow("HANDLING")) + handling
existingRow("zu_kassieren_BAR") = CDbl(existingRow("zu_kassieren_BAR")) + zukassBAR
Else
Dim R As DataRow = dt_summen.NewRow()
R("Anzahl") = anz
R("BAR") = bar
R("HANDLING") = handling
R("zu_kassieren_BAR") = zukassBAR
R("Grenzstelle") = grenzstelle
R("FilialNr") = filialNr
dt_summen.Rows.Add(R)
End If
End If
sumAnz += anz
sumBar += bar
sumhandling += handling
sumzukassBAR += zukassBAR
@@ -2141,7 +2157,7 @@ Public Class usrCntlSpeditionsBuchSuche
End Sub
Private Sub Button20_Click(sender As Object, e As EventArgs) Handles Button20.Click
Private Sub Button20_Click(sender As Object, e As EventArgs) Handles btnHandling.Click
If CDate(txtAbfertDat.Text).Year <> CDate(txtAbfertDatBis.Text).Year Then
MsgBox("keine jahresüberschneidende Handlingsauswertung möglich!")
Exit Sub
@@ -2150,14 +2166,15 @@ Public Class usrCntlSpeditionsBuchSuche
Dim HandlingList As VERAG_PROG_ALLGEMEIN.cHandlingssaetzeInternLIST = Nothing
Dim anhang = getrHandlingAussenstellen(CDate(txtAbfertDat.Text), dtAbrechnung, HandlingList, Not cbxHandlingAbrechnen.Checked, cboHandlingssatz.Text.Trim,,)
If anhang = "" Then Exit Sub
If cbxHandlingAbrechnen.Checked Then
If lstFiliale.SelectedItems.Count > 1 Then
MsgBox("Es darf nur eine Filiale ausgewählt werden!")
Exit Sub
End If
Select Case lstFiliale.SelectedItems.Count
Case 0 : MsgBox("Es muss mind. eine Filiale ausgewählt werden!") : Exit Sub
End Select
createHandlingAbrechnung(dtAbrechnung, cboHandlingssatz.Text.Trim, cboHandlingssatz._value, CInt(lstFiliale._value), CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text), anhang, HandlingList)
createHandlingAbrechnung(dtAbrechnung, cboHandlingssatz.Text.Trim, cboHandlingssatz._value, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text), anhang, HandlingList)
End If
End Sub
@@ -2871,7 +2888,7 @@ Public Class usrCntlSpeditionsBuchSuche
End Function
Private Sub Button25_Click(sender As Object, e As EventArgs) Handles Button25.Click
Private Sub Button25_Click(sender As Object, e As EventArgs) Handles btnHandling_AMBAR.Click
If CDate(txtAbfertDat.Text).Year <> CDate(txtAbfertDatBis.Text).Year Then
MsgBox("keine jahresüberschneidende Handlingsauswertung möglich!")
@@ -2879,7 +2896,7 @@ Public Class usrCntlSpeditionsBuchSuche
End If
Dim where = ""
Select Case MyComboBox2._value
Select Case cboHandlingssatz_AMBAR._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) "
@@ -2889,14 +2906,17 @@ Public Class usrCntlSpeditionsBuchSuche
Dim dtAbrechnung As New DataTable
Dim HandlingList As VERAG_PROG_ALLGEMEIN.cHandlingssaetzeInternLIST = Nothing
Dim anhang_path = getrHandlingAussenstellen(CDate(txtAbfertDat.Text), dtAbrechnung, HandlingList, Not cbxHandlingAbrechnen.Checked, "AMBAR an ALL", where, True)
If anhang_path = "" Then Exit Sub
If cbxHandlingAbrechnen.Checked Then
If lstFiliale.SelectedItems.Count > 1 Then
MsgBox("Es darf nur eine Filiale ausgewählt werden!")
Exit Sub
End If
Select Case lstFiliale.SelectedItems.Count
Case 0 : MsgBox("Es muss mind. eine Filiale ausgewählt werden!") : Exit Sub
createHandlingAbrechnung(dtAbrechnung, MyComboBox2._value, MyComboBox2._value, lstFiliale._value, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text), anhang_path, HandlingList)
End Select
createHandlingAbrechnung(dtAbrechnung, cboHandlingssatz_AMBAR._value, cboHandlingssatz_AMBAR._value, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text), anhang_path, HandlingList)
End If
End Sub
@@ -2922,7 +2942,7 @@ Public Class usrCntlSpeditionsBuchSuche
End Sub
Private Shared Function createHandlingAbrechnung(dt As DataTable, title As String, anFirma As String, filiale As Integer, von As Date, bis As Date, anhang_path As String, HandlingList As VERAG_PROG_ALLGEMEIN.cHandlingssaetzeInternLIST) As Boolean
Private Shared Function createHandlingAbrechnung(dt As DataTable, title As String, anFirma As String, von As Date, bis As Date, anhang_path As String, HandlingList As VERAG_PROG_ALLGEMEIN.cHandlingssaetzeInternLIST) As Boolean
Try
@@ -2959,7 +2979,8 @@ Public Class usrCntlSpeditionsBuchSuche
For Each row As DataGridViewRow In frm.dgvHandling.SelectedRows
doRechnung(filiale, kdNr, row.Cells("Grenzstelle").Value, row.Cells("Anzahl").Value, von, bis, row.Cells("HANDLING").Value, row.Cells("zu_kassieren_BAR").Value, counter, DS, anFirma.Trim())
doRechnung(CInt(row.Cells("FilialNr").Value), kdNr, row.Cells("Grenzstelle").Value, row.Cells("Anzahl").Value, von, bis, row.Cells("HANDLING").Value, row.Cells("zu_kassieren_BAR").Value, counter, DS, anFirma.Trim())
Next
@@ -3288,7 +3309,7 @@ Public Class usrCntlSpeditionsBuchSuche
Detailbericht = True
End If
If kdnrsrch < 0 Then
If kdnrsrch <0 Then
Dim inputKdNr = InputBox("Bitte KdNr eingeben", "Kundenauswertung generieren")
If inputKdNr <> "" Then inputKdNr = inputKdNr.Trim()

View File

@@ -1,4 +1,6 @@
Imports System.Data.OleDb
Imports System.Configuration
Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports System.IO
Imports System.Runtime.InteropServices
Imports itextsharp.text.pdf
@@ -94,7 +96,7 @@ Public Class frmMDMDatenverarbetiung
btnDatenLaden.Text = "Daten laden"
Case "IDS" : checkImport(LIEFERANT) : initDgv_IDS()
btnDatenLaden.Text = "Daten laden"
Button1.Enabled = False
'Button1.Enabled = False
Case "MSE" : checkImport(LIEFERANT) : initDgv_MSE()
btnDatenLaden.Text = "Daten laden"
End Select
@@ -2013,36 +2015,30 @@ Public Class frmMDMDatenverarbetiung
Dim displayFilter = False
Dim sqlstr As String = ""
sqlstr &= " SELECT 'PLOSE',AdressenNr,plose_Kennzeichen,plose_DatumTransaktion,plp_Land,isnull([tblPLOSE_Produktbeschreibung].plp_Description_EN,plose_Produktbeschreibung) as plose_Produktbeschreibung ,isnull(plose_NummerKarteGeraet,plose_Kontonummer) as plose_NummerKarteGeraet ,plose_BeschreibungEinfahrt,case when plose_BeschreibungAusfahrt is null and plose_BeschreibungMautTankstelle = 'Bregana' then 'Bregana' else isnull(plose_BeschreibungAusfahrt,'') end as plose_BeschreibungAusfahrt,plose_NettobetragWaehrungAbbuchung,(plose_BruttobetragWaehrungAbbuchung-plose_NettobetragWaehrungAbbuchung) as Steuer,plose_BruttobetragWaehrungAbbuchung "
sqlstr &= " SELECT 'PLOSE' as ,AdressenNr,plose_Kennzeichen,plose_DatumTransaktion,plp_Land,isnull([tblPLOSE_Produktbeschreibung].plp_Description_EN,plose_Produktbeschreibung) as plose_Produktbeschreibung ,isnull(plose_NummerKarteGeraet,plose_Kontonummer) as plose_NummerKarteGeraet ,plose_BeschreibungEinfahrt,case when plose_BeschreibungAusfahrt is null and plose_BeschreibungMautTankstelle = 'Bregana' then 'Bregana' else isnull(plose_BeschreibungAusfahrt,'') end as plose_BeschreibungAusfahrt,plose_NettobetragWaehrungAbbuchung,(plose_BruttobetragWaehrungAbbuchung-plose_NettobetragWaehrungAbbuchung) as Steuer,plose_BruttobetragWaehrungAbbuchung "
sqlstr &= " FROM tblPLOSE_Details INNER JOIN [tblPLOSE_Produktbeschreibung] on plose_ProduktCode=plp_ProductCode INNER JOIN Adressen on plose_POLSEKundennummer=PLOSEKundenNr and plp_LeistungsNr is not null "
sqlstr &= " WHERE 1=1 "
'sqlstr &= " AND plose_Fakturiert=0 AND plose_ProduktCode NOT IN (" & ProduktCode_NOT_IN & " ) AND plp_Land NOT IN ('AT','DE') "
sqlstr &= " AND cast(plose_FakturiertDatum as date) = '20.04.2026' AND plose_ProduktCode NOT IN (" & ProduktCode_NOT_IN & " ) AND plp_Land NOT IN ('AT','DE') "
sqlstr &= " AND plose_Fakturiert=0 AND plose_ProduktCode NOT IN (" & ProduktCode_NOT_IN & " ) AND plp_Land NOT IN ('AT','DE') "
'sqlstr &= " AND cast(plose_FakturiertDatum as date) = '06.05.2026' AND plose_ProduktCode NOT IN (" & ProduktCode_NOT_IN & " ) AND plp_Land NOT IN ('AT','DE') "
sqlstr &= " AND plose_DatumTransaktion between '" & von.ToShortDateString & "' and '" & bis.ToShortDateString & "' "
sqlstr &= " order by plp_Land, plose_DatumTransaktion"
' sqlstr &= " group by plose_ProduktCode"
' MsgBox(sqlstr)
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
Dim sqlstrAT As String = ""
sqlstrAT &= " SELECT 'PLOSE',AdressenNr,plose_Kennzeichen,plose_DatumTransaktion,plp_Land,'' as plose_Produktbeschreibung ,plose_NummerKarteGeraet as plose_NummerKarteGeraet ,'' as plose_BeschreibungEinfahrt,'' as plose_BeschreibungAusfahrt,sum(plose_NettobetragWaehrungAbbuchung) as plose_NettobetragWaehrungAbbuchung,sum(plose_BruttobetragWaehrungAbbuchung-plose_NettobetragWaehrungAbbuchung) as Steuer,sum(plose_BruttobetragWaehrungAbbuchung ) as plose_BruttobetragWaehrungAbbuchung "
sqlstrAT &= " FROM tblPLOSE_Details INNER JOIN [tblPLOSE_Produktbeschreibung] on plose_ProduktCode=plp_ProductCode INNER JOIN Adressen on plose_POLSEKundennummer=PLOSEKundenNr and plp_LeistungsNr is not null "
sqlstrAT &= " WHERE 1=1 "
'sqlstrAT &= " AND plose_Fakturiert=0 AND plose_ProduktCode NOT IN (" & ProduktCode_NOT_IN & " ) AND plp_Land IN ('AT','DE') "
sqlstrAT &= " AND plose_Fakturiert=0 AND plose_ProduktCode NOT IN (" & ProduktCode_NOT_IN & " ) AND plp_Land IN ('AT','DE') "
sqlstr &= " AND cast(plose_FakturiertDatum as date) = '20.04.2026' AND plose_ProduktCode NOT IN (" & ProduktCode_NOT_IN & " ) AND plp_Land NOT IN ('AT','DE') "
'sqlstr &= " AND cast(plose_FakturiertDatum as date) = '06.05.2026' AND plose_ProduktCode NOT IN (" & ProduktCode_NOT_IN & " ) AND plp_Land NOT IN ('AT','DE') "
sqlstrAT &= " AND plose_DatumTransaktion between '" & von.ToShortDateString & "' and '" & bis.ToShortDateString & "' "
sqlstrAT &= " group by plp_Land, AdressenNr, plose_Kennzeichen,plose_DatumTransaktion,plose_NummerKarteGeraet"
sqlstrAT &= " order by plp_Land"
' sqlstr &= " group by plose_ProduktCode"
' MsgBox(sqlstr)
Dim dtAT As DataTable = SQL.loadDgvBySql_Param(sqlstrAT, "FMZOLL")
@@ -2057,21 +2053,6 @@ Public Class frmMDMDatenverarbetiung
End If
End If
'Dim connectionString = ""
'If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
' connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD_Test.accd"
'Else
' connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD.accdb"
'End If
'Dim con As New OleDbConnection(connectionString)
Dim cmd As New OleDbCommand
Dim var1 As String
Dim adapter As OleDbDataAdapter = New OleDbDataAdapter()
Dim reader As OleDbDataReader = Nothing
If dt IsNot Nothing Then
@@ -2082,34 +2063,11 @@ Public Class frmMDMDatenverarbetiung
SQL.doSQL("INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Entry Terminal],[Exit Terminal],[Net Amount],[VAT Amount],[Total Amount], [BillingDate]) VALUES ('" &
r(0) & "'," & r(1) & ",'" & r(2) & "','" & r(3) & "','" & r(4) & "','" & r(5).ToString.Replace("'", " ") & "','" & r(6) & "','" & r(7).ToString.Replace("'", " ") & "','" & r(8).ToString.Replace("'", " ") & "'," & CDbl(r(9)).ToString.Replace(",", ".") & "," & CDbl(r(10)).ToString.Replace(",", ".") & "," & CDbl(r(11)).ToString.Replace(",", ".") & ",'" & datPloseAnhang.Text & "')", "FMZOLL")
'Zeitstempel
'Dim SQLQuery = "INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Entry Terminal],[Exit Terminal],[Nett Amount],[VAT Amount],[Total Amount]) VALUES (@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10,@P11,@P12) "
'' "SELECT * FROM DBParent WHERE P_ID = " & UniqeID & ";"
'Using Command As New OleDbCommand(SQLQuery, con)
' Command.Parameters.AddWithValue("@P1", r(0))
' Command.Parameters.AddWithValue("@P2", r(1))
' Command.Parameters.AddWithValue("@P3", r(2))
' Command.Parameters.AddWithValue("@P4", r(3))
' Command.Parameters.AddWithValue("@P5", r(4))
' Command.Parameters.AddWithValue("@P6", r(5))
' Command.Parameters.AddWithValue("@P7", r(6))
' Command.Parameters.AddWithValue("@P8", r(7))
' Command.Parameters.AddWithValue("@P9", r(8))
' Command.Parameters.AddWithValue("@P10", CDbl(r(9)))
' Command.Parameters.AddWithValue("@P11", CDbl(r(10)))
' Command.Parameters.AddWithValue("@P12", CDbl(r(11)))
' If Not VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then Command.ExecuteNonQuery()
' Command.Dispose()
'End Using
Catch ex2 As System.Exception
MsgBox("err: " & ex2.Message & ex2.StackTrace)
Finally
If reader IsNot Nothing Then reader.Close()
End Try
@@ -2127,6 +2085,109 @@ Public Class frmMDMDatenverarbetiung
End Function
Function genPLOSEInsertMautD_NEW(von As Date, bis As Date) As Boolean
Try
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
pic.Visible = False
Dim SQL_String_OHNE_DE_AT = "SELECT
'PLOSE' AS Datenquelle,
AdressenNr AS [Customer No],
plose_Kennzeichen AS [Licence Plate Number],
plp_Land AS [Transaction Country],
cast(plose_DatumTransaktion as Date) AS [Transaction Date],
ISNULL(tblPLOSE_Produktbeschreibung.plp_Description_EN, plose_Produktbeschreibung) AS [Product description],
ISNULL(plose_NummerKarteGeraet, plose_Kontonummer) AS [Card number],
ISNULL(plose_BeschreibungEinfahrt, '') AS [Entry Terminal],
CASE
WHEN plose_BeschreibungAusfahrt IS NULL
AND plose_BeschreibungMautTankstelle = 'Bregana'
THEN 'Bregana'
ELSE ISNULL(plose_BeschreibungAusfahrt, '')
END AS [Exit Terminal],
plose_NettobetragWaehrungAbbuchung AS [Net Amount],
(plose_BruttobetragWaehrungAbbuchung - plose_NettobetragWaehrungAbbuchung) AS [VAT Amount],
plose_BruttobetragWaehrungAbbuchung AS [Total Amount]
FROM tblPLOSE_Details INNER JOIN tblPLOSE_Produktbeschreibung ON plose_ProduktCode = plp_ProductCode
INNER JOIN Adressen ON plose_POLSEKundennummer = PLOSEKundenNr AND plp_LeistungsNr IS NOT NULL
WHERE
plose_Fakturiert=0 AND plose_ProduktCode NOT IN (" & ProduktCode_NOT_IN & ") AND plp_Land NOT IN ('AT','DE') AND plose_DatumTransaktion between '" & von.ToShortDateString & "' and '" & bis.ToShortDateString & "' "
Dim SQL_String_MIT_DE_AT = " SELECT 'PLOSE' AS Datenquelle,
AdressenNr AS [Customer No],
plose_Kennzeichen AS [Licence Plate Number],
plp_Land AS [Transaction Country],
cast(plose_DatumTransaktion as Date) AS [Transaction Date],
'' AS [Product description],
plose_NummerKarteGeraet AS [Card number],
'' AS [Entry Terminal],
'' AS [Exit Terminal],
SUM(plose_NettobetragWaehrungAbbuchung) AS [Net Amount],
SUM(plose_BruttobetragWaehrungAbbuchung - plose_NettobetragWaehrungAbbuchung) AS [VAT Amount],
SUM(plose_BruttobetragWaehrungAbbuchung) AS [Total Amount]
FROM tblPLOSE_Details
INNER JOIN tblPLOSE_Produktbeschreibung ON plose_ProduktCode = plp_ProductCode
INNER JOIN Adressen ON plose_POLSEKundennummer = PLOSEKundenNr AND plp_LeistungsNr IS NOT NULL
WHERE
plose_Fakturiert=0 AND plose_ProduktCode NOT IN ( " & ProduktCode_NOT_IN & ") AND plp_Land IN ('AT','DE') AND plose_DatumTransaktion between '" & von.ToShortDateString & "' and '" & bis.ToShortDateString & "'
GROUP BY plp_Land,AdressenNr,plose_Kennzeichen,plose_DatumTransaktion,plose_NummerKarteGeraet"
Dim sqlstr As String = "SELECT *, cast( '" & datPloseAnhang.Text & "' as date) as Billingdate FROM ( " & SQL_String_OHNE_DE_AT & " UNION ALL " & SQL_String_MIT_DE_AT & " ) AS TEMP ORDER BY TEMP.[Licence Plate Number];"
Dim updated As Boolean = False
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
If dt.Rows.Count > 0 Then
Dim InsertSatement As String = " INSERT INTO tblMautbericht
(
Datenquelle,
[Customer No],
[Licence Plate Number],
[Transaction Country],
[Transaction Date],
[Product description],
[Card Number],
[Entry Terminal],
[Exit Terminal],
[Net Amount],
[VAT Amount],
[Total Amount],
[Billingdate]
)"
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
updated = SQL.doSQL(InsertSatement & sqlstr, "FMZOLL",,,, 500)
End If
End If
pic.Visible = updated
Return updated
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
Function genASFINAGInsertMautAT(kdNr) As Boolean
Try
pic.Visible = False
@@ -2140,16 +2201,16 @@ Public Class frmMDMDatenverarbetiung
sqlstr = " select
'AT'
,Adressen.AdressenNr
,licenceplate
,turnoverdate
,'AT'
,contractPartner as ProductCode
,[cardnumber] as CardNumber
,[netAmount] as Netamount
,[VATamount] as VATAmount
,[totalAmount] as totalAmount
'AT' as Datenquelle
,Adressen.AdressenNr as [Customer No]
,licenceplate as [Licence Plate Number]
,'AT' as [Transaction Country]
,turnoverdate as [Transaction Date]
,contractPartner as [Product description]
,[cardnumber] as [Card Number]
,[netAmount] as [Net Amount]
,[VATamount] as [VAT Amount]
,[totalAmount] as [Total Amount]
FROM [VERAG].[dbo].[tblAsfinagMaut]
INNER JOIN [VERAG].[dbo].Kreditkarten ON cardnumber = Kreditkarten.KartenNr
INNER JOIN [VERAG].[dbo].Adressen ON Adressen.AdressenNr = Kreditkarten.AdressenNr
@@ -2159,93 +2220,40 @@ Public Class frmMDMDatenverarbetiung
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
Dim sqlstrAT As String = ""
sqlstrAT &= "select 'AT'
,Adressen.AdressenNr
,licenceplate
,turnoverdate
,'AT' as land
,'' as ProductCode
,[cardnumber] as CardNumber
,sum([netAmount]) as Netamount
,sum([VATamount]) as VATAmount
,sum([totalAmount]) as totalAmount
FROM [VERAG].[dbo].[tblAsfinagMaut]
INNER JOIN [VERAG].[dbo].Kreditkarten ON cardnumber = Kreditkarten.KartenNr
INNER JOIN [VERAG].[dbo].Adressen ON Adressen.AdressenNr = Kreditkarten.AdressenNr
WHERE 1 = 1 " & sqlWhere & "
group by Adressen.AdressenNr, licenceplate,turnoverdate,CardNumber
order by Adressen.AdressenNr"
Dim dtAT As DataTable = SQL.loadDgvBySql_Param(sqlstrAT, "FMZOLL")
'AT ---> Gruppiert
'If dtAT IsNot Nothing AndAlso dtAT.Rows.Count > 0 Then
' If dt Is Nothing OrElse dt.Rows.Count = 0 Then
' dt = dtAT
' Else
' For Each r In dtAT.Rows
' dt.Rows.Add({r(0), r(1), r(2), r(3), r(4), r(5), r(6), r(7), r(8), r(9)})
' Next
' End If
'End If
'Dim connectionString = ""
'If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
' connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD_Test.accdb"
'Else
' connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD.accdb"
'End If
'Dim con As New OleDbConnection(connectionString)
'Dim cmd As New OleDbCommand
'Dim var1 As String
'Dim adapter As OleDbDataAdapter = New OleDbDataAdapter()
'Dim reader As OleDbDataReader = Nothing
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
If dt IsNot Nothing Then
For Each r In dt.Rows
Try
'Zeitstempel
SQL.doSQL("INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Net Amount],[VAT Amount],[Total Amount], [BillingDate]) VALUES ('" &
r(0) & "'," & r(1) & ",'" & r(2) & "','" & r(3) & "','" & r(4) & "','" & r(5).ToString.Replace("'", " ") & "','" & r(6) & "'," & CDbl(r(7)).ToString.Replace(",", ".") & "," & CDbl(r(8)).ToString.Replace(",", ".") & "," & CDbl(r(9)).ToString.Replace(",", ".") & ",'" & datPloseAnhang.Text & "')", "FMZOLL")
Dim sqlstrBULKIMPORT As String = "SELECT *, cast( '" & datPloseAnhang.Text & "' as date) as Billingdate FROM ( " & sqlstr & " ) AS TEMP ORDER BY TEMP.[Customer No];"
Dim updated As Boolean = False
'Dim SQLQuery = "INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Nett Amount],[VAT Amount],[Total Amount]) VALUES (@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10) "
'' "SELECT * FROM DBParent WHERE P_ID = " & UniqeID & ";"
'Using Command As New OleDbCommand(SQLQuery, con)
Dim InsertSatement As String = " INSERT INTO tblMautbericht
(
Datenquelle,
[Customer No],
[Licence Plate Number],
[Transaction Country],
[Transaction Date],
[Product description],
[Card Number],
[Entry Terminal],
[Exit Terminal],
[Net Amount],
[VAT Amount],
[Total Amount],
[Billingdate]
)"
' Command.Parameters.AddWithValue("@P1", r(0))
' Command.Parameters.AddWithValue("@P2", r(1))
' Command.Parameters.AddWithValue("@P3", r(2))
' Command.Parameters.AddWithValue("@P4", r(3))
' Command.Parameters.AddWithValue("@P5", r(4))
' Command.Parameters.AddWithValue("@P6", r(5))
' Command.Parameters.AddWithValue("@P7", r(6))
' Command.Parameters.AddWithValue("@P8", CDbl(r(7)))
' Command.Parameters.AddWithValue("@P9", CDbl(r(8)))
' Command.Parameters.AddWithValue("@P10", CDbl(r(9)))
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
' If Not VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then Command.ExecuteNonQuery()
' Command.Dispose()
'End Using
updated = SQL.doSQL(InsertSatement & sqlstrBULKIMPORT, "FMZOLL",,,, 500)
Catch ex2 As System.Exception
' MsgBox("err: " & ex2.Message & ex2.StackTrace)
'Finally
' If reader IsNot Nothing Then reader.Close()
End Try
End If
Next
End If
pic.Visible = True
@@ -2271,15 +2279,16 @@ Public Class frmMDMDatenverarbetiung
End If
sqlstr = "SELECT 'UTA',qryUTA_Fakturierungspositionen.KundenNr AS [Customer No],
isnull([KFZ_Kennzeichen_komprimiert],isnull([KFZ_Kennzeichen],isnull([Prägetext_i_d_R_KFZ_Kennzeichen],''))) AS LicencePlateNumber,
sqlstr = "SELECT 'UTA' as Datenquelle,
qryUTA_Fakturierungspositionen.KundenNr AS [Customer No],
isnull([KFZ_Kennzeichen_komprimiert],isnull([KFZ_Kennzeichen],isnull([Prägetext_i_d_R_KFZ_Kennzeichen],''))) AS [Licence Plate Number],
cast([Belegdatum] as datetime) AS [Transaction Date],
qryUTA_Fakturierungspositionen.Lieferland AS [Transaction Country],
qryUTA_Fakturierungspositionen.Warenart AS [Product description],
qryUTA_Fakturierungspositionen.Kartennummer AS [Card number],
qryUTA_Fakturierungspositionen.Kartennummer AS [Card Number],
qryUTA_Fakturierungspositionen.Autobahnauffahrt AS [Entry Terminal],
qryUTA_Fakturierungspositionen.Autobahnausfahrt AS [Exit Terminal],
qryUTA_Fakturierungspositionen.Gesamtbetrag_Netto_in_Darstellwährung AS [Nett Amount],
qryUTA_Fakturierungspositionen.Gesamtbetrag_Netto_in_Darstellwährung AS [Net Amount],
qryUTA_Fakturierungspositionen.Gesamtbetrag_Umsatzsteuer_in_Darstellwährung AS [VAT Amount],
qryUTA_Fakturierungspositionen.Gesamtbetrag_Brutto_in_Darstellwährung AS [Total Amount]
@@ -2295,67 +2304,35 @@ Public Class frmMDMDatenverarbetiung
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL", 60)
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
Dim sqlstrBULKIMPORT As String = "SELECT *, cast( '" & datPloseAnhang.Text & "' as date) as Billingdate FROM ( " & sqlstr & " ) AS TEMP ORDER BY TEMP.[Customer No];"
Dim updated As Boolean = False
Dim InsertSatement As String = " INSERT INTO tblMautbericht
(
Datenquelle,
[Customer No],
[Licence Plate Number],
[Transaction Country],
[Transaction Date],
[Product description],
[Card Number],
[Entry Terminal],
[Exit Terminal],
[Net Amount],
[VAT Amount],
[Total Amount],
[Billingdate]
)"
'Dim connectionString = ""
'If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
' connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD_Test.accdb"
'Else
' connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD.accdb"
'End If
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
'Dim con As New OleDbConnection(connectionString)
'Dim cmd As New OleDbCommand
'Dim var1 As String
updated = SQL.doSQL(InsertSatement & sqlstrBULKIMPORT, "FMZOLL",,,, 500)
'Dim adapter As OleDbDataAdapter = New OleDbDataAdapter()
'Dim reader As OleDbDataReader = Nothing
End If
If dt IsNot Nothing Then
'con.Open()
For Each r In dt.Rows
Try
'Zeitstempel
SQL.doSQL("INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Entry Terminal],[Exit Terminal],[Net Amount],[VAT Amount],[Total Amount], [BillingDate]) VALUES ('" &
r(0) & "'," & r(1) & ",'" & r(2) & "','" & r(3) & "','" & r(4) & "','" & r(5).ToString.Replace("'", " ") & "','" & r(6) & "','" & r(7).ToString.Replace("'", " ") & "','" & r(8).ToString.Replace("'", " ") & "'," & CDbl(r(9)).ToString.Replace(",", ".") & "," & CDbl(r(10)).ToString.Replace(",", ".") & "," & CDbl(r(11)).ToString.Replace(",", ".") & ",'" & datPloseAnhang.Text & "')", "FMZOLL")
'Dim SQLQuery = "INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Entry Terminal],[Exit Terminal],[Nett Amount],[VAT Amount],[Total Amount]) VALUES (@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10,@P11,@P12) "
'' "SELECT * FROM DBParent WHERE P_ID = " & UniqeID & ";"
'Using Command As New OleDbCommand(SQLQuery, con)
' Command.Parameters.AddWithValue("@P1", r(0))
' Command.Parameters.AddWithValue("@P2", r(1))
' Command.Parameters.AddWithValue("@P3", r(2))
' Command.Parameters.AddWithValue("@P4", r(3))
' Command.Parameters.AddWithValue("@P5", r(4))
' Command.Parameters.AddWithValue("@P6", r(5))
' Command.Parameters.AddWithValue("@P7", r(6))
' Command.Parameters.AddWithValue("@P8", r(7))
' Command.Parameters.AddWithValue("@P9", r(8))
' Command.Parameters.AddWithValue("@P10", CDbl(r(9)))
' Command.Parameters.AddWithValue("@P11", CDbl(r(10)))
' Command.Parameters.AddWithValue("@P12", CDbl(r(11)))
' If Not VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then Command.ExecuteNonQuery()
' Command.Dispose()
'End Using
Catch ex2 As System.Exception
MsgBox("err: " & ex2.Message & ex2.StackTrace)
'Finally
' If reader IsNot Nothing Then reader.Close()
End Try
Next
'con.Close()
End If
pic.Visible = True
Return True
@@ -2380,10 +2357,12 @@ Public Class frmMDMDatenverarbetiung
End If
sqlstr = " Select 'MSE',adressen.AdressenNr As [Customer No],
sqlstr = " Select 'MSE' as Datenquelle,
adressen.AdressenNr As [Customer No],
trans.license_plate_number as [Licence Plate Number],
cast(trans.[purchase_datetime] as Date) as [Transaction Date],
trans.transaction_country As [Transaction Country],trans.device_product_type As [Product description],
trans.transaction_country As [Transaction Country],
trans.device_product_type As [Product description],
trans.device_product_number as [Card Number],
trans.entry_point_name as [Entry Terminal],
trans.exit_point_name as [Exit Terminal],
@@ -2400,64 +2379,118 @@ Public Class frmMDMDatenverarbetiung
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
'Dim connectionString = ""
'If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
' connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD_Test.accdb"
'Else
' connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD.accdb"
'End If
'Dim con As New OleDbConnection(connectionString)
'Dim cmd As New OleDbCommand
'Dim var1 As String
'Dim adapter As OleDbDataAdapter = New OleDbDataAdapter()
'Dim reader As OleDbDataReader = Nothing
If dt IsNot Nothing Then
'con.Open()
For Each r In dt.Rows
Try
'Zeitstempel
SQL.doSQL("INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Entry Terminal],[Exit Terminal],[Net Amount],[VAT Amount],[Total Amount], [BillingDate]) VALUES ('" &
r(0) & "'," & r(1) & ",'" & r(2) & "','" & r(3) & "','" & r(4) & "','" & r(5).ToString.Replace("'", " ") & "','" & r(6) & "','" & r(7).ToString.Replace("'", " ") & "','" & r(8).ToString.Replace("'", " ") & "'," & CDbl(r(9)).ToString.Replace(",", ".") & "," & CDbl(r(10)).ToString.Replace(",", ".") & "," & CDbl(r(11)).ToString.Replace(",", ".") & ",'" & datPloseAnhang.Text & "')", "FMZOLL")
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
Dim sqlstrBULKIMPORT As String = "SELECT *, cast( '" & datPloseAnhang.Text & "' as date) as Billingdate FROM ( " & sqlstr & " ) AS TEMP ORDER BY TEMP.[Customer No];"
Dim updated As Boolean = False
Dim InsertSatement As String = " INSERT INTO tblMautbericht
(
Datenquelle,
[Customer No],
[Licence Plate Number],
[Transaction Country],
[Transaction Date],
[Product description],
[Card Number],
[Entry Terminal],
[Exit Terminal],
[Net Amount],
[VAT Amount],
[Total Amount],
[Billingdate]
)"
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
updated = SQL.doSQL(InsertSatement & sqlstrBULKIMPORT, "FMZOLL",,,, 500)
End If
End If
pic.Visible = True
Return True
Catch ex As System.Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
Function genIDSInsertMaut(kdNr, IDS) As Boolean
Try
pic.Visible = False
Dim displayFilter = False
Dim sqlstr As String = ""
Dim sqlWhere As String = ""
If kdNr <> "" Then
sqlWhere &= " AND Adressen.AdressenNr=" & kdNr
End If
Dim SQL_IDS = "SELECT 'IDS' as Datenquelle,
trans.KdNrVERAG As [Customer No],
isnull(det.LicencePlateNumber,'-') as [Licence Plate Number],
land.Lieferland_ISO2 As [Transaction Country],
det.Transactiondate as [Transaction Date] ,
'' AS [Product description],
det.CardNumber as [Card Number] ,
'' as [Entry Terminal],
'' as [Exit Terminal],
sum(det.[TotalNetAmount]) AS [Nett Amount],
sum(det.[VATAmount]) AS[VAT Amount],
sum(det.[AmminclVAT]) AS [Total Amount]
FROM [VERAG].[dbo].[tblIDSTransactionsNew_Details] as det
inner join [tblIDSTransactionsNew] as trans on det.[YearMonthDay] = trans.[YearMonthDay] and det.[CustomerCode] = trans.[CustomerCode] and det.[OutletCountryCode] = trans.[OutletCountryCode] and det.[OutletCode] = trans.[OutletCode] and det.[ProductTypeCode] = trans.[ProductTypeCode]
inner join [VERAG].[dbo].[tbl_IDS_Länder] as land on det.OutletCountryCode = land.OutletCountryCode
where cast(det.[YearMonthDay] as date) = '" & DateTimePicker2.Text & "' and trans.charged = 0
group by trans.KdNrVERAG,det.CustomerCode, det.[YearMonthDay], det.CardNumber, land.Lieferland_ISO2, det.LicencePlateNumber,det.Transactiondate "
Dim dt As DataTable = SQL.loadDgvBySql_Param(SQL_IDS, "FMZOLL")
' Dim SQLQuery = "INSERT INTO tblMautbericht (Datenquelle,[Customer No],[Licence Plate Number],[Transaction Date],[Transaction Country],[Product description],[Card Number],[Entry Terminal],[Exit Terminal],[Nett Amount],[VAT Amount],[Total Amount]) VALUES (@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10,@P11,@P12) "
' ' "SELECT * FROM DBParent WHERE P_ID = " & UniqeID & ";"
' Using Command As New OleDbCommand(SQLQuery, con)
' Command.Parameters.AddWithValue("@P1", r(0))
' Command.Parameters.AddWithValue("@P2", r(1))
' Command.Parameters.AddWithValue("@P3", r(2))
' Command.Parameters.AddWithValue("@P4", r(3))
' Command.Parameters.AddWithValue("@P5", r(4))
' Command.Parameters.AddWithValue("@P6", r(5))
' Command.Parameters.AddWithValue("@P7", r(6))
' Command.Parameters.AddWithValue("@P8", r(7))
' Command.Parameters.AddWithValue("@P9", r(8))
' Command.Parameters.AddWithValue("@P10", CDbl(r(9)))
' Command.Parameters.AddWithValue("@P11", CDbl(r(10)))
' Command.Parameters.AddWithValue("@P12", CDbl(r(11)))
' If Not VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then Command.ExecuteNonQuery()
' Command.Dispose()
' End Using
Catch ex2 As System.Exception
MsgBox("err: " & ex2.Message & ex2.StackTrace)
'Finally
' If reader IsNot Nothing Then reader.Close()
End Try
Next
'con.Close()
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
Dim sqlstrBULKIMPORT As String = "SELECT *, cast( '" & datPloseAnhang.Text & "' as date) as Billingdate FROM ( " & SQL_IDS & " ) AS TEMP ORDER BY TEMP.[Customer No];"
Dim updated As Boolean = False
Dim InsertSatement As String = " INSERT INTO tblMautbericht
(
Datenquelle,
[Customer No],
[Licence Plate Number],
[Transaction Country],
[Transaction Date],
[Product description],
[Card Number],
[Entry Terminal],
[Exit Terminal],
[Net Amount],
[VAT Amount],
[Total Amount],
[Billingdate]
)"
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
updated = SQL.doSQL(InsertSatement & sqlstrBULKIMPORT, "FMZOLL",,,, 500)
End If
End If
pic.Visible = True
Return True
@@ -2471,42 +2504,6 @@ Public Class frmMDMDatenverarbetiung
Function deleteMautD(Datenquelle As String) As Boolean
Try
'Dim connectionString = ""
'If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
' connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD_Test.accdb"
'Else
' connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD.accdb"
'End If
'Dim con As New OleDbConnection(connectionString)
'Dim cmd As New OleDbCommand
'Dim var1 As String
'Dim adapter As OleDbDataAdapter = New OleDbDataAdapter()
'Dim reader As OleDbDataReader = Nothing
'FMZOLL-Tabelle
'Try
' con.Open()
' 'Zeitstempel
' Dim SQLQuery = "DELETE FROM tblMautbericht WHERE Datenquelle='" & Datenquelle & "' "
' Using Command As New OleDbCommand(SQLQuery, con)
' If Not VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then Command.ExecuteNonQuery()
' Command.Dispose()
' End Using
'Catch ex2 As System.Exception
' MsgBox("err: " & ex2.Message & ex2.StackTrace)
' 'Finally
' ' If reader IsNot Nothing Then reader.Close()
'End Try
'con.Close()
Return SQL.doSQL("DELETE FROM tblMautbericht WHERE Datenquelle='" & Datenquelle & "' AND cast(Billingdate as Date)= '" & datPloseAnhang.Text & "'", "FMZOLL")
@@ -4766,10 +4763,12 @@ Public Class frmMDMDatenverarbetiung
Function MautD_Befuellen(Optional kdNr = "", Optional _Lieferant = "") As Boolean
Select Case LIEFERANT
Case "PLOSE" : deleteMautD("PLOSE") : Return genPLOSEInsertMautD(dat_Sum_Von.Value.ToShortDateString, dat_Sum_Bis.Value.ToShortDateString)
Case "PLOSE" : deleteMautD("PLOSE") : Return genPLOSEInsertMautD_NEW(dat_Sum_Von.Value.ToShortDateString, dat_Sum_Bis.Value.ToShortDateString)
Case "ASFINAG" : deleteMautD("AT") : Return genASFINAGInsertMautAT(kdNr)
Case "UTA" : deleteMautD("UTA") : Return genUTAInsertMaut(kdNr)
Case "MSE" : deleteMautD("MSE") : Return genMSEInsertMaut(kdNr)
Case "IDS" : deleteMautD("IDS") : Return genIDSInsertMaut(kdNr, LIEFERANT)
End Select
Return False
End Function
@@ -5304,7 +5303,7 @@ RabattBerechnen:
Dim idsParam As New cIDS()
idsParam.initImportPfade("IDS")
If genRGAtt_IDS(item.Name, idsParam) Then
If Not test Then
If Not test AndAlso MautD_Befuellen() Then
setFakturiert(item.Name)
End If
End If

View File

@@ -379,57 +379,60 @@ Public Class cIDS
Dim vr = isleernothing((currentRow(13)))
Dim obo = isleernothing((currentRow(14)))
Dim MDMEinarb_check As New cMDMEinarbeitung("IDS", ymd)
If MDMEinarb_check.hasEntry AndAlso MDMEinarb_check.completed Then Return False
Dim zusParam = ""
Dim isOBO As Boolean = False
If vr IsNot Nothing AndAlso vr <> "" Then
zusParam = vr
ElseIf obo IsNot Nothing AndAlso obo <> "" Then
zusParam = obo
isOBO = True
If lngRecordCount = 2 Then
Dim MDMEinarb_check As New cMDMEinarbeitung("IDS", ymd)
If MDMEinarb_check.hasEntry AndAlso MDMEinarb_check.completed Then Return False
End If
Dim ids As New cIDS(ymd, pyn, cc, occ, oc, ptc, zusParam, isOBO)
Dim avprive = isleernothing((currentRow(12)))
With ids
.YearMonthDay = isleernothing((currentRow(0)))
.CustomerCode = isleernothing((currentRow(1)))
.Paymentsummarynumber = isleernothing((currentRow(2)))
.CustomerName = isleernothing((currentRow(3)))
.OutletCountry = isleernothing((currentRow(4)))
.OutletCountryCode = isleernothing((currentRow(5)))
.OutletCode = isleernothing((currentRow(6)))
.ProductTypeCode = isleernothing((currentRow(7)))
If lngRecordCount = 2 Then
MDMEinarb.invoicedate = CDate(.YearMonthDay)
Dim zusParam = ""
Dim isOBO As Boolean = False
If vr IsNot Nothing AndAlso vr <> "" Then
zusParam = vr
ElseIf obo IsNot Nothing AndAlso obo <> "" Then
zusParam = obo
isOBO = True
End If
Dim ids As New cIDS(ymd, pyn, cc, occ, oc, ptc, zusParam, isOBO)
.TransactionVolume = isleernothing((currentRow(8)))
.AmminclVAT = isleernothing((currentRow(9)))
.TotalNetAmount = isleernothing((currentRow(10)))
.VATAmount = isleernothing((currentRow(11)))
.avpriceexclVAT = IIf(avprive <> "" AndAlso IsNumeric(avprive), avprive, 0)
Dim avprive = isleernothing((currentRow(12)))
Console.WriteLine("IDS: " & isleernothing((currentRow(1))) & " - " & lngRecordCount & " - " & isleernothing((currentRow(10))))
If isOBO Then
If .SAVE_OBO() Then counTrans += 1
Else
If .SAVE_VR() Then counTrans += 1
End If
With ids
.YearMonthDay = isleernothing((currentRow(0)))
.CustomerCode = isleernothing((currentRow(1)))
.Paymentsummarynumber = isleernothing((currentRow(2)))
.CustomerName = isleernothing((currentRow(3)))
.OutletCountry = isleernothing((currentRow(4)))
.OutletCountryCode = isleernothing((currentRow(5)))
.OutletCode = isleernothing((currentRow(6)))
.ProductTypeCode = isleernothing((currentRow(7)))
End With
If lngRecordCount = 2 Then
MDMEinarb.invoicedate = CDate(.YearMonthDay)
End If
Else
Dim ymd = isleernothing((currentRow(0)))
.TransactionVolume = isleernothing((currentRow(8)))
.AmminclVAT = isleernothing((currentRow(9)))
.TotalNetAmount = isleernothing((currentRow(10)))
.VATAmount = isleernothing((currentRow(11)))
.avpriceexclVAT = IIf(avprive <> "" AndAlso IsNumeric(avprive), avprive, 0)
Console.WriteLine("IDS: " & isleernothing((currentRow(1))) & " - " & lngRecordCount & " - " & isleernothing((currentRow(10))))
If isOBO Then
If .SAVE_OBO() Then counTrans += 1
Else
If .SAVE_VR() Then counTrans += 1
End If
End With
Else
Dim ymd = isleernothing((currentRow(0)))
Dim cc = isleernothing((currentRow(1)))
Dim cn = isleernothing((currentRow(2)))
Dim occ = isleernothing((currentRow(8)))
@@ -440,23 +443,25 @@ Public Class cIDS
Dim t_date = isleernothing((currentRow(12)))
Dim tna = isleernothing((currentRow(16)))
Dim MDMEinarb_check As New cMDMEinarbeitung("IDS_Details", ymd)
If MDMEinarb_check.hasEntry AndAlso MDMEinarb_check.completed Then Return False
Dim ids_detail As New cIDSDetails(ymd, cc, cn, occ, oc, ptc, t_time, t_date, tv, tna)
ids_detail.AmminclVAT = isleernothing((currentRow(15)))
ids_detail.VATAmount = isleernothing((currentRow(17)))
ids_detail.avpriceexclVAT = isleernothing((currentRow(18)))
ids_detail.Paymentsummarynumber = ""
If ids_detail.SAVE() Then counTrans += 1
If lngRecordCount = 2 Then
MDMEinarb.invoicedate = CDate(ids_detail.YearMonthDay)
Dim MDMEinarb_check As New cMDMEinarbeitung("IDS_Details", ymd)
If MDMEinarb_check.hasEntry AndAlso MDMEinarb_check.completed Then Return False
End If
End If
Dim ids_detail As New cIDSDetails(ymd, cc, cn, occ, oc, ptc, t_time, t_date, tv, tna)
ids_detail.AmminclVAT = isleernothing((currentRow(15)))
ids_detail.VATAmount = isleernothing((currentRow(17)))
ids_detail.avpriceexclVAT = isleernothing((currentRow(18)))
ids_detail.Paymentsummarynumber = ""
If ids_detail.SAVE() Then counTrans += 1
If lngRecordCount = 2 Then
MDMEinarb.invoicedate = CDate(ids_detail.YearMonthDay)
End If
End If
Catch ex As Exception
@@ -468,11 +473,7 @@ Public Class cIDS
Loop
If Not isTransactionDetail Then
MDMEinarb.supplier = "IDS"
Else
MDMEinarb.supplier = "IDS_Details"
End If
cnt = CInt(lngRecordCount)
cnt = CInt(lngRecordCount)
MDMEinarb.ds_total += cnt - 1
MDMEinarb.ds_count += counTrans
MDMEinarb.import_date = Now()
@@ -484,8 +485,30 @@ Public Class cIDS
End If
MDMEinarb.SAVE()
Else
'LKW-Kennzeichen aktualisieren!
SQL.doSQL("UPDATE det SET det.LicencePlateNumber = s.KfzKennzeichen FROM tblIDSTransactionsNew_Details det INNER JOIN SDL.dbo.SDL s
ON s.KartenNr =
CAST(det.CustomerCode AS varchar(50)) + CAST(det.CardNumber AS varchar(50))
WHERE s.SDLNr = 100 AND ISNULL(s.Gesperrt,0) = 0")
objFileRead.Close()
MDMEinarb.supplier = "IDS_Details"
cnt = CInt(lngRecordCount)
MDMEinarb.ds_total += cnt - 1
MDMEinarb.ds_count += counTrans
MDMEinarb.import_date = Now()
MDMEinarb.importfilename = fi.Name
MDMEinarb.completed = True
MDMEinarb.completed_date = Now()
MDMEinarb.SAVE()
End If
objFileRead.Close()
Return True