From c880a31ff2521701964da255e5e2a6d9ea593fd1 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Wed, 18 Dec 2024 14:31:35 +0100 Subject: [PATCH] ustva, mdm, uta --- SDL/USTV/frmUSTVoffeneAntraege.Designer.vb | 114 ++++++++++----------- SDL/mdm/frmMDMDatenverarbetiung.vb | 4 +- VERAG_PROG_ALLGEMEIN/Classes/cUTA.vb | 4 +- 3 files changed, 60 insertions(+), 62 deletions(-) diff --git a/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb b/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb index 5b5e5968..e43be93b 100644 --- a/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb +++ b/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb @@ -23,9 +23,9 @@ Partial Class frmUSTVoffeneAntraege _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel() Me.btn = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() @@ -47,14 +47,14 @@ Partial Class frmUSTVoffeneAntraege Me.Label4 = New System.Windows.Forms.Label() Me.pnlLand = New System.Windows.Forms.Panel() Me.cbxNichtEroeffneteAntraege = New System.Windows.Forms.CheckBox() - Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.AntragEröffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.cbxSteuerNr = New System.Windows.Forms.CheckBox() + Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.txtmaxAnz = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtMWST = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) - Me.cbxSteuerNr = New System.Windows.Forms.CheckBox() Me.FlowLayoutPanel.SuspendLayout() Me.Panel4.SuspendLayout() Me.pnlLand.SuspendLayout() @@ -236,9 +236,7 @@ Partial Class frmUSTVoffeneAntraege ' Me.cbxAlleoffenen.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.cbxAlleoffenen.AutoSize = True - Me.cbxAlleoffenen.Checked = True - Me.cbxAlleoffenen.CheckState = System.Windows.Forms.CheckState.Checked - Me.cbxAlleoffenen.Location = New System.Drawing.Point(1137, 62) + Me.cbxAlleoffenen.Location = New System.Drawing.Point(1137, 69) Me.cbxAlleoffenen.Name = "cbxAlleoffenen" Me.cbxAlleoffenen.Size = New System.Drawing.Size(128, 17) Me.cbxAlleoffenen.TabIndex = 44 @@ -268,6 +266,7 @@ Partial Class frmUSTVoffeneAntraege ' Me.pnlLand.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.pnlLand.Controls.Add(Me.cbxNichtEroeffneteAntraege) + Me.pnlLand.Controls.Add(Me.cbxSteuerNr) Me.pnlLand.Controls.Add(Me.Label4) Me.pnlLand.Controls.Add(Me.MyComboBox1) Me.pnlLand.Location = New System.Drawing.Point(863, 62) @@ -282,24 +281,13 @@ Partial Class frmUSTVoffeneAntraege Me.cbxNichtEroeffneteAntraege.AutoSize = True Me.cbxNichtEroeffneteAntraege.Checked = True Me.cbxNichtEroeffneteAntraege.CheckState = System.Windows.Forms.CheckState.Checked - Me.cbxNichtEroeffneteAntraege.Location = New System.Drawing.Point(126, 9) + Me.cbxNichtEroeffneteAntraege.Location = New System.Drawing.Point(126, 0) Me.cbxNichtEroeffneteAntraege.Name = "cbxNichtEroeffneteAntraege" Me.cbxNichtEroeffneteAntraege.Size = New System.Drawing.Size(134, 17) Me.cbxNichtEroeffneteAntraege.TabIndex = 46 Me.cbxNichtEroeffneteAntraege.Text = "nicht eröffnete Anträge" Me.cbxNichtEroeffneteAntraege.UseVisualStyleBackColor = True ' - 'MyComboBox1 - ' - Me.MyComboBox1._allowedValuesFreiText = Nothing - Me.MyComboBox1._allowFreiText = False - Me.MyComboBox1._value = "" - Me.MyComboBox1.FormattingEnabled = True - Me.MyComboBox1.Location = New System.Drawing.Point(48, 7) - Me.MyComboBox1.Name = "MyComboBox1" - Me.MyComboBox1.Size = New System.Drawing.Size(72, 21) - Me.MyComboBox1.TabIndex = 46 - ' 'ContextMenuStrip1 ' Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AntragEröffnenToolStripMenuItem}) @@ -312,6 +300,30 @@ Partial Class frmUSTVoffeneAntraege Me.AntragEröffnenToolStripMenuItem.Size = New System.Drawing.Size(158, 22) Me.AntragEröffnenToolStripMenuItem.Text = "Antrag eröffnen" ' + 'cbxSteuerNr + ' + Me.cbxSteuerNr.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.cbxSteuerNr.AutoSize = True + Me.cbxSteuerNr.Checked = True + Me.cbxSteuerNr.CheckState = System.Windows.Forms.CheckState.Checked + Me.cbxSteuerNr.Location = New System.Drawing.Point(126, 15) + Me.cbxSteuerNr.Name = "cbxSteuerNr" + Me.cbxSteuerNr.Size = New System.Drawing.Size(105, 17) + Me.cbxSteuerNr.TabIndex = 46 + Me.cbxSteuerNr.Text = " nur mit SteuerNr" + Me.cbxSteuerNr.UseVisualStyleBackColor = True + ' + 'MyComboBox1 + ' + Me.MyComboBox1._allowedValuesFreiText = Nothing + Me.MyComboBox1._allowFreiText = False + Me.MyComboBox1._value = "" + Me.MyComboBox1.FormattingEnabled = True + Me.MyComboBox1.Location = New System.Drawing.Point(48, 7) + Me.MyComboBox1.Name = "MyComboBox1" + Me.MyComboBox1.Size = New System.Drawing.Size(72, 21) + Me.MyComboBox1.TabIndex = 46 + ' 'txtmaxAnz ' Me.txtmaxAnz._DateTimeOnly = False @@ -398,58 +410,44 @@ Partial Class frmUSTVoffeneAntraege Me.MyDatagridview1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1 + DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4 Me.MyDatagridview1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle2 + DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle5 Me.MyDatagridview1.Location = New System.Drawing.Point(12, 98) Me.MyDatagridview1.Name = "MyDatagridview1" Me.MyDatagridview1.ReadOnly = True - DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle3 + DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle6 Me.MyDatagridview1.RowHeadersWidth = 62 Me.MyDatagridview1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect Me.MyDatagridview1.Size = New System.Drawing.Size(1409, 528) Me.MyDatagridview1.TabIndex = 30 ' - 'cbxSteuerNr - ' - Me.cbxSteuerNr.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.cbxSteuerNr.AutoSize = True - Me.cbxSteuerNr.Checked = True - Me.cbxSteuerNr.CheckState = System.Windows.Forms.CheckState.Checked - Me.cbxSteuerNr.Location = New System.Drawing.Point(1137, 78) - Me.cbxSteuerNr.Name = "cbxSteuerNr" - Me.cbxSteuerNr.Size = New System.Drawing.Size(105, 17) - Me.cbxSteuerNr.TabIndex = 46 - Me.cbxSteuerNr.Text = " nur mit SteuerNr" - Me.cbxSteuerNr.UseVisualStyleBackColor = True - ' 'frmUSTVoffeneAntraege ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(1457, 681) - Me.Controls.Add(Me.cbxSteuerNr) Me.Controls.Add(Me.lblKunde) Me.Controls.Add(Me.pnlLand) Me.Controls.Add(Me.cbxAlleoffenen) diff --git a/SDL/mdm/frmMDMDatenverarbetiung.vb b/SDL/mdm/frmMDMDatenverarbetiung.vb index fc5637ec..c8c5d9f4 100644 --- a/SDL/mdm/frmMDMDatenverarbetiung.vb +++ b/SDL/mdm/frmMDMDatenverarbetiung.vb @@ -1199,7 +1199,7 @@ Public Class frmMDMDatenverarbetiung INNER JOIN (((Adressen INNER JOIN tblUTAImportNew ON Adressen.UTAKundenNr = tblUTAImportNew.Kundennummer) INNER JOIN Offertenpositionen ON Adressen.AdressenNr = Offertenpositionen.KundenNr) INNER JOIN tblUTALeistungen ON (tblUTALeistungen.VERAG_LeistungsNr = Offertenpositionen.LeistungsNr) AND (tblUTALeistungen.VERAG_OffertenNr = Offertenpositionen.OffertenNr) AND (tblUTAImportNew.Lieferland = tblUTALeistungen.Lieferland) AND (tblUTAImportNew.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart)) ON tblUTAFakturierwarenarten.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart - where isnull(charged,0) = 0 and cast([Rechnungsdatum] as date) = '" & DateTimePicker2.Text & "' " & IIf(test, " and KundenNr = 402209 ", "") & + where isnull(charged,0) = 0 and cast([Rechnungsdatum] as date) = '" & DateTimePicker2.Text & "' " & IIf(test, " and KundenNr = 450018 ", "") & " group by Kundennummer, KundenNr, UTAExportCSV,Rechnungsdruck" Dim dt_Main As DataTable = SQL.loadDgvBySql_Param(SQLStr, "FMZOLL", 1200) @@ -3474,7 +3474,7 @@ Public Class frmMDMDatenverarbetiung INNER JOIN (((Adressen INNER JOIN tblUTAImportNew ON Adressen.UTAKundenNr = tblUTAImportNew.Kundennummer) INNER JOIN Offertenpositionen ON Adressen.AdressenNr = Offertenpositionen.KundenNr) INNER JOIN tblUTALeistungen ON (tblUTALeistungen.VERAG_LeistungsNr = Offertenpositionen.LeistungsNr) AND (tblUTALeistungen.VERAG_OffertenNr = Offertenpositionen.OffertenNr) AND (tblUTAImportNew.Lieferland = tblUTALeistungen.Lieferland) AND (tblUTAImportNew.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart)) ON tblUTAFakturierwarenarten.Fakturierwarenart = tblUTALeistungen.Fakturierwarenart - where Offertenpositionen.LeistungsNr is not null AND Offertenpositionen.OffertenNr = " & OffertenNr & " AND Offertenpositionen.KundenNr = " & KdNr & + where Offertenpositionen.LeistungsNr is not null AND Offertenpositionen.OffertenNr = " & OffertenNr & " AND Offertenpositionen.KundenNr = " & KdNr & " and cast(tblUTAImportNew.Rechnungsdatum as date) = '" & DateTimePicker2.Text & "' " & "group by Adressen.AdressenNr, Adressen.[Name 1], Adressen.LandKz, Adressen.Ort, Offertenpositionen.OffertenNr, Offertenpositionen.LeistungsNr, Offertenpositionen.LeistungsBez /*, tblUTAFakturierwarenarten.Warenart,tblUTAImportNew.Fakturierwarenart*/" & "having sum(tblUTAImportNew.Gesamtbetrag_Brutto_in_Darstellwährung) <> 0" diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cUTA.vb b/VERAG_PROG_ALLGEMEIN/Classes/cUTA.vb index ac9a04a2..bf7bad3c 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cUTA.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cUTA.vb @@ -352,7 +352,7 @@ Public Class cUTA Public Function SAVE() As Boolean Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() - Dim sqlstr = " BEGIN TRAN If EXISTS(Select * FROM tblUTAImportNew WHERE Übertragungsnummer=@Übertragungsnummer AND Übertragungsposition = @Übertragungsposition AND ErstellDatumUhrzeit = @ErstellDatumUhrzeit) " & + Dim sqlstr = " BEGIN TRAN If EXISTS(Select * FROM tblUTAImportNew WHERE Übertragungsnummer=@Übertragungsnummer AND Übertragungsposition = @Übertragungsposition AND ErstellDatumUhrzeit = @ErstellDatumUhrzeit and isnull(charged,0) = 0) " & " BEGIN " & getUpdateCmd() & " End " & " Else " & " BEGIN " & getInsertCmd() & " End " & @@ -404,7 +404,7 @@ Public Class cUTA End If Next str = str.Substring(0, str.Length - 1) 'wg. ',' - Return (" UPDATE [tblUTAImportNew] SET " & str & " WHERE Übertragungsnummer=@Übertragungsnummer AND Übertragungsposition = @Übertragungsposition") + Return (" UPDATE [tblUTAImportNew] SET " & str & " WHERE Übertragungsnummer=@Übertragungsnummer AND Übertragungsposition = @Übertragungsposition AND isnull(charged,0) = 0 ") Catch ex As Exception VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)