Handlingsabsrechnung, Spednich, etc.

This commit is contained in:
2026-08-25 09:24:14 +02:00
parent cad6d52db6
commit 28149cdbff
10 changed files with 942 additions and 480 deletions

View File

@@ -27,6 +27,7 @@
Me.Button2 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.dgvHandling = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.dgvHandling = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.btnPreisliste = New System.Windows.Forms.Button() Me.btnPreisliste = New System.Windows.Forms.Button()
Me.cbxDivers = New System.Windows.Forms.CheckBox()
CType(Me.dgvHandling, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvHandling, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
@@ -82,11 +83,23 @@
Me.btnPreisliste.Text = "Preisliste" Me.btnPreisliste.Text = "Preisliste"
Me.btnPreisliste.UseVisualStyleBackColor = True Me.btnPreisliste.UseVisualStyleBackColor = True
' '
'cbxDivers
'
Me.cbxDivers.AutoSize = True
Me.cbxDivers.Location = New System.Drawing.Point(134, 421)
Me.cbxDivers.Name = "cbxDivers"
Me.cbxDivers.Size = New System.Drawing.Size(81, 17)
Me.cbxDivers.TabIndex = 5
Me.cbxDivers.Text = "CheckBox1"
Me.cbxDivers.UseVisualStyleBackColor = True
Me.cbxDivers.Visible = False
'
'frmAbrechnungHandling 'frmAbrechnungHandling
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(800, 450) Me.ClientSize = New System.Drawing.Size(800, 450)
Me.Controls.Add(Me.cbxDivers)
Me.Controls.Add(Me.btnPreisliste) Me.Controls.Add(Me.btnPreisliste)
Me.Controls.Add(Me.dgvHandling) Me.Controls.Add(Me.dgvHandling)
Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button2)
@@ -97,6 +110,7 @@
Me.Text = "Handling" Me.Text = "Handling"
CType(Me.dgvHandling, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.dgvHandling, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout()
End Sub End Sub
@@ -104,4 +118,5 @@
Friend WithEvents Button2 As Button Friend WithEvents Button2 As Button
Friend WithEvents dgvHandling As VERAG_PROG_ALLGEMEIN.MyDatagridview Friend WithEvents dgvHandling As VERAG_PROG_ALLGEMEIN.MyDatagridview
Friend WithEvents btnPreisliste As Button Friend WithEvents btnPreisliste As Button
Friend WithEvents cbxDivers As CheckBox
End Class End Class

View File

@@ -23,12 +23,12 @@ Partial Class usrCntlSpeditionsBuchSuche
<System.Diagnostics.DebuggerStepThrough()> <System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container() Me.components = New System.ComponentModel.Container()
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 DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() 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 DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle9 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 resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(usrCntlSpeditionsBuchSuche)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(usrCntlSpeditionsBuchSuche))
Me.TabPage1 = New System.Windows.Forms.TabPage() Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.cntxtCntxtSpeditionsbuch = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.cntxtCntxtSpeditionsbuch = New System.Windows.Forms.ContextMenuStrip(Me.components)
@@ -48,6 +48,10 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.lblAbfertigungsarten = New System.Windows.Forms.Label() Me.lblAbfertigungsarten = New System.Windows.Forms.Label()
Me.Label17 = New System.Windows.Forms.Label() Me.Label17 = New System.Windows.Forms.Label()
Me.pnlAnzeige = New System.Windows.Forms.Panel() Me.pnlAnzeige = New System.Windows.Forms.Panel()
Me.btnHandling = New System.Windows.Forms.Button()
Me.cboHandlingssatz = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboHandlingssatz_AMBAR = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.btnHandling_AMBAR = New System.Windows.Forms.Button()
Me.txtFiskalEndempfaenger = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtFiskalEndempfaenger = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.DataGridView = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.DataGridView = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.dgvLKW = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.dgvLKW = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
@@ -76,11 +80,6 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.btnSpedBuchEinnahmen = New System.Windows.Forms.Button() Me.btnSpedBuchEinnahmen = New System.Windows.Forms.Button()
Me.pnlBerichte = New System.Windows.Forms.Panel() Me.pnlBerichte = New System.Windows.Forms.Panel()
Me.CheckBox5 = New System.Windows.Forms.CheckBox() Me.CheckBox5 = New System.Windows.Forms.CheckBox()
Me.FlowLayoutPanel1 = New System.Windows.Forms.FlowLayoutPanel()
Me.btnHandling = New System.Windows.Forms.Button()
Me.cboHandlingssatz = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.btnHandling_AMBAR = New System.Windows.Forms.Button()
Me.cboHandlingssatz_AMBAR = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cbxHandlingAbrechnen = New System.Windows.Forms.CheckBox() Me.cbxHandlingAbrechnen = New System.Windows.Forms.CheckBox()
Me.cbxDetailbericht = New System.Windows.Forms.CheckBox() Me.cbxDetailbericht = New System.Windows.Forms.CheckBox()
Me.Button24 = New System.Windows.Forms.Button() Me.Button24 = New System.Windows.Forms.Button()
@@ -218,6 +217,8 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.Label45 = New System.Windows.Forms.Label() Me.Label45 = New System.Windows.Forms.Label()
Me.cboFilialeHandling = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cboFilialeHandling = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.SplitContainer = New System.Windows.Forms.SplitContainer() Me.SplitContainer = New System.Windows.Forms.SplitContainer()
Me.pnlHandling = New System.Windows.Forms.Panel()
Me.pnlHandlingAmbar = New System.Windows.Forms.Panel()
Me.cntxtCntxtSpeditionsbuch.SuspendLayout() Me.cntxtCntxtSpeditionsbuch.SuspendLayout()
Me.pnlRechts.SuspendLayout() Me.pnlRechts.SuspendLayout()
Me.pnlAnzeige.SuspendLayout() Me.pnlAnzeige.SuspendLayout()
@@ -227,7 +228,6 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.Panel3.SuspendLayout() Me.Panel3.SuspendLayout()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
Me.pnlBerichte.SuspendLayout() Me.pnlBerichte.SuspendLayout()
Me.FlowLayoutPanel1.SuspendLayout()
Me.MenuStrip1.SuspendLayout() Me.MenuStrip1.SuspendLayout()
Me.pnl.SuspendLayout() Me.pnl.SuspendLayout()
Me.MenuStrip2.SuspendLayout() Me.MenuStrip2.SuspendLayout()
@@ -243,6 +243,8 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.SplitContainer.Panel1.SuspendLayout() Me.SplitContainer.Panel1.SuspendLayout()
Me.SplitContainer.Panel2.SuspendLayout() Me.SplitContainer.Panel2.SuspendLayout()
Me.SplitContainer.SuspendLayout() Me.SplitContainer.SuspendLayout()
Me.pnlHandling.SuspendLayout()
Me.pnlHandlingAmbar.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'TabPage1 'TabPage1
@@ -428,6 +430,59 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.pnlAnzeige.Size = New System.Drawing.Size(1239, 452) Me.pnlAnzeige.Size = New System.Drawing.Size(1239, 452)
Me.pnlAnzeige.TabIndex = 0 Me.pnlAnzeige.TabIndex = 0
' '
'btnHandling
'
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(1, 2)
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
'
'cboHandlingssatz
'
Me.cboHandlingssatz._allowedValuesFreiText = Nothing
Me.cboHandlingssatz._allowFreiText = False
Me.cboHandlingssatz._value = ""
Me.cboHandlingssatz.DropDownWidth = 300
Me.cboHandlingssatz.FormattingEnabled = True
Me.cboHandlingssatz.Location = New System.Drawing.Point(1, 32)
Me.cboHandlingssatz.Name = "cboHandlingssatz"
Me.cboHandlingssatz.Size = New System.Drawing.Size(159, 21)
Me.cboHandlingssatz.TabIndex = 60
'
'cboHandlingssatz_AMBAR
'
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(10, 38)
Me.cboHandlingssatz_AMBAR.Name = "cboHandlingssatz_AMBAR"
Me.cboHandlingssatz_AMBAR.Size = New System.Drawing.Size(128, 22)
Me.cboHandlingssatz_AMBAR.TabIndex = 53
'
'btnHandling_AMBAR
'
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(10, 9)
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
'
'txtFiskalEndempfaenger 'txtFiskalEndempfaenger
' '
Me.txtFiskalEndempfaenger._DateTimeOnly = False Me.txtFiskalEndempfaenger._DateTimeOnly = False
@@ -462,35 +517,35 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.DataGridView.AllowUserToDeleteRows = False Me.DataGridView.AllowUserToDeleteRows = False
Me.DataGridView.AllowUserToOrderColumns = True Me.DataGridView.AllowUserToOrderColumns = True
Me.DataGridView.AllowUserToResizeRows = False Me.DataGridView.AllowUserToResizeRows = False
DataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control DataGridViewCellStyle4.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)) DataGridViewCellStyle4.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 DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.DataGridView.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle7 Me.DataGridView.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4
Me.DataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.DataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.DataGridView.ContextMenuStrip = Me.cntxtCntxtSpeditionsbuch Me.DataGridView.ContextMenuStrip = Me.cntxtCntxtSpeditionsbuch
DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window DataGridViewCellStyle5.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)) DataGridViewCellStyle5.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 DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.DataGridView.DefaultCellStyle = DataGridViewCellStyle8 Me.DataGridView.DefaultCellStyle = DataGridViewCellStyle5
Me.DataGridView.Dock = System.Windows.Forms.DockStyle.Fill Me.DataGridView.Dock = System.Windows.Forms.DockStyle.Fill
Me.DataGridView.Location = New System.Drawing.Point(450, 0) Me.DataGridView.Location = New System.Drawing.Point(450, 0)
Me.DataGridView.Name = "DataGridView" Me.DataGridView.Name = "DataGridView"
DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control DataGridViewCellStyle6.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)) DataGridViewCellStyle6.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 DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.DataGridView.RowHeadersDefaultCellStyle = DataGridViewCellStyle9 Me.DataGridView.RowHeadersDefaultCellStyle = DataGridViewCellStyle6
Me.DataGridView.Size = New System.Drawing.Size(789, 262) Me.DataGridView.Size = New System.Drawing.Size(789, 262)
Me.DataGridView.TabIndex = 0 Me.DataGridView.TabIndex = 0
' '
@@ -502,35 +557,35 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.dgvLKW.AllowUserToOrderColumns = True Me.dgvLKW.AllowUserToOrderColumns = True
Me.dgvLKW.AllowUserToResizeRows = False Me.dgvLKW.AllowUserToResizeRows = False
Me.dgvLKW.BackgroundColor = System.Drawing.Color.WhiteSmoke Me.dgvLKW.BackgroundColor = System.Drawing.Color.WhiteSmoke
DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control DataGridViewCellStyle7.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)) DataGridViewCellStyle7.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 DataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight DataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] DataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvLKW.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1 Me.dgvLKW.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle7
Me.dgvLKW.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvLKW.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvLKW.ContextMenuStrip = Me.cntxtCntxtSpeditionsbuch Me.dgvLKW.ContextMenuStrip = Me.cntxtCntxtSpeditionsbuch
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window DataGridViewCellStyle8.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)) DataGridViewCellStyle8.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 DataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight DataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvLKW.DefaultCellStyle = DataGridViewCellStyle2 Me.dgvLKW.DefaultCellStyle = DataGridViewCellStyle8
Me.dgvLKW.Dock = System.Windows.Forms.DockStyle.Left Me.dgvLKW.Dock = System.Windows.Forms.DockStyle.Left
Me.dgvLKW.Location = New System.Drawing.Point(0, 0) Me.dgvLKW.Location = New System.Drawing.Point(0, 0)
Me.dgvLKW.Name = "dgvLKW" Me.dgvLKW.Name = "dgvLKW"
DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control DataGridViewCellStyle9.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)) DataGridViewCellStyle9.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 DataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight DataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvLKW.RowHeadersDefaultCellStyle = DataGridViewCellStyle3 Me.dgvLKW.RowHeadersDefaultCellStyle = DataGridViewCellStyle9
Me.dgvLKW.Size = New System.Drawing.Size(450, 262) Me.dgvLKW.Size = New System.Drawing.Size(450, 262)
Me.dgvLKW.TabIndex = 35 Me.dgvLKW.TabIndex = 35
Me.dgvLKW.Visible = False Me.dgvLKW.Visible = False
@@ -851,8 +906,9 @@ Partial Class usrCntlSpeditionsBuchSuche
' '
Me.pnlBerichte.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ 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) Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.pnlBerichte.Controls.Add(Me.pnlHandlingAmbar)
Me.pnlBerichte.Controls.Add(Me.pnlHandling)
Me.pnlBerichte.Controls.Add(Me.CheckBox5) Me.pnlBerichte.Controls.Add(Me.CheckBox5)
Me.pnlBerichte.Controls.Add(Me.FlowLayoutPanel1)
Me.pnlBerichte.Controls.Add(Me.cbxHandlingAbrechnen) Me.pnlBerichte.Controls.Add(Me.cbxHandlingAbrechnen)
Me.pnlBerichte.Controls.Add(Me.cbxDetailbericht) Me.pnlBerichte.Controls.Add(Me.cbxDetailbericht)
Me.pnlBerichte.Controls.Add(Me.Button24) Me.pnlBerichte.Controls.Add(Me.Button24)
@@ -890,76 +946,12 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.CheckBox5.Text = "mit DL-Kosten" Me.CheckBox5.Text = "mit DL-Kosten"
Me.CheckBox5.UseVisualStyleBackColor = False Me.CheckBox5.UseVisualStyleBackColor = False
' '
'FlowLayoutPanel1
'
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, 60)
Me.FlowLayoutPanel1.TabIndex = 97
'
'btnHandling
'
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
'
'cboHandlingssatz
'
Me.cboHandlingssatz._allowedValuesFreiText = Nothing
Me.cboHandlingssatz._allowFreiText = False
Me.cboHandlingssatz._value = ""
Me.cboHandlingssatz.DropDownWidth = 300
Me.cboHandlingssatz.FormattingEnabled = True
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
'
'btnHandling_AMBAR
'
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
'
'cboHandlingssatz_AMBAR
'
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
'
'cbxHandlingAbrechnen 'cbxHandlingAbrechnen
' '
Me.cbxHandlingAbrechnen.AutoSize = True Me.cbxHandlingAbrechnen.AutoSize = True
Me.cbxHandlingAbrechnen.BackColor = System.Drawing.Color.WhiteSmoke 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.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.Location = New System.Drawing.Point(4, 102)
Me.cbxHandlingAbrechnen.Name = "cbxHandlingAbrechnen" Me.cbxHandlingAbrechnen.Name = "cbxHandlingAbrechnen"
Me.cbxHandlingAbrechnen.Size = New System.Drawing.Size(140, 17) Me.cbxHandlingAbrechnen.Size = New System.Drawing.Size(140, 17)
Me.cbxHandlingAbrechnen.TabIndex = 96 Me.cbxHandlingAbrechnen.TabIndex = 96
@@ -3017,6 +3009,25 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.SplitContainer.SplitterWidth = 2 Me.SplitContainer.SplitterWidth = 2
Me.SplitContainer.TabIndex = 3 Me.SplitContainer.TabIndex = 3
' '
'pnlHandling
'
Me.pnlHandling.Controls.Add(Me.cboHandlingssatz)
Me.pnlHandling.Controls.Add(Me.btnHandling)
Me.pnlHandling.Location = New System.Drawing.Point(3, 126)
Me.pnlHandling.Name = "pnlHandling"
Me.pnlHandling.Size = New System.Drawing.Size(163, 58)
Me.pnlHandling.TabIndex = 99
'
'pnlHandlingAmbar
'
Me.pnlHandlingAmbar.Controls.Add(Me.cboHandlingssatz_AMBAR)
Me.pnlHandlingAmbar.Controls.Add(Me.btnHandling_AMBAR)
Me.pnlHandlingAmbar.Location = New System.Drawing.Point(3, 122)
Me.pnlHandlingAmbar.Name = "pnlHandlingAmbar"
Me.pnlHandlingAmbar.Size = New System.Drawing.Size(159, 62)
Me.pnlHandlingAmbar.TabIndex = 36
Me.pnlHandlingAmbar.Visible = False
'
'usrCntlSpeditionsBuchSuche 'usrCntlSpeditionsBuchSuche
' '
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None
@@ -3040,7 +3051,6 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.Panel1.PerformLayout() Me.Panel1.PerformLayout()
Me.pnlBerichte.ResumeLayout(False) Me.pnlBerichte.ResumeLayout(False)
Me.pnlBerichte.PerformLayout() Me.pnlBerichte.PerformLayout()
Me.FlowLayoutPanel1.ResumeLayout(False)
Me.MenuStrip1.ResumeLayout(False) Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout() Me.MenuStrip1.PerformLayout()
Me.pnl.ResumeLayout(False) Me.pnl.ResumeLayout(False)
@@ -3063,6 +3073,8 @@ Partial Class usrCntlSpeditionsBuchSuche
Me.SplitContainer.Panel2.ResumeLayout(False) Me.SplitContainer.Panel2.ResumeLayout(False)
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer.ResumeLayout(False) Me.SplitContainer.ResumeLayout(False)
Me.pnlHandling.ResumeLayout(False)
Me.pnlHandlingAmbar.ResumeLayout(False)
Me.ResumeLayout(False) Me.ResumeLayout(False)
End Sub End Sub
@@ -3250,8 +3262,9 @@ Partial Class usrCntlSpeditionsBuchSuche
Friend WithEvents cbxfehlZahlung_AVISOID As CheckBox Friend WithEvents cbxfehlZahlung_AVISOID As CheckBox
Friend WithEvents cbxfehlZahlung_SENDUNG As CheckBox Friend WithEvents cbxfehlZahlung_SENDUNG As CheckBox
Friend WithEvents cbxHandlingAbrechnen As CheckBox Friend WithEvents cbxHandlingAbrechnen As CheckBox
Friend WithEvents FlowLayoutPanel1 As FlowLayoutPanel
Friend WithEvents CheckBox5 As CheckBox Friend WithEvents CheckBox5 As CheckBox
Friend WithEvents ToolStripMenuItem3 As ToolStripMenuItem Friend WithEvents ToolStripMenuItem3 As ToolStripMenuItem
Friend WithEvents btnnachLeistungsNr As Button Friend WithEvents btnnachLeistungsNr As Button
Friend WithEvents pnlHandling As Panel
Friend WithEvents pnlHandlingAmbar As Panel
End Class End Class

View File

@@ -129,9 +129,6 @@
<metadata name="MenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="MenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>546, 17</value> <value>546, 17</value>
</metadata> </metadata>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>431, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="ToolStripMenuItem3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ToolStripMenuItem3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>

View File

@@ -582,11 +582,9 @@ Public Class usrCntlSpeditionsBuchSuche
For Each p In pnlBerichte.Controls For Each p In pnlBerichte.Controls
p.Visible = False p.Visible = False
Next Next
btnHandling_AMBAR.Visible = True cbxHandlingAbrechnen.Visible = True
cboHandlingssatz_AMBAR.Visible = True pnlHandling.Visible = False
pnlHandlingAmbar.Visible = True
btnHandling.Visible = False
cboHandlingssatz.Visible = False
End If End If
@@ -2930,10 +2928,9 @@ Public Class usrCntlSpeditionsBuchSuche
If cbxHandlingAbrechnen.Checked Then If cbxHandlingAbrechnen.Checked Then
Select Case lstFiliale.SelectedItems.Count 'Select Case lstFiliale.SelectedItems.Count
Case 0 : MsgBox("Es muss mind. eine Filiale ausgewählt werden!") : Exit Sub ' Case 0 : MsgBox("Es muss mind. eine Filiale ausgewählt werden!") : Exit Sub
'End Select
End Select
createHandlingAbrechnung(dtAbrechnung, cboHandlingssatz_AMBAR._value, cboHandlingssatz_AMBAR._value, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text), anhang_path, HandlingList) createHandlingAbrechnung(dtAbrechnung, cboHandlingssatz_AMBAR._value, cboHandlingssatz_AMBAR._value, CDate(txtAbfertDat.Text), CDate(txtAbfertDatBis.Text), anhang_path, HandlingList)
End If End If
@@ -2978,14 +2975,27 @@ Public Class usrCntlSpeditionsBuchSuche
If frm.ShowDialog() = DialogResult.OK Then If frm.ShowDialog() = DialogResult.OK Then
Dim kdNr As Integer = -1 Dim kdNr As Integer = -1
Select Case anFirma.Trim() If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "AMBAR" Then
Case "UNISPED" : kdNr = 704028 Select Case anFirma.Trim()
Case "IMEX" : kdNr = 550574 Case "UNISPED" : kdNr = 3013303
Case "AMBAR" : kdNr = 725012 Case "IMEX" : kdNr = 3011904
Case Else Case "VERAG" : kdNr = 3013401
MsgBox("falscher Kunde!") Case Else
Return False MsgBox("falscher Kunde!")
End Select Return False
End Select
Else
Select Case anFirma.Trim()
Case "UNISPED" : kdNr = 704028
Case "IMEX" : kdNr = 550574
Case "AMBAR" : kdNr = 725012
Case Else
MsgBox("falscher Kunde!")
Return False
End Select
End If
Dim counter = 0 Dim counter = 0

View File

@@ -27,6 +27,8 @@ Partial Class frmMDM_USTVAntrag
Dim DataGridViewCellStyle1 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 DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.pnlBottom = New System.Windows.Forms.Panel() Me.pnlBottom = New System.Windows.Forms.Panel()
Me.lblVZAenderungsdatum = New System.Windows.Forms.Label()
Me.Label20 = New System.Windows.Forms.Label()
Me.pbXMLExport = New System.Windows.Forms.PictureBox() Me.pbXMLExport = New System.Windows.Forms.PictureBox()
Me.btnRMCQuartal = New System.Windows.Forms.Button() Me.btnRMCQuartal = New System.Windows.Forms.Button()
Me.Label18 = New System.Windows.Forms.Label() Me.Label18 = New System.Windows.Forms.Label()
@@ -122,7 +124,6 @@ Partial Class frmMDM_USTVAntrag
Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.pnlAntragsPosDetails = New System.Windows.Forms.Panel() Me.pnlAntragsPosDetails = New System.Windows.Forms.Panel()
Me.Panel2 = New System.Windows.Forms.Panel() Me.Panel2 = New System.Windows.Forms.Panel()
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
Me.Panel4 = New System.Windows.Forms.Panel() Me.Panel4 = New System.Windows.Forms.Panel()
Me.cbxKIUploaddelete = New System.Windows.Forms.CheckBox() Me.cbxKIUploaddelete = New System.Windows.Forms.CheckBox()
Me.scanUSTVA = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan() Me.scanUSTVA = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan()
@@ -133,7 +134,6 @@ Partial Class frmMDM_USTVAntrag
Me.Panel3 = New System.Windows.Forms.Panel() Me.Panel3 = New System.Windows.Forms.Panel()
Me.dgvErstattungspositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.dgvErstattungspositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.pnlErstattungsdetails = New System.Windows.Forms.Panel() Me.pnlErstattungsdetails = New System.Windows.Forms.Panel()
Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition()
Me.Panel1 = New System.Windows.Forms.Panel() Me.Panel1 = New System.Windows.Forms.Panel()
Me.Button2 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button()
@@ -150,6 +150,8 @@ Partial Class frmMDM_USTVAntrag
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
Me.FakturiertToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.FakturiertToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition()
Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition()
Me.pnlBottom.SuspendLayout() Me.pnlBottom.SuspendLayout()
CType(Me.pbXMLExport, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.pbXMLExport, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.pbMail, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.pbMail, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -182,6 +184,8 @@ Partial Class frmMDM_USTVAntrag
' '
Me.pnlBottom.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer)) Me.pnlBottom.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.pnlBottom.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.pnlBottom.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.pnlBottom.Controls.Add(Me.lblVZAenderungsdatum)
Me.pnlBottom.Controls.Add(Me.Label20)
Me.pnlBottom.Controls.Add(Me.pbXMLExport) Me.pnlBottom.Controls.Add(Me.pbXMLExport)
Me.pnlBottom.Controls.Add(Me.btnRMCQuartal) Me.pnlBottom.Controls.Add(Me.btnRMCQuartal)
Me.pnlBottom.Controls.Add(Me.Label18) Me.pnlBottom.Controls.Add(Me.Label18)
@@ -200,11 +204,31 @@ Partial Class frmMDM_USTVAntrag
Me.pnlBottom.Controls.Add(Me.Button1) Me.pnlBottom.Controls.Add(Me.Button1)
Me.pnlBottom.Controls.Add(Me.lbl_EintrageVerarbetiet) Me.pnlBottom.Controls.Add(Me.lbl_EintrageVerarbetiet)
Me.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom Me.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom
Me.pnlBottom.Location = New System.Drawing.Point(0, 667) Me.pnlBottom.Location = New System.Drawing.Point(0, 663)
Me.pnlBottom.Name = "pnlBottom" Me.pnlBottom.Name = "pnlBottom"
Me.pnlBottom.Size = New System.Drawing.Size(1444, 100) Me.pnlBottom.Size = New System.Drawing.Size(1444, 100)
Me.pnlBottom.TabIndex = 3 Me.pnlBottom.TabIndex = 3
' '
'lblVZAenderungsdatum
'
Me.lblVZAenderungsdatum.ForeColor = System.Drawing.Color.Black
Me.lblVZAenderungsdatum.Location = New System.Drawing.Point(304, 67)
Me.lblVZAenderungsdatum.Name = "lblVZAenderungsdatum"
Me.lblVZAenderungsdatum.Size = New System.Drawing.Size(224, 19)
Me.lblVZAenderungsdatum.TabIndex = 58
Me.lblVZAenderungsdatum.Text = "-"
Me.lblVZAenderungsdatum.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Label20
'
Me.Label20.ForeColor = System.Drawing.Color.Black
Me.Label20.Location = New System.Drawing.Point(186, 67)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(112, 19)
Me.Label20.TabIndex = 57
Me.Label20.Text = "VZ-Änderungsdatum:"
Me.Label20.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'pbXMLExport 'pbXMLExport
' '
Me.pbXMLExport.Image = Global.SDL.My.Resources.Resources.xml Me.pbXMLExport.Image = Global.SDL.My.Resources.Resources.xml
@@ -1602,7 +1626,7 @@ Partial Class frmMDM_USTVAntrag
Me.pnlBody.Controls.Add(Me.TabControl1) Me.pnlBody.Controls.Add(Me.TabControl1)
Me.pnlBody.Location = New System.Drawing.Point(0, 230) Me.pnlBody.Location = New System.Drawing.Point(0, 230)
Me.pnlBody.Name = "pnlBody" Me.pnlBody.Name = "pnlBody"
Me.pnlBody.Size = New System.Drawing.Size(1444, 437) Me.pnlBody.Size = New System.Drawing.Size(1444, 433)
Me.pnlBody.TabIndex = 1 Me.pnlBody.TabIndex = 1
' '
'TabControl1 'TabControl1
@@ -1613,7 +1637,7 @@ Partial Class frmMDM_USTVAntrag
Me.TabControl1.Location = New System.Drawing.Point(0, 0) Me.TabControl1.Location = New System.Drawing.Point(0, 0)
Me.TabControl1.Name = "TabControl1" Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0 Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(1442, 435) Me.TabControl1.Size = New System.Drawing.Size(1442, 431)
Me.TabControl1.TabIndex = 1 Me.TabControl1.TabIndex = 1
' '
'TabPage1 'TabPage1
@@ -1623,7 +1647,7 @@ Partial Class frmMDM_USTVAntrag
Me.TabPage1.Location = New System.Drawing.Point(4, 22) Me.TabPage1.Location = New System.Drawing.Point(4, 22)
Me.TabPage1.Name = "TabPage1" Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage1.Size = New System.Drawing.Size(1434, 409) Me.TabPage1.Size = New System.Drawing.Size(1434, 405)
Me.TabPage1.TabIndex = 0 Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Antragspositionen" Me.TabPage1.Text = "Antragspositionen"
Me.TabPage1.UseVisualStyleBackColor = True Me.TabPage1.UseVisualStyleBackColor = True
@@ -1646,14 +1670,14 @@ Partial Class frmMDM_USTVAntrag
Me.dgvUSTVPositionen.RowHeadersVisible = False Me.dgvUSTVPositionen.RowHeadersVisible = False
Me.dgvUSTVPositionen.RowHeadersWidth = 62 Me.dgvUSTVPositionen.RowHeadersWidth = 62
Me.dgvUSTVPositionen.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect Me.dgvUSTVPositionen.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvUSTVPositionen.Size = New System.Drawing.Size(1428, 134) Me.dgvUSTVPositionen.Size = New System.Drawing.Size(1428, 130)
Me.dgvUSTVPositionen.TabIndex = 0 Me.dgvUSTVPositionen.TabIndex = 0
' '
'pnlAntragsPosDetails 'pnlAntragsPosDetails
' '
Me.pnlAntragsPosDetails.Controls.Add(Me.Panel2) Me.pnlAntragsPosDetails.Controls.Add(Me.Panel2)
Me.pnlAntragsPosDetails.Dock = System.Windows.Forms.DockStyle.Bottom Me.pnlAntragsPosDetails.Dock = System.Windows.Forms.DockStyle.Bottom
Me.pnlAntragsPosDetails.Location = New System.Drawing.Point(3, 143) Me.pnlAntragsPosDetails.Location = New System.Drawing.Point(3, 139)
Me.pnlAntragsPosDetails.Name = "pnlAntragsPosDetails" Me.pnlAntragsPosDetails.Name = "pnlAntragsPosDetails"
Me.pnlAntragsPosDetails.Size = New System.Drawing.Size(1428, 263) Me.pnlAntragsPosDetails.Size = New System.Drawing.Size(1428, 263)
Me.pnlAntragsPosDetails.TabIndex = 2 Me.pnlAntragsPosDetails.TabIndex = 2
@@ -1670,14 +1694,6 @@ Partial Class frmMDM_USTVAntrag
Me.Panel2.Size = New System.Drawing.Size(1428, 263) Me.Panel2.Size = New System.Drawing.Size(1428, 263)
Me.Panel2.TabIndex = 1 Me.Panel2.TabIndex = 1
' '
'UstCntlUSTV_AntragPosition1
'
Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(154, 0)
Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1272, 261)
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
'
'Panel4 'Panel4
' '
Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke
@@ -1823,14 +1839,6 @@ Partial Class frmMDM_USTVAntrag
Me.pnlErstattungsdetails.Size = New System.Drawing.Size(1426, 261) Me.pnlErstattungsdetails.Size = New System.Drawing.Size(1426, 261)
Me.pnlErstattungsdetails.TabIndex = 0 Me.pnlErstattungsdetails.TabIndex = 0
' '
'UstCntlUSTV_AntragErstattungen1
'
Me.UstCntlUSTV_AntragErstattungen1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UstCntlUSTV_AntragErstattungen1.Location = New System.Drawing.Point(154, 0)
Me.UstCntlUSTV_AntragErstattungen1.Name = "UstCntlUSTV_AntragErstattungen1"
Me.UstCntlUSTV_AntragErstattungen1.Size = New System.Drawing.Size(1270, 259)
Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2
'
'Panel1 'Panel1
' '
Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke
@@ -1902,13 +1910,13 @@ Partial Class frmMDM_USTVAntrag
'AktivierenToolStripMenuItem 'AktivierenToolStripMenuItem
' '
Me.AktivierenToolStripMenuItem.Name = "AktivierenToolStripMenuItem" Me.AktivierenToolStripMenuItem.Name = "AktivierenToolStripMenuItem"
Me.AktivierenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.AktivierenToolStripMenuItem.Size = New System.Drawing.Size(138, 22)
Me.AktivierenToolStripMenuItem.Text = "aktivieren" Me.AktivierenToolStripMenuItem.Text = "aktivieren"
' '
'DeaktivierenToolStripMenuItem 'DeaktivierenToolStripMenuItem
' '
Me.DeaktivierenToolStripMenuItem.Name = "DeaktivierenToolStripMenuItem" Me.DeaktivierenToolStripMenuItem.Name = "DeaktivierenToolStripMenuItem"
Me.DeaktivierenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.DeaktivierenToolStripMenuItem.Size = New System.Drawing.Size(138, 22)
Me.DeaktivierenToolStripMenuItem.Text = "deaktivieren" Me.DeaktivierenToolStripMenuItem.Text = "deaktivieren"
' '
'FakturiertZurücksetzenToolStripMenuItem 'FakturiertZurücksetzenToolStripMenuItem
@@ -1921,7 +1929,7 @@ Partial Class frmMDM_USTVAntrag
' '
Me.ncs_Belege.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1, Me.FakturiertToolStripMenuItem}) Me.ncs_Belege.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1, Me.FakturiertToolStripMenuItem})
Me.ncs_Belege.Name = "cns_vorauszahlen" Me.ncs_Belege.Name = "cns_vorauszahlen"
Me.ncs_Belege.Size = New System.Drawing.Size(196, 70) Me.ncs_Belege.Size = New System.Drawing.Size(196, 48)
' '
'ToolStripMenuItem1 'ToolStripMenuItem1
' '
@@ -1949,11 +1957,27 @@ Partial Class frmMDM_USTVAntrag
Me.FakturiertToolStripMenuItem.Text = "Fakturiert zurücksetzen" Me.FakturiertToolStripMenuItem.Text = "Fakturiert zurücksetzen"
Me.FakturiertToolStripMenuItem.Visible = False Me.FakturiertToolStripMenuItem.Visible = False
' '
'UstCntlUSTV_AntragPosition1
'
Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(154, 0)
Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1"
Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1272, 261)
Me.UstCntlUSTV_AntragPosition1.TabIndex = 0
'
'UstCntlUSTV_AntragErstattungen1
'
Me.UstCntlUSTV_AntragErstattungen1.Dock = System.Windows.Forms.DockStyle.Fill
Me.UstCntlUSTV_AntragErstattungen1.Location = New System.Drawing.Point(154, 0)
Me.UstCntlUSTV_AntragErstattungen1.Name = "UstCntlUSTV_AntragErstattungen1"
Me.UstCntlUSTV_AntragErstattungen1.Size = New System.Drawing.Size(1270, 259)
Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2
'
'frmMDM_USTVAntrag 'frmMDM_USTVAntrag
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1444, 767) Me.ClientSize = New System.Drawing.Size(1444, 763)
Me.Controls.Add(Me.pnlHeader) Me.Controls.Add(Me.pnlHeader)
Me.Controls.Add(Me.pnlBody) Me.Controls.Add(Me.pnlBody)
Me.Controls.Add(Me.pnlBottom) Me.Controls.Add(Me.pnlBottom)
@@ -2123,4 +2147,6 @@ Partial Class frmMDM_USTVAntrag
Friend WithEvents btnSortNachLeist As Button Friend WithEvents btnSortNachLeist As Button
Friend WithEvents txtVZOffen As VERAG_PROG_ALLGEMEIN.MyTextBox Friend WithEvents txtVZOffen As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label19 As Label Friend WithEvents Label19 As Label
Friend WithEvents lblVZAenderungsdatum As Label
Friend WithEvents Label20 As Label
End Class End Class

View File

@@ -60,14 +60,14 @@ Public Class frmMDM_USTVAntrag
lblGesamtUSteuer.Text="-" lblGesamtUSteuer.Text="-"
lblGesamtErstattung.Text = "-" lblGesamtErstattung.Text = "-"
lblDiffernezbetrag.Text = "-" lblDiffernezbetrag.Text = "-"
lblVZAenderungsdatum.Text = "-"
btnAntrageeinarbeiten.Enabled = Not UStVAn_ID <= 0 btnAntrageeinarbeiten.Enabled = Not UStVAn_ID <= 0
FlowLayoutPanel.Enabled= Not UStVAn_ID <= 0 FlowLayoutPanel.Enabled= Not UStVAn_ID <= 0
btnEintragloeschen.Enabled= Not UStVAn_ID <= 0 btnEintragloeschen.Enabled= Not UStVAn_ID <= 0
btnNeuerEintrag.Enabled= Not UStVAn_ID <= 0 btnNeuerEintrag.Enabled= Not UStVAn_ID <= 0
UstCntlUSTV_AntragPosition1.Enabled= Not UStVAn_ID <= 0 UstCntlUSTV_AntragPosition1.Enabled= Not UStVAn_ID <= 0
cbxLand.Visible= UStVAn_ID <= 0 cbxLand.Visible = UStVAn_ID <= 0
With dgvUSTVPositionen With dgvUSTVPositionen
.ClearSelection() .ClearSelection()
@@ -289,57 +289,68 @@ Public Class frmMDM_USTVAntrag
Antrag_LandKz = SQL.DLookup("LandKz", "[Länderverzeichnis für die Außenhandelsstatistik]", "Landnr='" & USTV_ANTRAG.UStVAn_LandNr & "'", "FMZOLL") Antrag_LandKz = SQL.DLookup("LandKz", "[Länderverzeichnis für die Außenhandelsstatistik]", "Landnr='" & USTV_ANTRAG.UStVAn_LandNr & "'", "FMZOLL")
setValue(USTV_ANTRAG) setValue(USTV_ANTRAG)
If USTV_ANTRAG.UStVAn_letzteAenderung IsNot Nothing AndAlso Not IsDBNull(USTV_ANTRAG.UStVAn_letzteAenderung) Then
lblVZAenderungsdatum.Text = CDate(USTV_ANTRAG.UStVAn_letzteAenderung).ToString
End If
If USTV_ANTRAG.UStVAn_letzteAenderungUser IsNot Nothing AndAlso Not IsDBNull(USTV_ANTRAG.UStVAn_letzteAenderungUser) Then
lblVZAenderungsdatum.Text &= "(" & USTV_ANTRAG.UStVAn_letzteAenderungUser & ")"
End If
Dim KUNDE As New cKunde(USTV_ANTRAG.UStVAn_KuNr) Dim KUNDE As New cKunde(USTV_ANTRAG.UStVAn_KuNr)
Dim KUNDE_ERW As New cKundenErweitert(USTV_ANTRAG.UStVAn_KuNr) Dim KUNDE_ERW As New cKundenErweitert(USTV_ANTRAG.UStVAn_KuNr)
If KUNDE IsNot Nothing Then If KUNDE IsNot Nothing Then
pnlHeader.BackColor = Color.FromArgb(0, 54, 128) pnlHeader.BackColor = Color.FromArgb(0, 54, 128)
If KUNDE.Abfertigungsverbot Then pnlHeader.BackColor = Color.IndianRed If KUNDE.Abfertigungsverbot Then pnlHeader.BackColor = Color.IndianRed
Else
pnlHeader.BackColor = Color.FromArgb(0, 54, 128)
End If
If USTV_ANTRAG.UStVAn_AntragEingereichtAm IsNot Nothing AndAlso IsDate(USTV_ANTRAG.UStVAn_AntragEingereichtAm) Then
looked = True
Else
looked = False
End If
lookFields(looked)
If KUNDE_ERW IsNot Nothing Then
If KUNDE_ERW.kde_MWStAbrechnung <> "" Then
lblMWSTAntrag.Text = KUNDE_ERW.kde_MWStAbrechnung
Else Else
lblMWSTAntrag.Text = "" pnlHeader.BackColor = Color.FromArgb(0, 54, 128)
End If End If
If KUNDE_ERW.kde_AnmerkungAntrag IsNot Nothing AndAlso KUNDE_ERW.kde_AnmerkungAntrag <> "" Then lblMWSTAntrag.Text &= " - " & KUNDE_ERW.kde_AnmerkungAntrag
End If
If USTV_ANTRAG.FilialenNr IsNot Nothing AndAlso USTV_ANTRAG.FilialenNr > 0 AndAlso USTV_ANTRAG.AbfertigungsNr IsNot Nothing AndAlso USTV_ANTRAG.AbfertigungsNr > 0 Then If USTV_ANTRAG.UStVAn_AntragEingereichtAm IsNot Nothing AndAlso IsDate(USTV_ANTRAG.UStVAn_AntragEingereichtAm) Then
Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr, 0) looked = True
If spedBuch.hasEntry Then Else
looked = False
End If
If CInt(SQL.getValueTxtBySql("select COUNT(*) from Rechnungsausgang where FilialenNr = " & USTV_ANTRAG.FilialenNr & " and AbfertigungsNr = " & USTV_ANTRAG.AbfertigungsNr & " and Firma_ID = 19 and DruckDatumZeit is not null", "FMZOLL",,, "0")) > 0 Then lookFields(looked)
pb_Beleg.Visible = True
If KUNDE_ERW IsNot Nothing Then
If KUNDE_ERW.kde_MWStAbrechnung <> "" Then
lblMWSTAntrag.Text = KUNDE_ERW.kde_MWStAbrechnung
Else Else
pb_Beleg.Visible = False lblMWSTAntrag.Text = ""
End If End If
If KUNDE_ERW.kde_AnmerkungAntrag IsNot Nothing AndAlso KUNDE_ERW.kde_AnmerkungAntrag <> "" Then lblMWSTAntrag.Text &= " - " & KUNDE_ERW.kde_AnmerkungAntrag
End If
Button4.Text = "Sped.-Buch anzeigen" If USTV_ANTRAG.FilialenNr IsNot Nothing AndAlso USTV_ANTRAG.FilialenNr > 0 AndAlso USTV_ANTRAG.AbfertigungsNr IsNot Nothing AndAlso USTV_ANTRAG.AbfertigungsNr > 0 Then
Button5.Visible = True Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr, 0)
If spedBuch.hasEntry Then
If CInt(SQL.getValueTxtBySql("select COUNT(*) from Rechnungsausgang where FilialenNr = " & USTV_ANTRAG.FilialenNr & " and AbfertigungsNr = " & USTV_ANTRAG.AbfertigungsNr & " and Firma_ID = 19 and DruckDatumZeit is not null", "FMZOLL",,, "0")) > 0 Then
pb_Beleg.Visible = True
Else
pb_Beleg.Visible = False
End If
Button4.Text = "Sped.-Buch anzeigen"
Button5.Visible = True
Else
Button4.Text = "Sped.-Buch eintragen"
Button5.Visible = False
End If
Else Else
Button4.Text = "Sped.-Buch eintragen" Button4.Text = "Sped.-Buch eintragen"
Button5.Visible = False Button5.Visible = False
End If End If
Else
Button4.Text = "Sped.-Buch eintragen"
Button5.Visible = False
End If End If
End If
If posIndex > 0 Then If posIndex > 0 Then
posIndex = posIndex - 1 posIndex = posIndex - 1
If posIndex > 0 And dgvUSTVPositionen.Rows.Count > posIndex Then If posIndex > 0 And dgvUSTVPositionen.Rows.Count > posIndex Then
dgvUSTVPositionen.ClearSelection() dgvUSTVPositionen.ClearSelection()
@@ -3401,6 +3412,11 @@ Public Class frmMDM_USTVAntrag
.Columns("Berufungshöhe").HeaderText = "BE-Höhe" .Columns("Berufungshöhe").HeaderText = "BE-Höhe"
.Columns("Berufungsgrund").HeaderText = "BE-Grund" .Columns("Berufungsgrund").HeaderText = "BE-Grund"
.Columns("Berufungsdatum").Visible = False
.Columns("Berufungshöhe").Visible = False
.Columns("Berufungsgrund").Visible = False
.Columns("UStVEr_VZ").HeaderText = "VZ" .Columns("UStVEr_VZ").HeaderText = "VZ"
.Columns("UStVEr_RZVZ").HeaderText = "RZVZ" .Columns("UStVEr_RZVZ").HeaderText = "RZVZ"
.Columns("UStVEr_Bank").HeaderText = "Bank" .Columns("UStVEr_Bank").HeaderText = "Bank"
@@ -3870,7 +3886,7 @@ Public Class frmMDM_USTVAntrag
Next Next
If setUSTVA Then SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1, UStVAn_letzteAenderung = getDate(), UStVAn_letzteAenderung_User = '" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & "' WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0)", "FMZOLL") 'Aktualisierung If setUSTVA Then SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1, UStVAn_letzteAenderung = getDate(), UStVAn_letzteAenderungUser = '" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & "' WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0)", "FMZOLL") 'Aktualisierung
init() init()
End If End If
@@ -3906,7 +3922,7 @@ Public Class frmMDM_USTVAntrag
Dim count_nichtAbgerVZ As Integer = -1 Dim count_nichtAbgerVZ As Integer = -1
count_nichtAbgerVZ = CInt(SQL.getValueTxtBySql("SELECT COUNT(*) FROM [tblUStVPositionen] WHERE [UStVAn_ID] = " & USTV_ANTRAG.UStVAn_ID & " and [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) = 0", "FMZOLL")) count_nichtAbgerVZ = CInt(SQL.getValueTxtBySql("SELECT COUNT(*) FROM [tblUStVPositionen] WHERE [UStVAn_ID] = " & USTV_ANTRAG.UStVAn_ID & " and [UStVPo_VZ] = 1 and isnull(UStVPo_VZ_RKID,0) = 0", "FMZOLL"))
If count_nichtAbgerVZ = 0 Then If count_nichtAbgerVZ = 0 Then
SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 0, UStVAn_letzteAenderung = getDate(), UStVAn_letzteAenderung_User = '" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & "' WHERE [UStVAn_ID] =" & USTV_ANTRAG.UStVAn_ID, "FMZOLL") SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 0, UStVAn_letzteAenderung = getDate(), UStVAn_letzteAenderungUser = '" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & "' WHERE [UStVAn_ID] =" & USTV_ANTRAG.UStVAn_ID, "FMZOLL")
End If End If
init() init()
@@ -4000,7 +4016,7 @@ Public Class frmMDM_USTVAntrag
Next Next
SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1, UStVAn_letzteAenderung = getDate(), UStVAn_letzteAenderung_User = '" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & "' WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0)", "FMZOLL") 'Aktualisierung SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1, UStVAn_letzteAenderung = getDate(), UStVAn_letzteAenderungUser = '" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & "' WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0)", "FMZOLL") 'Aktualisierung
init() init()
End If End If

View File

@@ -2065,7 +2065,8 @@ Public Class usrCntlUSTV
.btnPreisliste.Visible = False .btnPreisliste.Visible = False
.dgvHandling.RowHeadersVisible = False .dgvHandling.RowHeadersVisible = False
.Button2.Text = "Importieren" .Button2.Text = "Importieren"
.cbxDivers.Visible = True
.cbxDivers.Text = "VZ und RZ-Beträge im Antrag erhöhen"
End With End With
frm.ShowDialog() frm.ShowDialog()
@@ -2073,108 +2074,120 @@ Public Class usrCntlUSTV
If frm.DialogResult = DialogResult.OK Then If frm.DialogResult = DialogResult.OK Then
For Each r As DataRow In dt.Rows For Each r As DataGridViewRow In frm.dgvHandling.SelectedRows
Dim BelegNr = r.Item("BelegNr") Dim BelegNr = r.Cells("BelegNr").Value
Dim USTV_ANTRAG = New VERAG_PROG_ALLGEMEIN.cUSTVAntrag(r.Item("AntragID")) Dim USTV_ANTRAG = New VERAG_PROG_ALLGEMEIN.cUSTVAntrag(r.Cells("AntragID").Value)
If USTV_ANTRAG.hasEntry Then If USTV_ANTRAG.hasEntry Then
If r.Item("3470").ToString.ToLower = "ja" Then If r.Cells("3470").Value.ToString.ToLower = "ja" Then
USTV_ANTRAG.UStVAn_Sicherheit = True USTV_ANTRAG.UStVAn_Sicherheit = True
End If End If
Dim updateVURZ As Boolean = False
updateVURZ = frm.cbxDivers.Checked
Dim UStV_ERS = New VERAG_PROG_ALLGEMEIN.cUStVErstattungPositionen(Belegdatum, BelegNr, fd.FileName) Dim UStV_ERS = New VERAG_PROG_ALLGEMEIN.cUStVErstattungPositionen(Belegdatum, BelegNr, fd.SafeFileName)
If Not UStV_ERS.hasEntry Then If Not UStV_ERS.hasEntry Then
Dim isVZ As Boolean = False Dim isVZ As Boolean = False
UStV_ERS.UStVEr_ID = USTV_ANTRAG.getMaxPosNrErst() UStV_ERS.UStVEr_ID = USTV_ANTRAG.getMaxPosNrErst()
UStV_ERS.UStVEr_interneNr = USTV_ANTRAG.getMaxinternePosNrErst() UStV_ERS.UStVEr_interneNr = USTV_ANTRAG.getMaxinternePosNrErst()
UStV_ERS.UStVAn_ID = USTV_ANTRAG.UStVAn_ID UStV_ERS.UStVAn_ID = USTV_ANTRAG.UStVAn_ID
UStV_ERS.Belegnummer = BelegNr UStV_ERS.Belegnummer = BelegNr
UStV_ERS.UStVEr_USteuerbetragEUR = r.Item("BetragEUR") UStV_ERS.UStVEr_USteuerbetragEUR = r.Cells("BetragEUR").Value
UStV_ERS.UStVEr_Importfilename = fd.SafeFileName UStV_ERS.UStVEr_Importfilename = fd.SafeFileName
UStV_ERS.UStVEr_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME UStV_ERS.UStVEr_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
UStV_ERS.UStVEr_Zeitstempel = Now UStV_ERS.UStVEr_Zeitstempel = Now
If USTV_ANTRAG.UStVAn_Währungscode <> "EUR" Then If USTV_ANTRAG.UStVAn_Währungscode <> "EUR" Then
Dim kurs As New cEZB_Waehrungskurse(USTV_ANTRAG.UStVAn_Währungscode) Dim kurs As New cEZB_Waehrungskurse(USTV_ANTRAG.UStVAn_Währungscode)
UStV_ERS.UStVEr_USteuerbetrag = System.Math.Round(kurs.EXCHANGE_EURTOCUR(UStV_ERS.UStVEr_USteuerbetragEUR, USTV_ANTRAG.UStVAn_Währungscode, CDate(Belegdatum)), 2) UStV_ERS.UStVEr_USteuerbetrag = System.Math.Round(kurs.EXCHANGE_EURTOCUR(UStV_ERS.UStVEr_USteuerbetragEUR, USTV_ANTRAG.UStVAn_Währungscode, CDate(Belegdatum)), 2)
UStV_ERS.UStVEr_Umrechnungskurs = Math.floor((CDbl(UStV_ERS.UStVEr_USteuerbetrag) / CDbl(UStV_ERS.UStVEr_USteuerbetragEUR) * 100 + 0.5)) / 100 UStV_ERS.UStVEr_Umrechnungskurs = Math.floor((CDbl(UStV_ERS.UStVEr_USteuerbetrag) / CDbl(UStV_ERS.UStVEr_USteuerbetragEUR) * 100 + 0.5)) / 100
Else Else
UStV_ERS.UStVEr_USteuerbetrag = r.Item("BetragEUR") UStV_ERS.UStVEr_USteuerbetrag = r.Cells("BetragEUR").Value
UStV_ERS.UStVEr_Umrechnungskurs = 1 UStV_ERS.UStVEr_Umrechnungskurs = 1
End If End If
Dim Bemerkung As String = "" Dim Bemerkung As String = ""
If Not String.IsNullOrWhiteSpace(r.Item("VZ")) AndAlso IsNumeric(r.Item("VZ")) AndAlso Not IsDBNull(r.Item("VZ")) AndAlso CDbl(r.Item("VZ")) <> 0 Then If Not String.IsNullOrWhiteSpace(r.Cells("VZ").Value) AndAlso IsNumeric(r.Cells("VZ").Value) AndAlso Not IsDBNull(r.Cells("VZ").Value) AndAlso CDbl(r.Cells("VZ").Value) <> 0 Then
Bemerkung &= "VZ: " & CDbl(r.Item("VZ")).ToString("N2") & " " & USTV_ANTRAG.UStVAn_Währungscode Bemerkung &= "VZ: " & CDbl(r.Cells("VZ").Value).ToString("N2") & " " & USTV_ANTRAG.UStVAn_Währungscode
isVZ = True isVZ = True
UStV_ERS.UStVEr_VZ = CDbl(r.Item("VZ")) UStV_ERS.UStVEr_VZ = CDbl(r.Cells("VZ").Value)
If USTV_ANTRAG.UStVAn_VZBetrag Is Nothing OrElse IsNothing(USTV_ANTRAG.UStVAn_VZBetrag) Then If updateVURZ Then
If USTV_ANTRAG.UStVAn_VZBetrag Is Nothing OrElse IsDBNull(USTV_ANTRAG.UStVAn_VZBetrag) Then
USTV_ANTRAG.UStVAn_VZBetrag = UStV_ERS.UStVEr_VZ USTV_ANTRAG.UStVAn_VZBetrag = UStV_ERS.UStVEr_VZ
Else
USTV_ANTRAG.UStVAn_VZBetrag += UStV_ERS.UStVEr_VZ
End If End If
End If End If
If Not String.IsNullOrWhiteSpace(r.Item("Bank")) AndAlso IsNumeric(r.Item("Bank")) AndAlso Not IsDBNull(r.Item("Bank")) AndAlso CDbl(r.Item("Bank")) <> 0 Then
Bemerkung &= ", a.K. : " & CDbl(r.Item("Bank")).ToString("N2") & " " & USTV_ANTRAG.UStVAn_Währungscode End If
UStV_ERS.UStVEr_Bank = CDbl(r.Item("Bank"))
End If If Not String.IsNullOrWhiteSpace(r.Cells("Bank").Value) AndAlso IsNumeric(r.Cells("Bank").Value) AndAlso Not IsDBNull(r.Cells("Bank")) AndAlso CDbl(r.Cells("Bank").Value) <> 0 Then
Bemerkung &= ", a.K. : " & CDbl(r.Cells("Bank").Value).ToString("N2") & " " & USTV_ANTRAG.UStVAn_Währungscode
UStV_ERS.UStVEr_Bank = CDbl(r.Cells("Bank").Value)
End If
If isVZ Then If isVZ Then
If Not String.IsNullOrWhiteSpace(r.Item("VZDiff")) AndAlso IsNumeric(r.Item("VZDiff")) AndAlso Not IsDBNull(r.Item("VZDiff")) AndAlso CDbl(r.Item("VZDiff")) <> 0 Then If Not String.IsNullOrWhiteSpace(r.Cells("VZDiff").Value) AndAlso IsNumeric(r.Cells("VZDiff")) AndAlso Not IsDBNull(r.Cells("VZDiff")) AndAlso CDbl(r.Cells("VZDiff").Value) <> 0 Then
Bemerkung &= ", VZDiff: " & CDbl(r.Item("VZDiff")).ToString("N2") Bemerkung &= ", VZDiff: " & CDbl(r.Cells("VZDiff").Value).ToString("N2")
UStV_ERS.UStVEr_Differenz = CDbl(r.Item("VZDiff")) UStV_ERS.UStVEr_Differenz = CDbl(r.Cells("VZDiff").Value)
End If End If
Else Else
If Not String.IsNullOrWhiteSpace(r.Item("Diff")) AndAlso IsNumeric(r.Item("Diff")) AndAlso Not IsDBNull(r.Item("Diff")) AndAlso CDbl(r.Item("Diff")) <> 0 Then If Not String.IsNullOrWhiteSpace(r.Cells("Diff").Value) AndAlso IsNumeric(r.Cells("Diff")) AndAlso Not IsDBNull(r.Cells("Diff")) AndAlso CDbl(r.Cells("Diff").Value) <> 0 Then
Bemerkung &= ", Diff: " & CDbl(r.Item("Diff")).ToString("N2") Bemerkung &= ", Diff: " & CDbl(r.Cells("Diff").Value).ToString("N2")
UStV_ERS.UStVEr_Differenz = CDbl(r.Item("Diff")) UStV_ERS.UStVEr_Differenz = CDbl(r.Cells("Diff").Value)
End If End If
End If End If
If Not String.IsNullOrWhiteSpace(r.Item("RZVZ")) AndAlso IsNumeric(r.Item("RZVZ")) AndAlso Not IsDBNull(r.Item("RZVZ")) AndAlso CDbl(r.Item("RZVZ")) <> 0 Then If Not String.IsNullOrWhiteSpace(r.Cells("RZVZ").Value) AndAlso IsNumeric(r.Cells("RZVZ")) AndAlso Not IsDBNull(r.Cells("RZVZ")) AndAlso CDbl(r.Cells("RZVZ").Value) <> 0 Then
UStV_ERS.UStVEr_RZVZ = CDbl(r.Item("RZVZ")).ToString("N2") UStV_ERS.UStVEr_RZVZ = CDbl(r.Cells("RZVZ").Value).ToString("N2")
If USTV_ANTRAG.UStVAn_RZBetragVZ Is Nothing OrElse IsDBNull(USTV_ANTRAG.UStVAn_RZBetragVZ) Then If updateVURZ Then
USTV_ANTRAG.UStVAn_RZBetragVZ = UStV_ERS.UStVEr_RZVZ If USTV_ANTRAG.UStVAn_RZBetragVZ Is Nothing OrElse IsDBNull(USTV_ANTRAG.UStVAn_RZBetragVZ) Then
USTV_ANTRAG.UStVAn_RZBetragVZ = UStV_ERS.UStVEr_RZVZ
Else
USTV_ANTRAG.UStVAn_RZBetragVZ += UStV_ERS.UStVEr_RZVZ
End If
End If End If
End If End If
If Bemerkung <> "" Then If Bemerkung <> "" Then
If Bemerkung.StartsWith(", ") Then If Bemerkung.StartsWith(", ") Then
Bemerkung = Bemerkung.Remove(0, 2) Bemerkung = Bemerkung.Remove(0, 2)
End If
UStV_ERS.Bemerkung = Bemerkung
End If End If
UStV_ERS.Bemerkung = Bemerkung
If UStV_ERS.SAVE() Then
USTV_ANTRAG.UStVAn_MWSTEingang_offen = True
USTV_ANTRAG.SAVE()
counter += 1
End If
End If End If
If UStV_ERS.SAVE() Then
USTV_ANTRAG.UStVAn_MWSTEingang_offen = True
USTV_ANTRAG.SAVE()
counter += 1
End If
End If End If
Next
importiert = True End If
Next
importiert = True
MsgBox(counter & " von " & dt.Rows.Count & " erfolgreich importiert!") MsgBox(counter & " von " & dt.Rows.Count & " erfolgreich importiert!")
End If End If

View File

@@ -541,6 +541,8 @@ Partial Class ustCntlUSTV_AntragPosition
Me.cbxAntragsfilter._showdate = False Me.cbxAntragsfilter._showdate = False
Me.cbxAntragsfilter._value = "" Me.cbxAntragsfilter._value = ""
Me.cbxAntragsfilter.AutoSize = True Me.cbxAntragsfilter.AutoSize = True
Me.cbxAntragsfilter.Checked = True
Me.cbxAntragsfilter.CheckState = System.Windows.Forms.CheckState.Checked
Me.cbxAntragsfilter.Location = New System.Drawing.Point(779, 29) Me.cbxAntragsfilter.Location = New System.Drawing.Point(779, 29)
Me.cbxAntragsfilter.Name = "cbxAntragsfilter" Me.cbxAntragsfilter.Name = "cbxAntragsfilter"
Me.cbxAntragsfilter.Size = New System.Drawing.Size(134, 17) Me.cbxAntragsfilter.Size = New System.Drawing.Size(134, 17)

View File

@@ -5,12 +5,14 @@ Public Class ustCntlUSTV_AntragPosition
Public UStV_Leist As VERAG_PROG_ALLGEMEIN.cUStVLeistender = Nothing Public UStV_Leist As VERAG_PROG_ALLGEMEIN.cUStVLeistender = Nothing
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
Public Antrag_LandKz = "" Public Antrag_LandKz = ""
Dim kdnr = ""
Public Event EV_PREV() Public Event EV_PREV()
Public Event EV_NEXT() Public Event EV_NEXT()
Public Event CHANGED(UStVPo_ID) Public Event CHANGED(UStVPo_ID)
Dim gridAktiv = False
Dim txtChanged As Boolean = False Private _kundenNr As Integer
Private _gridAktiv As Boolean
Private _txtChanged As Boolean
Dim API As cATEZ_NCTS_IN Dim API As cATEZ_NCTS_IN
Private Sub btnBildAuf_Click(sender As Object, e As EventArgs) Handles btnBildAuf.Click Private Sub btnBildAuf_Click(sender As Object, e As EventArgs) Handles btnBildAuf.Click
RaiseEvent EV_PREV() RaiseEvent EV_PREV()
@@ -46,15 +48,17 @@ Public Class ustCntlUSTV_AntragPosition
txtLand.Text = "" txtLand.Text = ""
txtUIDNr.Text = "" txtUIDNr.Text = ""
gridAktiv = True _gridAktiv = True
Dim filter As String = "UstV_aktiv = 1" InitLeistenderSearchBox()
If Antrag_LandKz <> "" AndAlso cbxAntragsfilter.Checked Then
filter &= " and left(UstV_Leistender_UstNr,2)='" & Antrag_LandKz & "'" 'Dim filter As String = "UstV_aktiv = 1"
sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender]) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"}) 'If Antrag_LandKz <> "" AndAlso cbxAntragsfilter.Checked Then
Else ' filter &= " and left(UstV_Leistender_UstNr,2)='" & Antrag_LandKz & "'"
sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender]) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"}) ' sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender]) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
End If 'Else
' sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender]) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
'End If
End Sub End Sub
@@ -62,26 +66,35 @@ Public Class ustCntlUSTV_AntragPosition
initSchnittstellenNr() initSchnittstellenNr()
gridAktiv = False _gridAktiv = False
btnLeistenderSave.Visible = False btnLeistenderSave.Visible = False
Me.Antrag_LandKz = Antrag_LandKz Me.Antrag_LandKz = Antrag_LandKz
Me.UStV_POS = UStV_POS Me.UStV_POS = UStV_POS
Me.kdnr = kdnr Me._kundenNr = kdnr
cbxAPI.Checked = If(UStV_POS.UStVPo_Schnittstelle, False) cbxAPI.Checked = If(UStV_POS.UStVPo_Schnittstelle, False)
cboSchnittstellennr.changeItem(If(UStV_POS.UStVPo_SchnittstellenNr, "")) cboSchnittstellennr.changeItem(If(UStV_POS.UStVPo_SchnittstellenNr, ""))
txtRgDatum._value = If(UStV_POS.UStVPo_ReDat, "")
txtRgNr._value = If(UStV_POS.UStVPo_ReNr, "")
lblSachbearbeiter.Text = If(UStV_POS.UStVPo_Sachbearbeiter, "")
If UStV_POS.UStVPo_Zeitstempel IsNot Nothing Then lblAenderungsdatum.Text = CDate(UStV_POS.UStVPo_Zeitstempel).ToString("dd.MM.yyyy HH:mm") If UStV_POS.UStVPo_Zeitstempel IsNot Nothing Then lblAenderungsdatum.Text = CDate(UStV_POS.UStVPo_Zeitstempel).ToString("dd.MM.yyyy HH:mm")
cboLeistungsgeber.Text = If(UStV_POS.UStVPo_Leistender, "") cboLeistungsgeber.Text = If(UStV_POS.UStVPo_Leistender, "")
txtLeistungsbezeichnung.Text = If(UStV_POS.UStVPo_Leistungsbezeichnung, "")
txtUSTBetrag.Text = If(UStV_POS.UStVPo_USteuerbetrag, "")
txtUmrechnungskurs.Text = If(UStV_POS.UStVPo_Umrechnungskurs, "") txtRgDatum._value = ValueOrEmpty(UStV_POS.UStVPo_ReDat)
txtUSTBetragEUR.Text = If(UStV_POS.UStVPo_USteuerbetragEUR, "") txtRgNr._value = ValueOrEmpty(UStV_POS.UStVPo_ReNr)
txtNettobetrag.Text = If(UStV_POS.UStVPo_Nettobetrag, "") txtLeistungsbezeichnung.Text = ValueOrEmpty(UStV_POS.UStVPo_Leistungsbezeichnung)
txtNettobetragEUR.Text = If(UStV_POS.UStVPo_NettobetragEUR, "") txtUSTBetrag.Text = ValueOrEmpty(UStV_POS.UStVPo_USteuerbetrag)
txtUmrechnungskurs.Text = ValueOrEmpty(UStV_POS.UStVPo_Umrechnungskurs)
txtUSTBetragEUR.Text = ValueOrEmpty(UStV_POS.UStVPo_USteuerbetragEUR)
txtNettobetrag.Text = ValueOrEmpty(UStV_POS.UStVPo_Nettobetrag)
txtNettobetragEUR.Text = ValueOrEmpty(UStV_POS.UStVPo_NettobetragEUR)
lblSachbearbeiter.Text = ValueOrEmpty(UStV_POS.UStVPo_Sachbearbeiter)
sbLeistender.Text = UStV_Leitender.UStV_Leistender sbLeistender.Text = UStV_Leitender.UStV_Leistender
If IsNumeric(UStV_Leitender.UStV_LeistenderId) Then
sbLeistender._value = UStV_Leitender.UStV_LeistenderId
End If
sbLeistender_VALUE_CHANGED()
loadChangedDSToPanel(UStV_Leitender, True) loadChangedDSToPanel(UStV_Leitender, True)
API = atez_api API = atez_api
@@ -131,17 +144,9 @@ Public Class ustCntlUSTV_AntragPosition
scanUSTVFABest.INIT(kdnr, "KUNDENDATEN", "FA_Bestaetigungen") scanUSTVFABest.INIT(kdnr, "KUNDENDATEN", "FA_Bestaetigungen")
scanUSTVVollmachten.INIT(kdnr, "KUNDENDATEN", "USTV_Vollmachten") scanUSTVVollmachten.INIT(kdnr, "KUNDENDATEN", "USTV_Vollmachten")
Dim filter As String = "UstV_aktiv = 1" InitLeistenderSearchBox()
If Antrag_LandKz <> "" AndAlso cbxAntragsfilter.Checked Then
filter &= " and left(UstV_Leistender_UstNr,2)='" & Antrag_LandKz & "'"
sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender] ) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
Else
sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender]) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
End If
'sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender] + ' ' + isnull([UstV_Leistender_UstNr],'')) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, "UstV_aktiv = 1", "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"}) _gridAktiv = True
gridAktiv = True
End Sub End Sub
Sub getValues(ByRef UStV_POS As cUStVPositionen, ByRef save As Boolean) Sub getValues(ByRef UStV_POS As cUStVPositionen, ByRef save As Boolean)
@@ -163,27 +168,45 @@ Public Class ustCntlUSTV_AntragPosition
lblWarning.Text = "Rechnungsdatum muss ausgefüllt werden." lblWarning.Text = "Rechnungsdatum muss ausgefüllt werden."
save = False save = False
End If End If
If txtUSTBetrag.Text <> "" Then
UStV_POS.UStVPo_USteuerbetrag = txtUSTBetrag.Text.Replace(",", ".")
Else
lblWarning.Text = "UST-Betrag muss ausgefüllt werden." Dim ustBetrag As Decimal
If Not TryGetDecimal(txtUSTBetrag.Text, ustBetrag) Then
lblWarning.Text = "UST-Betrag ist ungültig."
save = False save = False
End If
If txtUSTBetragEUR.Text <> "" Then
UStV_POS.UStVPo_USteuerbetragEUR = txtUSTBetragEUR.Text.Replace(",", ".")
Else Else
UStV_POS.UStVPo_USteuerbetrag = ustBetrag
End If
Dim ustBetragEUR As Decimal
If Not TryGetDecimal(txtUSTBetragEUR.Text, ustBetragEUR) Then
lblWarning.Text = "UST-Betrag ist ungültig."
save = False save = False
Else
UStV_POS.UStVPo_USteuerbetragEUR = ustBetragEUR
End If End If
If txtNettobetrag.Text <> "" Then
UStV_POS.UStVPo_Nettobetrag = txtNettobetrag.Text.Replace(",", ".")
Dim Nettobetrag As Decimal
If TryGetDecimal(txtNettobetrag.Text, Nettobetrag) Then
UStV_POS.UStVPo_Nettobetrag = Nettobetrag
End If End If
If txtNettobetragEUR.Text <> "" Then Dim NettobetragEUR As Decimal
UStV_POS.UStVPo_NettobetragEUR = txtNettobetragEUR.Text.Replace(",", ".")
If TryGetDecimal(txtNettobetragEUR.Text, NettobetragEUR) Then
UStV_POS.UStVPo_NettobetragEUR = NettobetragEUR
End If End If
If txtLeistungsbezeichnung.Text <> "" Then If txtLeistungsbezeichnung.Text <> "" Then
UStV_POS.UStVPo_Leistungsbezeichnung = txtLeistungsbezeichnung.Text UStV_POS.UStVPo_Leistungsbezeichnung = txtLeistungsbezeichnung.Text
Else Else
@@ -192,7 +215,12 @@ Public Class ustCntlUSTV_AntragPosition
End If End If
If Not txtUmrechnungskurs.Text = "" Then If Not txtUmrechnungskurs.Text = "" Then
If txtUmrechnungskurs.Text <> "" Then If txtUmrechnungskurs.Text <> "" Then
UStV_POS.UStVPo_Umrechnungskurs = txtUmrechnungskurs.Text.Replace(",", ".")
Dim Umrechnungskurs As Decimal
If TryGetDecimal(txtUmrechnungskurs.Text, Umrechnungskurs) Then
UStV_POS.UStVPo_Umrechnungskurs = Umrechnungskurs
End If
End If End If
Else Else
lblWarning.Text = "Umrechnungskurs muss ausgefüllt werden." lblWarning.Text = "Umrechnungskurs muss ausgefüllt werden."
@@ -214,14 +242,25 @@ Public Class ustCntlUSTV_AntragPosition
End If End If
UStV_POS.UStVPo_Schnittstelle = cbxAPI.Checked UStV_POS.UStVPo_Schnittstelle = cbxAPI.Checked
UStV_POS.UStVPo_SchnittstellenNr = If(cboSchnittstellennr.SelectedItem IsNot Nothing, cboSchnittstellennr._value, -1)
UStV_POS.UStVPo_SchnittstellenNr = IIf(cboSchnittstellennr.SelectedItem IsNot Nothing, cboSchnittstellennr._value, -1)
UStV_POS.UStVPo_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME UStV_POS.UStVPo_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
UStV_POS.UStVPo_Zeitstempel = Now UStV_POS.UStVPo_Zeitstempel = Now
End Sub End Sub
Private Sub InitLeistenderSearchBox()
Dim filter As String = "UstV_aktiv = 1"
If cbxAntragsfilter.Checked AndAlso Not String.IsNullOrWhiteSpace(Antrag_LandKz) Then
filter &= " AND LEFT(UstV_Leistender_UstNr, 2) = '" &
Antrag_LandKz.Replace("'", "''") & "'"
End If
sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender],[UStV_Leistender] AS Leistender,[UstV_Leistender_PLZ] AS PLZ,([UstV_Leistender_Strasse] + ' ' + [UstV_Leistender_StrasseNr]) AS Strasse,[UstV_Leistender_Stadt] AS Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
End Sub
Private Sub ustCntlUSTV_AntragPosition_KeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles Me.PreviewKeyDown Private Sub ustCntlUSTV_AntragPosition_KeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles Me.PreviewKeyDown
If e.KeyValue = Keys.PageDown Then If e.KeyValue = Keys.PageDown Then
RaiseEvent EV_NEXT() RaiseEvent EV_NEXT()
@@ -239,29 +278,59 @@ Public Class ustCntlUSTV_AntragPosition
Return False Return False
End Function End Function
Private Sub txtBestellung_TextChanged(sender As Object, e As EventArgs) Handles txtLeistungsbezeichnung.TextChanged, txtRgDatum.TextChanged, txtRgNr.TextChanged, txtUSTBetrag.TextChanged, txtUmrechnungskurs.TextChanged, txtUSTBetragEUR.TextChanged Private Shared Function ValueOrEmpty(value As Object) As String
If value Is Nothing OrElse IsDBNull(value) Then
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then Exit Sub Return String.Empty
If gridAktiv And Me.FindForm IsNot Nothing Then
'If sender Is txtLieferung Then
' If Not PROG.checkSDLNrPartnerKdNr(kdNr, SDLNr) Then MsgBox("Bitte geben Sie die Partner-Kundennummer im Kundenblatt oder im FM-ZOLL ein!")
'End If
If sender Is cboLeistungsgeber AndAlso cboLeistungsgeber.SelectedItem <> "" Then
'UStV_POS.UStVPo_Leistender = cboLeistungsgeber.SelectedItem
'values_changed()
Else
'txtChanged = True
End If
End If End If
Return Convert.ToString(value)
End Function
Private Function RoundCurrency(value As Decimal) As Decimal
Return Decimal.Round(value, 2, MidpointRounding.AwayFromZero)
End Function
Private Function TryGetDecimal(text As String, ByRef value As Decimal) As Boolean
text = text.Trim()
If text = "" Then
Return False
End If
Return Decimal.TryParse(
text,
Globalization.NumberStyles.Number,
Globalization.CultureInfo.CurrentCulture,
value
)
End Function
'Private Sub txtBestellung_TextChanged(sender As Object, e As EventArgs) Handles txtLeistungsbezeichnung.TextChanged, txtRgDatum.TextChanged, txtRgNr.TextChanged, txtUSTBetrag.TextChanged, txtUmrechnungskurs.TextChanged, txtUSTBetragEUR.TextChanged
' If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then Exit Sub
' If _gridAktiv And Me.FindForm IsNot Nothing Then
' 'If sender Is txtLieferung Then
' ' If Not PROG.checkSDLNrPartnerKdNr(kdNr, SDLNr) Then MsgBox("Bitte geben Sie die Partner-Kundennummer im Kundenblatt oder im FM-ZOLL ein!")
' 'End If
' If sender Is cboLeistungsgeber AndAlso cboLeistungsgeber.SelectedItem <> "" Then
' 'UStV_POS.UStVPo_Leistender = cboLeistungsgeber.SelectedItem
' 'values_changed()
' Else
' 'txtChanged = True
' End If
' End If
End Sub
'End Sub
Sub values_changed() Sub values_changed()
lblSachbearbeiter.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME lblSachbearbeiter.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
@@ -307,25 +376,9 @@ Public Class ustCntlUSTV_AntragPosition
End If End If
If Not initial Then SetAddressChangeHandlers(Not initial AndAlso Not adressLoadedByLeistender)
'Listener für Änderungen im Detail-Panel
If Not adressLoadedByLeistender Then
For Each c As Control In pnlAdresse.Controls
If TypeOf (c) Is TextBox Then
AddHandler CType(c, TextBox).TextChanged, AddressOf SomethingChanged
End If
If TypeOf (c) Is MyComboBox Then
AddHandler CType(c, MyComboBox).TextChanged, AddressOf SomethingChanged
End If
Next
Else
btnLeistenderSave.Visible = False
End If
Else
If initial OrElse adressLoadedByLeistender Then
btnLeistenderSave.Visible = False btnLeistenderSave.Visible = False
End If End If
@@ -410,10 +463,6 @@ Public Class ustCntlUSTV_AntragPosition
End If End If
End Sub
Private Sub cboLeistungsgeber_Enter(sender As Object, e As EventArgs) Handles cboLeistungsgeber.Enter
End Sub End Sub
Private Sub cboLeistungsgeber_DropDown(sender As Object, e As EventArgs) Handles cboLeistungsgeber.DropDown Private Sub cboLeistungsgeber_DropDown(sender As Object, e As EventArgs) Handles cboLeistungsgeber.DropDown
@@ -463,179 +512,472 @@ Public Class ustCntlUSTV_AntragPosition
End Sub End Sub
Private Sub txtUSTBetrag_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtUSTBetrag.PreviewKeyDown, txtUSTBetragEUR.PreviewKeyDown, txtRgDatum.PreviewKeyDown, txtRgNr.PreviewKeyDown, txtUmrechnungskurs.PreviewKeyDown, sbLeistender.PreviewKeyDown, txtLeistungsbezeichnung.PreviewKeyDown Private Sub txtUSTBetrag_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtUSTBetrag.PreviewKeyDown, txtUSTBetragEUR.PreviewKeyDown, txtRgDatum.PreviewKeyDown, txtRgNr.PreviewKeyDown, txtUmrechnungskurs.PreviewKeyDown, sbLeistender.PreviewKeyDown, txtLeistungsbezeichnung.PreviewKeyDown
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then Exit Sub
If gridAktiv And Me.FindForm IsNot Nothing Then If e.KeyValue <> Keys.Tab Then Return
If Not CanEdit() Then Return
If Not _gridAktiv OrElse Me.FindForm Is Nothing Then Return
' Eingabeprüfung lblWarning.Text = ""
If e.KeyValue = 9 Then
lblWarning.Text = "" Select Case True
If sender Is txtUSTBetrag Or sender Is txtUSTBetragEUR Or sender Is txtUmrechnungskurs Then
If txtUSTBetrag.Text = "" Then Case sender Is txtUSTBetrag
lblWarning.Text = "Bitte Umsatzsteuerbetrag eingeben." HandleVatAmountChanged()
Exit Sub
End If
End If Case sender Is txtUSTBetragEUR
HandleVatAmountEurChanged()
Case sender Is txtUmrechnungskurs
HandleExchangeRateChanged()
Case sender Is txtRgDatum
HandleInvoiceDateChanged()
Case sender Is txtLeistungsbezeichnung
HandleServiceDescriptionChanged()
Case sender Is sbLeistender
HandleSupplierChanged()
End Select
SaveIfChanged()
'If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then Exit Sub
'If _gridAktiv And Me.FindForm IsNot Nothing Then
' ' Eingabeprüfung
' If e.KeyValue = 9 Then
' lblWarning.Text = ""
' If sender Is txtUSTBetrag Or sender Is txtUSTBetragEUR Or sender Is txtUmrechnungskurs Then
' If txtUSTBetrag.Text = "" Then
' lblWarning.Text = "Bitte Umsatzsteuerbetrag eingeben."
' Exit Sub
' End If
' End If
If sender Is txtUSTBetrag Then ' If sender Is txtUSTBetrag Then
If IsNumeric(txtUSTBetrag.Text) AndAlso IsNumeric(txtUmrechnungskurs.Text) Then ' If IsNumeric(txtUSTBetrag.Text) AndAlso IsNumeric(txtUmrechnungskurs.Text) Then
If CDbl(UStV_POS.UStVPo_USteuerbetrag) <> CDbl(txtUSTBetrag.Text) OrElse UStV_POS.UStVPo_USteuerbetrag Is Nothing Then ' If UStV_POS.UStVPo_USteuerbetrag Is Nothing OrElse CDbl(UStV_POS.UStVPo_USteuerbetrag) <> CDbl(txtUSTBetrag.Text) Then
'Umrechnung bei Währung <> EUR im Antrag! ' 'Umrechnung bei Währung <> EUR im Antrag!
Dim antr As New cUSTVAntrag(UStV_POS.UStVAn_ID) ' Dim antr As New cUSTVAntrag(UStV_POS.UStVAn_ID)
If antr.UStVAn_Währungscode <> "EUR" AndAlso (IsDate(UStV_POS.UStVPo_ReDat) OrElse (txtRgDatum.Text <> "" AndAlso IsDate(txtRgDatum.Text))) Then ' If antr.UStVAn_Währungscode <> "EUR" AndAlso (IsDate(UStV_POS.UStVPo_ReDat) OrElse (txtRgDatum.Text <> "" AndAlso IsDate(txtRgDatum.Text))) Then
If txtUmrechnungskurs.Text = 1 Or txtUmrechnungskurs.Text = "" Then ' If txtUmrechnungskurs.Text = 1 Or txtUmrechnungskurs.Text = "" Then
Dim kurs As New cEZB_Waehrungskurse(antr.UStVAn_Währungscode) ' Dim kurs As New cEZB_Waehrungskurse(antr.UStVAn_Währungscode)
If IsDate(UStV_POS.UStVPo_ReDat) Then ' If IsDate(UStV_POS.UStVPo_ReDat) Then
txtUmrechnungskurs.Text = kurs.GET_KURS(antr.UStVAn_Währungscode, CDate(UStV_POS.UStVPo_ReDat)) ' txtUmrechnungskurs.Text = kurs.GET_KURS(antr.UStVAn_Währungscode, CDate(UStV_POS.UStVPo_ReDat))
ElseIf IsDate(txtRgDatum.Text) Then ' ElseIf IsDate(txtRgDatum.Text) Then
txtUmrechnungskurs.Text = kurs.GET_KURS(antr.UStVAn_Währungscode, CDate(txtRgDatum.Text)) ' txtUmrechnungskurs.Text = kurs.GET_KURS(antr.UStVAn_Währungscode, CDate(txtRgDatum.Text))
Else ' Else
txtUmrechnungskurs.Text = kurs.ezb_kurs ' txtUmrechnungskurs.Text = kurs.ezb_kurs
End If ' End If
End If ' End If
End If ' End If
txtUSTBetragEUR.Text = Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100 ' txtUSTBetragEUR.Text = RoundCurrency(txtUSTBetrag.Text / txtUmrechnungskurs.Text).ToString()
If IsNumeric(txtNettobetrag.Text) Then txtNettobetragEUR.Text = Math.Floor((txtNettobetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100 ' If IsNumeric(txtNettobetrag.Text) Then txtNettobetragEUR.Text = RoundCurrency(txtNettobetrag.Text / txtUmrechnungskurs.Text).ToString() 'Math.Floor((txtNettobetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
txtChanged = True ' _txtChanged = True
End If ' End If
End If ' End If
ElseIf sender Is txtUSTBetragEUR Then ' ElseIf sender Is txtUSTBetragEUR Then
'so herum nicht umrechnen!!!! ' 'so herum nicht umrechnen!!!!
'If IsNumeric(txtUSTBetragEUR._value) AndAlso IsNumeric(txtUmrechnungskurs._value) Then ' 'If IsNumeric(txtUSTBetragEUR._value) AndAlso IsNumeric(txtUmrechnungskurs._value) Then
' txtUSTBetrag.Text = Math.Floor((txtUSTBetragEUR._value * txtUmrechnungskurs._value) * 100 + 0.5) / 100 ' ' txtUSTBetrag.Text = Math.Floor((txtUSTBetragEUR._value * txtUmrechnungskurs._value) * 100 + 0.5) / 100
' 'values_changed() ' ' 'values_changed()
'End If ' 'End If
If IsNumeric(txtUSTBetragEUR.Text) AndAlso IsNumeric(txtUSTBetrag.Text) Then ' If IsNumeric(txtUSTBetragEUR.Text) AndAlso IsNumeric(txtUSTBetrag.Text) Then
If CDbl(UStV_POS.UStVPo_USteuerbetragEUR) <> CDbl(txtUSTBetragEUR.Text) OrElse UStV_POS.UStVPo_USteuerbetragEUR Is Nothing Then ' If UStV_POS.UStVPo_USteuerbetragEUR Is Nothing OrElse CDbl(UStV_POS.UStVPo_USteuerbetragEUR) <> CDbl(txtUSTBetragEUR.Text) Then
Dim zahl1 = CDbl(txtUSTBetrag.Text) / CDbl(txtUSTBetragEUR.Text) ' 'If CDbl(UStV_POS.UStVPo_USteuerbetragEUR) <> CDbl(txtUSTBetragEUR.Text) OrElse UStV_POS.UStVPo_USteuerbetragEUR Is Nothing Then
txtUmrechnungskurs.Text = Math.Round(zahl1, 2) ' Dim zahl1 = CDbl(txtUSTBetrag.Text) / CDbl(txtUSTBetragEUR.Text)
txtChanged = True
End If
End If
ElseIf sender Is txtUmrechnungskurs Then ' txtUmrechnungskurs.Text = Math.Round(zahl1, 2)
' _txtChanged = True
' End If
' End If
' ElseIf sender Is txtUmrechnungskurs Then
If IsNumeric(txtUSTBetrag.Text) AndAlso IsNumeric(txtUmrechnungskurs._value) Then ' If IsNumeric(txtUSTBetrag.Text) AndAlso IsNumeric(txtUmrechnungskurs._value) Then
If UStV_POS.UStVPo_Umrechnungskurs <> txtUmrechnungskurs.Text.Replace(",", ".") OrElse UStV_POS.UStVPo_Umrechnungskurs Is Nothing Then ' If UStV_POS.UStVPo_Umrechnungskurs <> txtUmrechnungskurs.Text.Replace(",", ".") OrElse UStV_POS.UStVPo_Umrechnungskurs Is Nothing Then
txtUSTBetragEUR.Text = Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100 ' txtUSTBetragEUR.Text = RoundCurrency(txtUSTBetrag.Text / txtUmrechnungskurs.Text).ToString() ' Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
If IsNumeric(txtNettobetrag.Text) Then txtNettobetragEUR.Text = Math.Floor((txtNettobetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100 ' If IsNumeric(txtNettobetrag.Text) Then txtNettobetragEUR.Text = RoundCurrency(txtNettobetrag.Text / txtUmrechnungskurs.Text).ToString() 'Math.Floor((txtNettobetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
txtChanged = True ' _txtChanged = True
End If ' End If
End If ' End If
'ElseIf sender Is sbLeistender Then ' 'ElseIf sender Is sbLeistender Then
' If UStV_Leist.hasEntry Then ' ' If UStV_Leist.hasEntry Then
' UStV_POS.UStVPo_Leistender = UStV_Leist.UStV_Leistender ' ' UStV_POS.UStVPo_Leistender = UStV_Leist.UStV_Leistender
' If UStV_Leist.UStV_LeistenderId > 0 Then UStV_POS.UStVPo_LeistenderId = UStV_Leist.UStV_LeistenderId ' ' If UStV_Leist.UStV_LeistenderId > 0 Then UStV_POS.UStVPo_LeistenderId = UStV_Leist.UStV_LeistenderId
' txtChanged = True ' ' txtChanged = True
' End If ' ' End If
ElseIf sender Is txtRgDatum Then ' ElseIf sender Is txtRgDatum Then
If txtRgDatum.Text <> "" Then ' If txtRgDatum.Text <> "" Then
txtRgDatum.Text = txtRgDatum.Text.Replace("-", ".") ' txtRgDatum.Text = txtRgDatum.Text.Replace("-", ".")
txtRgDatum.Text = txtRgDatum.Text.Replace(",", ".") ' txtRgDatum.Text = txtRgDatum.Text.Replace(",", ".")
Dim antr As New cUSTVAntrag(UStV_POS.UStVAn_ID) ' Dim antr As New cUSTVAntrag(UStV_POS.UStVAn_ID)
If IsDate(txtRgDatum.Text) AndAlso ((CDate(txtRgDatum.Text) > antr.UStVAn_ReDatBis) OrElse (CDate(txtRgDatum.Text) < antr.UStVAn_ReDatVon)) Then ' If IsDate(txtRgDatum.Text) AndAlso ((CDate(txtRgDatum.Text) > antr.UStVAn_ReDatBis) OrElse (CDate(txtRgDatum.Text) < antr.UStVAn_ReDatVon)) Then
MsgBox("Rechnungsdatum " & CDate(txtRgDatum.Text) & " darf nicht außerhalb der Antragsperiode liegen!") ' MsgBox("Rechnungsdatum " & CDate(txtRgDatum.Text) & " darf nicht außerhalb der Antragsperiode liegen!")
Else ' Else
txtChanged = True ' _txtChanged = True
End If ' End If
End If ' End If
ElseIf sender Is txtLeistungsbezeichnung Then ' ElseIf sender Is txtLeistungsbezeichnung Then
'If UStV_POS.UStVPo_Leistungsbezeichnung <> txtLeistungsbezeichnung.Text Then ' 'If UStV_POS.UStVPo_Leistungsbezeichnung <> txtLeistungsbezeichnung.Text Then
'UStV_POS.UStVPo_Leistungsbezeichnung = txtLeistungsbezeichnung.Text ' 'UStV_POS.UStVPo_Leistungsbezeichnung = txtLeistungsbezeichnung.Text
txtChanged = True ' _txtChanged = True
'End If ' 'End If
ElseIf sender Is sbLeistender Then ' ElseIf sender Is sbLeistender Then
If sbLeistender.Text <> "" Then ' If sbLeistender.Text <> "" Then
If sbLeistender.Text IsNot Nothing AndAlso sbLeistender.Text <> "" Then ' If sbLeistender.Text IsNot Nothing AndAlso sbLeistender.Text <> "" Then
If IsNumeric(sbLeistender.Text) Then ' If IsNumeric(sbLeistender.Text) Then
If UStV_Leist IsNot Nothing AndAlso UStV_Leist.UStV_Leistender <> "" AndAlso (UStV_POS.UStVPo_Leistender <> sbLeistender.Text OrElse UStV_POS.UStVPo_LeistenderId <> sbLeistender.Text) Then ' If UStV_Leist IsNot Nothing AndAlso UStV_Leist.UStV_Leistender <> "" AndAlso (UStV_POS.UStVPo_Leistender <> sbLeistender.Text OrElse UStV_POS.UStVPo_LeistenderId <> sbLeistender.Text) Then
'speichern der Änderung nur, wenn 1. Leistender gelöscht wird. ' 'speichern der Änderung nur, wenn 1. Leistender gelöscht wird.
txtChanged = True ' _txtChanged = True
ElseIf UStV_Leist Is Nothing Then ' ElseIf UStV_Leist Is Nothing Then
txtChanged = True ' _txtChanged = True
End If ' End If
UStV_Leist = New VERAG_PROG_ALLGEMEIN.cUStVLeistender(CInt(sbLeistender.Text)) ' UStV_Leist = New VERAG_PROG_ALLGEMEIN.cUStVLeistender(CInt(sbLeistender.Text))
Else ' Else
If UStV_Leist IsNot Nothing AndAlso UStV_Leist.UStV_Leistender <> "" AndAlso (UStV_Leist.UStV_Leistender <> sbLeistender.Text OrElse UStV_POS.UStVPo_Leistender <> sbLeistender.Text) Then ' If UStV_Leist IsNot Nothing AndAlso UStV_Leist.UStV_Leistender <> "" AndAlso (UStV_Leist.UStV_Leistender <> sbLeistender.Text OrElse UStV_POS.UStVPo_Leistender <> sbLeistender.Text) Then
txtChanged = True ' _txtChanged = True
ElseIf UStV_Leist Is Nothing Then ' ElseIf UStV_Leist Is Nothing Then
txtChanged = True ' _txtChanged = True
End If ' End If
End If ' End If
UStV_Leist = New VERAG_PROG_ALLGEMEIN.cUStVLeistender(sbLeistender.Text) ' UStV_Leist = New VERAG_PROG_ALLGEMEIN.cUStVLeistender(sbLeistender.Text)
loadChangedDSToPanel(UStV_Leist) ' loadChangedDSToPanel(UStV_Leist)
Else ' Else
If UStV_POS.UStVPo_Leistender <> "" OrElse UStV_POS.UStVPo_LeistenderId <> 0 Then ' If UStV_POS.UStVPo_Leistender <> "" OrElse UStV_POS.UStVPo_LeistenderId <> 0 Then
loadChangedDSToPanel(Nothing, True) ' loadChangedDSToPanel(Nothing, True)
End If ' End If
End If ' End If
End If ' End If
'MsgBox() ' 'MsgBox()
End If ' End If
' End If
' If _txtChanged Then
' values_changed()
' _txtChanged = False
' End If
'End If
End Sub
Private Function CanEdit() As Boolean
Return VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm)
End Function
Private Sub HandleVatAmountChanged()
If String.IsNullOrWhiteSpace(txtUSTBetrag.Text) Then
lblWarning.Text = "Bitte Umsatzsteuerbetrag eingeben."
Return
End If
Dim ustBetrag As Decimal
Dim umrechnungskurs As Decimal
If Not TryGetDecimal(txtUSTBetrag.Text, ustBetrag) Then
lblWarning.Text = "USt-Betrag ist ungültig."
Return
End If
If Not TryGetDecimal(txtUmrechnungskurs.Text, umrechnungskurs) OrElse
umrechnungskurs <= 0 Then
LoadExchangeRate()
If Not TryGetDecimal(txtUmrechnungskurs.Text, umrechnungskurs) OrElse
umrechnungskurs <= 0 Then
lblWarning.Text = "Umrechnungskurs ist ungültig."
Return
End If End If
If txtChanged Then
values_changed()
txtChanged = False
End If
End If End If
Dim oldValueChanged As Boolean =
UStV_POS Is Nothing OrElse
UStV_POS.UStVPo_USteuerbetrag Is Nothing OrElse
Convert.ToDecimal(UStV_POS.UStVPo_USteuerbetrag) <> ustBetrag
If Not oldValueChanged Then Return
txtUSTBetragEUR.Text =
RoundCurrency(ustBetrag / umrechnungskurs).ToString()
Dim nettoBetrag As Decimal
If TryGetDecimal(txtNettobetrag.Text, nettoBetrag) Then
txtNettobetragEUR.Text =
RoundCurrency(nettoBetrag / umrechnungskurs).ToString()
End If
_txtChanged = True
End Sub
Private Sub HandleVatAmountEurChanged()
Dim ustBetragEUR As Decimal
Dim ustBetrag As Decimal
If Not TryGetDecimal(txtUSTBetragEUR.Text, ustBetragEUR) Then
Return
End If
If Not TryGetDecimal(txtUSTBetrag.Text, ustBetrag) Then
Return
End If
If ustBetragEUR = 0 Then
lblWarning.Text = "USt-Betrag EUR darf nicht 0 sein."
Return
End If
Dim oldValueChanged As Boolean =
UStV_POS Is Nothing OrElse
UStV_POS.UStVPo_USteuerbetragEUR Is Nothing OrElse
Convert.ToDecimal(UStV_POS.UStVPo_USteuerbetragEUR) <> ustBetragEUR
If Not oldValueChanged Then Return
Dim kurs As Decimal =
RoundCurrency(ustBetrag / ustBetragEUR)
txtUmrechnungskurs.Text = kurs.ToString()
_txtChanged = True
End Sub
Private Sub HandleExchangeRateChanged()
Dim ustBetrag As Decimal
Dim umrechnungskurs As Decimal
If Not TryGetDecimal(txtUSTBetrag.Text, ustBetrag) Then
Return
End If
If Not TryGetDecimal(txtUmrechnungskurs.Text, umrechnungskurs) Then
lblWarning.Text = "Umrechnungskurs ist ungültig."
Return
End If
If umrechnungskurs <= 0 Then
lblWarning.Text = "Umrechnungskurs muss größer als 0 sein."
Return
End If
Dim oldKurs As Decimal
If UStV_POS IsNot Nothing AndAlso UStV_POS.UStVPo_Umrechnungskurs IsNot Nothing AndAlso TryGetDecimal(Convert.ToString(UStV_POS.UStVPo_Umrechnungskurs), oldKurs) Then
If oldKurs = umrechnungskurs Then
Return
End If
End If
txtUSTBetragEUR.Text =
RoundCurrency(ustBetrag / umrechnungskurs).ToString()
Dim nettoBetrag As Decimal
If TryGetDecimal(txtNettobetrag.Text, nettoBetrag) Then
txtNettobetragEUR.Text =
RoundCurrency(nettoBetrag / umrechnungskurs).ToString()
End If
_txtChanged = True
End Sub
Private Sub HandleInvoiceDateChanged()
If String.IsNullOrWhiteSpace(txtRgDatum.Text) Then
Return
End If
txtRgDatum.Text =
txtRgDatum.Text.Replace("-", ".").Replace(",", ".")
Dim rechnungsDatum As DateTime
If Not DateTime.TryParse(txtRgDatum.Text, rechnungsDatum) Then
lblWarning.Text = "Rechnungsdatum ist ungültig."
Return
End If
Dim antrag As New cUSTVAntrag(UStV_POS.UStVAn_ID)
If rechnungsDatum > antrag.UStVAn_ReDatBis OrElse
rechnungsDatum < antrag.UStVAn_ReDatVon Then
MsgBox("Rechnungsdatum " & rechnungsDatum.ToString("dd.MM.yyyy") & " darf nicht außerhalb der Antragsperiode liegen!")
Return
End If
_txtChanged = True
End Sub
Private Sub HandleServiceDescriptionChanged()
If String.IsNullOrWhiteSpace(txtLeistungsbezeichnung.Text) Then
lblWarning.Text = "Leistungsbez. muss ausgefüllt werden."
Return
End If
_txtChanged = True
End Sub
Private Sub HandleSupplierChanged()
Dim supplierText As String = sbLeistender.Text.Trim()
If String.IsNullOrWhiteSpace(supplierText) Then
If UStV_POS IsNot Nothing AndAlso
(UStV_POS.UStVPo_Leistender <> "" OrElse
UStV_POS.UStVPo_LeistenderId <> 0) Then
UStV_Leist = Nothing
loadChangedDSToPanel(Nothing, True)
_txtChanged = True
End If
Return
End If
Dim supplier As VERAG_PROG_ALLGEMEIN.cUStVLeistender
If IsNumeric(supplierText) Then
supplier = New VERAG_PROG_ALLGEMEIN.cUStVLeistender(CInt(supplierText))
Else
supplier = New VERAG_PROG_ALLGEMEIN.cUStVLeistender(supplierText)
End If
If supplier Is Nothing Then Return
Dim changed As Boolean = False
If UStV_Leist Is Nothing Then
changed = True
ElseIf UStV_POS Is Nothing Then
changed = True
ElseIf UStV_POS.UStVPo_Leistender <> supplier.UStV_Leistender Then
changed = True
ElseIf UStV_POS.UStVPo_LeistenderId <> supplier.UStV_LeistenderId Then
changed = True
End If
UStV_Leist = supplier
loadChangedDSToPanel(UStV_Leist)
If changed Then
_txtChanged = True
End If
End Sub
Private Sub LoadExchangeRate()
If UStV_POS Is Nothing Then Return
Dim antrag As New cUSTVAntrag(UStV_POS.UStVAn_ID)
If antrag.UStVAn_Währungscode = "EUR" Then
txtUmrechnungskurs.Text = "1"
Return
End If
Dim rechnungsDatum As DateTime
If DateTime.TryParse(txtRgDatum.Text, rechnungsDatum) Then
Dim kurs As New cEZB_Waehrungskurse(antrag.UStVAn_Währungscode)
txtUmrechnungskurs.Text = kurs.GET_KURS(antrag.UStVAn_Währungscode, rechnungsDatum).ToString()
End If
End Sub
Private Sub SaveIfChanged()
If Not _txtChanged Then Return
_txtChanged = False
values_changed()
End Sub End Sub
Private Sub scanSonstiges_FileAdded(id As String, path As String, name As String) Handles scanSonstiges.FileAdded Private Sub scanSonstiges_FileAdded(id As String, path As String, name As String) Handles scanSonstiges.FileAdded
@@ -659,12 +1001,8 @@ Public Class ustCntlUSTV_AntragPosition
Private Sub cbxAntragsfilter_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAntragsfilter.CheckedChanged Private Sub cbxAntragsfilter_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAntragsfilter.CheckedChanged
Dim filter As String = "UstV_aktiv = 1" InitLeistenderSearchBox()
If Antrag_LandKz <> "" Then
If cbxAntragsfilter.Checked Then filter &= " and left(UstV_Leistender_UstNr,2)='" & Antrag_LandKz & "'"
sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender]) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
'sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender] + ' ' + isnull([UstV_Leistender_UstNr],'')) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
End If
End Sub End Sub
Private Sub mnuItemKIUPLOAD_Clicked(sender As Object, e As EventArgs) Private Sub mnuItemKIUPLOAD_Clicked(sender As Object, e As EventArgs)
@@ -716,7 +1054,7 @@ Public Class ustCntlUSTV_AntragPosition
f.usrcntlVAT_ATEZ1.btnUebernehmen.Enabled = UStV_POS.UStVPo_daId_loeschbar 'NUR ÜBERNEHMEN WENN LÖSCHBAR! f.usrcntlVAT_ATEZ1.btnUebernehmen.Enabled = UStV_POS.UStVPo_daId_loeschbar 'NUR ÜBERNEHMEN WENN LÖSCHBAR!
f.usrcntlVAT_ATEZ1.initDGV(dt) f.usrcntlVAT_ATEZ1.initDGV(dt)
f.usrcntlVAT_ATEZ1.setColorIndgv() f.usrcntlVAT_ATEZ1.setColorIndgv()
f.usrcntlVAT_ATEZ1.setAmountOnly = IIf(UStV_POS.UStVPo_SchnittstellenNr = 7, True, False) f.usrcntlVAT_ATEZ1.setAmountOnly = UStV_POS.UStVPo_SchnittstellenNr = 7
If f.ShowDialog = DialogResult.OK Then If f.ShowDialog = DialogResult.OK Then
@@ -826,6 +1164,36 @@ Public Class ustCntlUSTV_AntragPosition
End Sub
Private Sub SetAddressChangeHandlers(enabled As Boolean)
For Each c As Control In pnlAdresse.Controls
If TypeOf c Is TextBox Then
Dim tb As TextBox = DirectCast(c, TextBox)
RemoveHandler tb.TextChanged, AddressOf SomethingChanged
If enabled Then
AddHandler tb.TextChanged, AddressOf SomethingChanged
End If
ElseIf TypeOf c Is MyComboBox Then
Dim cb As MyComboBox = DirectCast(c, MyComboBox)
RemoveHandler cb.TextChanged, AddressOf SomethingChanged
If enabled Then
AddHandler cb.TextChanged, AddressOf SomethingChanged
End If
End If
Next
End Sub End Sub
Private Sub btnAPIUbload_Click(sender As Object, e As EventArgs) Handles btnAPIUbload.Click Private Sub btnAPIUbload_Click(sender As Object, e As EventArgs) Handles btnAPIUbload.Click
@@ -852,7 +1220,7 @@ Public Class ustCntlUSTV_AntragPosition
Private Sub txtStrasse_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtStrasse.PreviewKeyDown, txtPLZ.PreviewKeyDown, txtOrt.PreviewKeyDown, txtLand.PreviewKeyDown, txtStrassenNr.PreviewKeyDown, txtUIDNr.PreviewKeyDown Private Sub txtStrasse_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtStrasse.PreviewKeyDown, txtPLZ.PreviewKeyDown, txtOrt.PreviewKeyDown, txtLand.PreviewKeyDown, txtStrassenNr.PreviewKeyDown, txtUIDNr.PreviewKeyDown
If gridAktiv And Me.FindForm IsNot Nothing Then If _gridAktiv And Me.FindForm IsNot Nothing Then
' Eingabeprüfung ' Eingabeprüfung
If e.KeyValue = 9 Then If e.KeyValue = 9 Then
@@ -913,11 +1281,11 @@ Public Class ustCntlUSTV_AntragPosition
Else Else
If IsNumeric(txtNettobetragEUR.Text) Then If IsNumeric(txtNettobetragEUR.Text) Then
txtNettobetrag.Text = Math.Floor((txtNettobetragEUR.Text * txtUmrechnungskurs.Text) * 100 + 0.5) / 100 txtNettobetrag.Text = Math.Floor((txtNettobetragEUR.Text * txtUmrechnungskurs.Text) * 100 + 0.5) / 100
txtChanged = True _txtChanged = True
If txtChanged Then If _txtChanged Then
values_changed() values_changed()
txtChanged = False _txtChanged = False
End If End If
End If End If

View File

@@ -63,6 +63,7 @@ Public Class cUSTVAntrag
Property UStVAn_MWSTEingang_offen As Object = Nothing Property UStVAn_MWSTEingang_offen As Object = Nothing
Property POSITIONEN As New List(Of cUStVPositionen) '= Nothing Property POSITIONEN As New List(Of cUStVPositionen) '= Nothing
Property UStVAn_letzteAenderung As Object = Nothing Property UStVAn_letzteAenderung As Object = Nothing
Property UStVAn_letzteAenderungUser As Object = Nothing
Public hasEntry = False Public hasEntry = False
@@ -135,6 +136,7 @@ Public Class cUSTVAntrag
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVAn_Sicherheit", UStVAn_Sicherheit)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVAn_Sicherheit", UStVAn_Sicherheit))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVAn_MWSTEingang_offen", UStVAn_MWSTEingang_offen)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVAn_MWSTEingang_offen", UStVAn_MWSTEingang_offen))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVAn_letzteAenderung", UStVAn_letzteAenderung)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVAn_letzteAenderung", UStVAn_letzteAenderung))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVAn_letzteAenderungUser", UStVAn_letzteAenderungUser))
Return list Return list