From aedcc9ff0ce6b270fd128ee59120b1910e8e71e1 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Thu, 5 Jun 2025 09:04:38 +0200 Subject: [PATCH] Seriendruck, Mahnlauf, etc. --- SDL/My Project/AssemblyInfo.vb | 4 +- SDL/buchhaltung/frmBU_Mahnlauf.vb | 8 +- SDL/seriendruck/usrCntlFakturierung.vb | 2 +- .../usrCntlSeriendruck.Designer.vb | 265 ++++++++++-------- SDL/seriendruck/usrCntlSeriendruck.vb | 20 +- 5 files changed, 168 insertions(+), 131 deletions(-) diff --git a/SDL/My Project/AssemblyInfo.vb b/SDL/My Project/AssemblyInfo.vb index b4ed9aac..523e6988 100644 --- a/SDL/My Project/AssemblyInfo.vb +++ b/SDL/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/SDL/buchhaltung/frmBU_Mahnlauf.vb b/SDL/buchhaltung/frmBU_Mahnlauf.vb index 342ef7f6..df209b9b 100644 --- a/SDL/buchhaltung/frmBU_Mahnlauf.vb +++ b/SDL/buchhaltung/frmBU_Mahnlauf.vb @@ -426,15 +426,15 @@ Public Class frmBU_Mahnlauf Select Case FIRMA.Firma_ID Case 1 : rpt.picVERAG.Image = My.Resources.Verag_AG_Logo : rpt.Picture1.Image = My.Resources.aeo 'is eh standard - Case 7 : rpt.picVERAG.Image = My.Resources.Atilla_big_med : rpt.Picture1.Image = Nothing + Case 7 : rpt.picVERAG.Image = My.Resources.Atilla_big_med ': rpt.Picture1.Image = Nothing Case 11 : rpt.picVERAG.Image = My.Resources.Verag_Customs_Service_GMBH_Logo : rpt.Picture1.Image = Nothing Case 20 : rpt.picVERAG.Image = My.Resources.IMEX_LOGO_simple : rpt.Picture1.Image = My.Resources.aeo_AT_imex Case 21 : rpt.picVERAG.Image = My.Resources.Unisped_logo : rpt.Picture1.Image = My.Resources.unisped_aeo_AT Case 22 : rpt.picVERAG.Image = My.Resources.Unisped_DE_logo : rpt.Picture1.Image = My.Resources.unisped_aeo_DE - Case 26 : rpt.picVERAG.Image = My.Resources.VERAG_UNISPED_Logo : rpt.Picture1.Image = Nothing + Case 26 : rpt.picVERAG.Image = My.Resources.VERAG_UNISPED_Logo ': rpt.Picture1.Image = Nothing Case 23 : rpt.picVERAG.Image = My.Resources.Unisped_ZS_logo : rpt.Picture1.Image = My.Resources.unisped_aeo_ZS_AT - Case 17 : rpt.picVERAG.Image = My.Resources.FrontOfficeSUB_Horizontal : rpt.Picture1.Image = Nothing - Case 19 : rpt.picVERAG.Image = My.Resources.VERAG_360 : rpt.Picture1.Image = Nothing : rpt.lblFirmaFax.Visible = False : rpt.lblEmail.Visible = False : rpt.lblFaxNr.Visible = False + Case 17 : rpt.picVERAG.Image = My.Resources.FrontOfficeSUB_Horizontal ': rpt.Picture1.Image = Nothing + Case 19 : rpt.picVERAG.Image = My.Resources.VERAG_360 : rpt.lblFirmaFax.Visible = False : rpt.lblEmail.Visible = False : rpt.lblFaxNr.Visible = False ': rpt.Picture1.Image = Nothing End Select Dim ZZTage = 10 diff --git a/SDL/seriendruck/usrCntlFakturierung.vb b/SDL/seriendruck/usrCntlFakturierung.vb index 9629329f..0bc62d76 100644 --- a/SDL/seriendruck/usrCntlFakturierung.vb +++ b/SDL/seriendruck/usrCntlFakturierung.vb @@ -1957,7 +1957,7 @@ Public Class usrcntlFakturierung For Each row In dt.Rows If Not IsDBNull(row("SteuerpflichtigerGesamtbetrag")) AndAlso IsNumeric(row("SteuerpflichtigerGesamtbetrag")) Then SteuerpflichtigerBetrag += CDbl(row("SteuerpflichtigerGesamtbetrag")) If Not IsDBNull(row("SteuerfreierGesamtbetrag")) AndAlso IsNumeric(row("SteuerfreierGesamtbetrag")) Then SteuerfreierBetrag += CDbl(row("SteuerfreierGesamtbetrag")) - If Not IsDBNull(row("Anzahl")) AndAlso IsNumeric(row("Anzahl")) Then Anzahl += CInt(row("Anzahl")) + If dt.Columns.Contains("Anzahl") AndAlso Not IsDBNull(row("Anzahl")) AndAlso IsNumeric(row("Anzahl")) Then Anzahl += CInt(row("Anzahl")) Next diff --git a/SDL/seriendruck/usrCntlSeriendruck.Designer.vb b/SDL/seriendruck/usrCntlSeriendruck.Designer.vb index 1a58d32e..7705a1af 100644 --- a/SDL/seriendruck/usrCntlSeriendruck.Designer.vb +++ b/SDL/seriendruck/usrCntlSeriendruck.Designer.vb @@ -37,18 +37,20 @@ Partial Class usrCntlSeriendruck Me.cbxErstSprache = New System.Windows.Forms.ComboBox() Me.btnWord = New System.Windows.Forms.Button() Me.GroupBox2 = New System.Windows.Forms.GroupBox() - Me.Label3 = New System.Windows.Forms.Label() - Me.Label4 = New System.Windows.Forms.Label() + Me.txtErstattungsUnterNr_Mail = New System.Windows.Forms.TextBox() + Me.cboErstattungsart = New System.Windows.Forms.ComboBox() + Me.txtErstattungsNr_Mail = New System.Windows.Forms.TextBox() + Me.Label6 = New System.Windows.Forms.Label() + Me.Label5 = New System.Windows.Forms.Label() + Me.txtFiliale_Mail = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.Button1 = New System.Windows.Forms.Button() + Me.btnMail_Intern = New System.Windows.Forms.Button() Me.Label9 = New System.Windows.Forms.Label() Me.datBis = New System.Windows.Forms.DateTimePicker() Me.Label10 = New System.Windows.Forms.Label() Me.datVon = New System.Windows.Forms.DateTimePicker() - Me.btnMail_Intern = New System.Windows.Forms.Button() - Me.Button1 = New System.Windows.Forms.Button() - Me.txtFiliale = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.Label5 = New System.Windows.Forms.Label() - Me.Label6 = New System.Windows.Forms.Label() - Me.cboErstattungsart = New System.Windows.Forms.ComboBox() + Me.Label3 = New System.Windows.Forms.Label() + Me.Label4 = New System.Windows.Forms.Label() Me.GroupBox1.SuspendLayout() Me.GroupBox2.SuspendLayout() Me.SuspendLayout() @@ -249,10 +251,12 @@ Partial Class usrCntlSeriendruck ' 'GroupBox2 ' + Me.GroupBox2.Controls.Add(Me.txtErstattungsUnterNr_Mail) Me.GroupBox2.Controls.Add(Me.cboErstattungsart) + Me.GroupBox2.Controls.Add(Me.txtErstattungsNr_Mail) Me.GroupBox2.Controls.Add(Me.Label6) Me.GroupBox2.Controls.Add(Me.Label5) - Me.GroupBox2.Controls.Add(Me.txtFiliale) + Me.GroupBox2.Controls.Add(Me.txtFiliale_Mail) Me.GroupBox2.Controls.Add(Me.Button1) Me.GroupBox2.Controls.Add(Me.btnMail_Intern) Me.GroupBox2.Controls.Add(Me.Label9) @@ -265,6 +269,136 @@ Partial Class usrCntlSeriendruck Me.GroupBox2.TabIndex = 1 Me.GroupBox2.TabStop = False ' + 'txtErstattungsUnterNr_Mail + ' + Me.txtErstattungsUnterNr_Mail.Location = New System.Drawing.Point(221, 17) + Me.txtErstattungsUnterNr_Mail.MaxLength = 2 + Me.txtErstattungsUnterNr_Mail.Name = "txtErstattungsUnterNr_Mail" + Me.txtErstattungsUnterNr_Mail.Size = New System.Drawing.Size(22, 20) + Me.txtErstattungsUnterNr_Mail.TabIndex = 12 + Me.txtErstattungsUnterNr_Mail.Text = "00" + ' + 'cboErstattungsart + ' + Me.cboErstattungsart.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList + Me.cboErstattungsart.FlatStyle = System.Windows.Forms.FlatStyle.System + Me.cboErstattungsart.FormattingEnabled = True + Me.cboErstattungsart.Location = New System.Drawing.Point(130, 43) + Me.cboErstattungsart.Name = "cboErstattungsart" + Me.cboErstattungsart.Size = New System.Drawing.Size(113, 21) + Me.cboErstattungsart.TabIndex = 11 + ' + 'txtErstattungsNr_Mail + ' + Me.txtErstattungsNr_Mail.Location = New System.Drawing.Point(130, 17) + Me.txtErstattungsNr_Mail.MaxLength = 20 + Me.txtErstattungsNr_Mail.Name = "txtErstattungsNr_Mail" + Me.txtErstattungsNr_Mail.Size = New System.Drawing.Size(85, 20) + Me.txtErstattungsNr_Mail.TabIndex = 11 + ' + 'Label6 + ' + Me.Label6.AutoSize = True + Me.Label6.Location = New System.Drawing.Point(16, 46) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(75, 13) + Me.Label6.TabIndex = 51 + Me.Label6.Text = "Erstattungsart:" + ' + 'Label5 + ' + Me.Label5.AutoSize = True + Me.Label5.Location = New System.Drawing.Point(16, 17) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(36, 13) + Me.Label5.TabIndex = 50 + Me.Label5.Text = "Filiale:" + ' + 'txtFiliale_Mail + ' + Me.txtFiliale_Mail._DateTimeOnly = False + Me.txtFiliale_Mail._numbersOnly = True + Me.txtFiliale_Mail._numbersOnlyKommastellen = "" + Me.txtFiliale_Mail._numbersOnlyTrennzeichen = False + Me.txtFiliale_Mail._Prozent = False + Me.txtFiliale_Mail._ShortDateNew = False + Me.txtFiliale_Mail._ShortDateOnly = False + Me.txtFiliale_Mail._TimeOnly = False + Me.txtFiliale_Mail._TimeOnly_Seconds = False + Me.txtFiliale_Mail._value = "" + Me.txtFiliale_Mail._Waehrung = False + Me.txtFiliale_Mail._WaehrungZeichen = True + Me.txtFiliale_Mail.ForeColor = System.Drawing.Color.Black + Me.txtFiliale_Mail.Location = New System.Drawing.Point(91, 14) + Me.txtFiliale_Mail.MaxLineLength = -1 + Me.txtFiliale_Mail.MaxLines_Warning = "" + Me.txtFiliale_Mail.MaxLines_Warning_Label = Nothing + Me.txtFiliale_Mail.Name = "txtFiliale_Mail" + Me.txtFiliale_Mail.Size = New System.Drawing.Size(33, 20) + Me.txtFiliale_Mail.TabIndex = 11 + Me.txtFiliale_Mail.Text = "4817" + ' + 'Button1 + ' + Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button1.ForeColor = System.Drawing.Color.Black + Me.Button1.Location = New System.Drawing.Point(519, 17) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(121, 23) + Me.Button1.TabIndex = 11 + Me.Button1.Text = "Datensatz anzeigen" + Me.Button1.UseVisualStyleBackColor = True + ' + 'btnMail_Intern + ' + Me.btnMail_Intern.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnMail_Intern.BackgroundImage = Global.SDL.My.Resources.Resources.email_big1 + Me.btnMail_Intern.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.btnMail_Intern.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnMail_Intern.Location = New System.Drawing.Point(519, 61) + Me.btnMail_Intern.Name = "btnMail_Intern" + Me.btnMail_Intern.Size = New System.Drawing.Size(41, 34) + Me.btnMail_Intern.TabIndex = 49 + Me.btnMail_Intern.UseVisualStyleBackColor = True + ' + 'Label9 + ' + Me.Label9.AutoSize = True + Me.Label9.Location = New System.Drawing.Point(190, 78) + Me.Label9.Name = "Label9" + Me.Label9.Size = New System.Drawing.Size(23, 13) + Me.Label9.TabIndex = 14 + Me.Label9.Text = "bis:" + Me.Label9.Visible = False + ' + 'datBis + ' + Me.datBis.Format = System.Windows.Forms.DateTimePickerFormat.[Short] + Me.datBis.Location = New System.Drawing.Point(219, 75) + Me.datBis.Name = "datBis" + Me.datBis.Size = New System.Drawing.Size(93, 20) + Me.datBis.TabIndex = 13 + Me.datBis.Visible = False + ' + 'Label10 + ' + Me.Label10.AutoSize = True + Me.Label10.Location = New System.Drawing.Point(13, 78) + Me.Label10.Name = "Label10" + Me.Label10.Size = New System.Drawing.Size(72, 13) + Me.Label10.TabIndex = 12 + Me.Label10.Text = "Zeitraum von:" + Me.Label10.Visible = False + ' + 'datVon + ' + Me.datVon.Format = System.Windows.Forms.DateTimePickerFormat.[Short] + Me.datVon.Location = New System.Drawing.Point(91, 75) + Me.datVon.Name = "datVon" + Me.datVon.Size = New System.Drawing.Size(93, 20) + Me.datVon.TabIndex = 11 + Me.datVon.Visible = False + ' 'Label3 ' Me.Label3.AutoSize = True @@ -287,115 +421,6 @@ Partial Class usrCntlSeriendruck Me.Label4.TabIndex = 3 Me.Label4.Text = "Gutschrift - Erstattungsschreiben Mail" ' - 'Label9 - ' - Me.Label9.AutoSize = True - Me.Label9.Location = New System.Drawing.Point(190, 22) - Me.Label9.Name = "Label9" - Me.Label9.Size = New System.Drawing.Size(23, 13) - Me.Label9.TabIndex = 14 - Me.Label9.Text = "bis:" - ' - 'datBis - ' - Me.datBis.Format = System.Windows.Forms.DateTimePickerFormat.[Short] - Me.datBis.Location = New System.Drawing.Point(219, 19) - Me.datBis.Name = "datBis" - Me.datBis.Size = New System.Drawing.Size(93, 20) - Me.datBis.TabIndex = 13 - ' - 'Label10 - ' - Me.Label10.AutoSize = True - Me.Label10.Location = New System.Drawing.Point(13, 22) - Me.Label10.Name = "Label10" - Me.Label10.Size = New System.Drawing.Size(72, 13) - Me.Label10.TabIndex = 12 - Me.Label10.Text = "Zeitraum von:" - ' - 'datVon - ' - Me.datVon.Format = System.Windows.Forms.DateTimePickerFormat.[Short] - Me.datVon.Location = New System.Drawing.Point(91, 19) - Me.datVon.Name = "datVon" - Me.datVon.Size = New System.Drawing.Size(93, 20) - Me.datVon.TabIndex = 11 - ' - 'btnMail_Intern - ' - Me.btnMail_Intern.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnMail_Intern.BackgroundImage = Global.SDL.My.Resources.Resources.email_big1 - Me.btnMail_Intern.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom - Me.btnMail_Intern.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.btnMail_Intern.Location = New System.Drawing.Point(519, 61) - Me.btnMail_Intern.Name = "btnMail_Intern" - Me.btnMail_Intern.Size = New System.Drawing.Size(41, 34) - Me.btnMail_Intern.TabIndex = 49 - Me.btnMail_Intern.UseVisualStyleBackColor = True - ' - 'Button1 - ' - Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button1.ForeColor = System.Drawing.Color.Black - Me.Button1.Location = New System.Drawing.Point(519, 17) - Me.Button1.Name = "Button1" - Me.Button1.Size = New System.Drawing.Size(121, 23) - Me.Button1.TabIndex = 11 - Me.Button1.Text = "Datensatz anzeigen" - Me.Button1.UseVisualStyleBackColor = True - ' - 'txtFiliale - ' - Me.txtFiliale._DateTimeOnly = False - Me.txtFiliale._numbersOnly = True - Me.txtFiliale._numbersOnlyKommastellen = "" - Me.txtFiliale._numbersOnlyTrennzeichen = False - Me.txtFiliale._Prozent = False - Me.txtFiliale._ShortDateNew = False - Me.txtFiliale._ShortDateOnly = False - Me.txtFiliale._TimeOnly = False - Me.txtFiliale._TimeOnly_Seconds = False - Me.txtFiliale._value = "" - Me.txtFiliale._Waehrung = False - Me.txtFiliale._WaehrungZeichen = True - Me.txtFiliale.ForeColor = System.Drawing.Color.Black - Me.txtFiliale.Location = New System.Drawing.Point(91, 46) - Me.txtFiliale.MaxLineLength = -1 - Me.txtFiliale.MaxLines_Warning = "" - Me.txtFiliale.MaxLines_Warning_Label = Nothing - Me.txtFiliale.Name = "txtFiliale" - Me.txtFiliale.Size = New System.Drawing.Size(33, 20) - Me.txtFiliale.TabIndex = 11 - Me.txtFiliale.Text = "4817" - ' - 'Label5 - ' - Me.Label5.AutoSize = True - Me.Label5.Location = New System.Drawing.Point(16, 49) - Me.Label5.Name = "Label5" - Me.Label5.Size = New System.Drawing.Size(36, 13) - Me.Label5.TabIndex = 50 - Me.Label5.Text = "Filiale:" - ' - 'Label6 - ' - Me.Label6.AutoSize = True - Me.Label6.Location = New System.Drawing.Point(132, 49) - Me.Label6.Name = "Label6" - Me.Label6.Size = New System.Drawing.Size(75, 13) - Me.Label6.TabIndex = 51 - Me.Label6.Text = "Erstattungsart:" - ' - 'cboErstattungsart - ' - Me.cboErstattungsart.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList - Me.cboErstattungsart.FlatStyle = System.Windows.Forms.FlatStyle.System - Me.cboErstattungsart.FormattingEnabled = True - Me.cboErstattungsart.Location = New System.Drawing.Point(219, 46) - Me.cboErstattungsart.Name = "cboErstattungsart" - Me.cboErstattungsart.Size = New System.Drawing.Size(95, 21) - Me.cboErstattungsart.TabIndex = 11 - ' 'usrCntlSeriendruck ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -441,5 +466,7 @@ Partial Class usrCntlSeriendruck Friend WithEvents cboErstattungsart As ComboBox Friend WithEvents Label6 As Label Friend WithEvents Label5 As Label - Friend WithEvents txtFiliale As VERAG_PROG_ALLGEMEIN.MyTextBox + Friend WithEvents txtFiliale_Mail As VERAG_PROG_ALLGEMEIN.MyTextBox + Friend WithEvents txtErstattungsUnterNr_Mail As TextBox + Friend WithEvents txtErstattungsNr_Mail As TextBox End Class diff --git a/SDL/seriendruck/usrCntlSeriendruck.vb b/SDL/seriendruck/usrCntlSeriendruck.vb index 221c7f26..923cfbab 100644 --- a/SDL/seriendruck/usrCntlSeriendruck.vb +++ b/SDL/seriendruck/usrCntlSeriendruck.vb @@ -237,13 +237,24 @@ Public Class usrCntlSeriendruck Private Sub btnMail_Intern_Click(sender As Object, e As EventArgs) Handles btnMail_Intern.Click + If txtErstattungsNr_Mail.Text = "" Then + txtErstattungsNr_Mail.Focus() + Exit Sub + End If + + If txtErstattungsUnterNr_Mail.Text = "" Then + txtErstattungsUnterNr_Mail.Focus() + Exit Sub + End If + If cboErstattungsart.SelectedIndex <> 4 Then MsgBox("Die Erstattungsschreiben sind aktuell nur für den Typ 4 - Auf Sicherheit verfügbar!") Exit Sub End If Dim dt As New DataTable - dt = generateDTErstattungen() + dt = + generateDTErstattungen() If dt.Rows.Count > 0 Then @@ -339,7 +350,7 @@ Public Class usrCntlSeriendruck Dim dt As New DataTable - If txtFiliale.Text = "" Then Return Nothing + If txtFiliale_Mail.Text = "" Then Return Nothing Dim SQLString = "SELECT dbo.tblUStVAntrag.UStVAn_KuNr as kdNr,Rechnungsausgang.RechnungsNr as Belegnummer, cast(Rechnungsausgang.RechnungsDatum as date) as Belegdatum, CONVERT(varchar(512), dbo.tblUStVAntrag.UStVAn_Name) AS Name, CONVERT(varchar(512), ISNULL(dbo.tblUStVAntrag.UStVAn_Straße, '')) AS Straße, CONVERT(varchar(255), dbo.tblUStVAntrag.UStVAn_PLZ + ' ' + dbo.tblUStVAntrag.UStVAn_Ort) AS Ort, CONVERT(varchar(10), dbo.tblUStVAntrag.UStVAn_LandKz) AS LandKz, CONVERT(varchar(255), @@ -351,9 +362,8 @@ Public Class usrCntlSeriendruck FROM dbo.Rechnungsausgang INNER JOIN dbo.tblUStVAntrag ON dbo.Rechnungsausgang.AbfertigungsNr = dbo.tblUStVAntrag.AbfertigungsNr AND dbo.Rechnungsausgang.FilialenNr = dbo.tblUStVAntrag.FilialenNr INNER JOIN dbo.[Länderverzeichnis für die Außenhandelsstatistik] ON dbo.tblUStVAntrag.UStVAn_LandNr = dbo.[Länderverzeichnis für die Außenhandelsstatistik].LandNr - INNER JOIN dbo.Kunden ON dbo.tblUStVAntrag.UStVAn_KuNr = dbo.Kunden.KundenNr - INNER JOIN dbo.tblKundenErweitert ON dbo.tblUStVAntrag.UStVAn_KuNr = tblKundenErweitert.kde_KundenNr and ISNULL(tblKundenErweitert.kde_Erstattungsart, 0) = " & cboErstattungsart.SelectedIndex & - " WHERE dbo.Rechnungsausgang.Rechnungsdatum between '" & datVon.Value.ToShortDateString & "' and '" & datBis.Value.ToShortDateString & "' AND dbo.Rechnungsausgang.FilialenNr = " & txtFiliale.Text & " AND Rechnungsausgang.RechnungsNr is not null" + INNER JOIN dbo.Kunden ON dbo.tblUStVAntrag.UStVAn_KuNr = dbo.Kunden.KundenNr + WHERE dbo.Rechnungsausgang.AbfertigungsNr= " & txtErstattungsNr_Mail.Text & " AND dbo.Rechnungsausgang.FilialenNr = " & txtFiliale_Mail.Text & " AND dbo.Rechnungsausgang.UnterNr=" & txtErstattungsUnterNr_Mail.Text dt = (New SQL).loadDgvBySql(SQLString, "FMZOLL")