diff --git a/SDL/My Project/AssemblyInfo.vb b/SDL/My Project/AssemblyInfo.vb index 4606346b..b0ce2692 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/USTV/frmMDM_USTVAntrag.Designer.vb b/SDL/USTV/frmMDM_USTVAntrag.Designer.vb index de62ac85..779c6a92 100644 --- a/SDL/USTV/frmMDM_USTVAntrag.Designer.vb +++ b/SDL/USTV/frmMDM_USTVAntrag.Designer.vb @@ -48,6 +48,8 @@ Partial Class frmMDM_USTVAntrag Me.cbxLand = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.lblLand = New System.Windows.Forms.Label() Me.Panel8 = New System.Windows.Forms.Panel() + Me.Label15 = New System.Windows.Forms.Label() + Me.txtVZam = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.btnAbfertigungsNrVergeben = New System.Windows.Forms.Button() Me.Label14 = New System.Windows.Forms.Label() Me.txtEingereichtAm = New VERAG_PROG_ALLGEMEIN.MyTextBox() @@ -103,7 +105,6 @@ Partial Class frmMDM_USTVAntrag Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.pnlAntragsPosDetails = 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.btnEintragloeschen = New System.Windows.Forms.Button() Me.btnNeuerEintrag = New System.Windows.Forms.Button() @@ -111,14 +112,13 @@ Partial Class frmMDM_USTVAntrag Me.Panel3 = New System.Windows.Forms.Panel() Me.dgvErstattungspositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.pnlErstattungsdetails = New System.Windows.Forms.Panel() - Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition() Me.Panel1 = New System.Windows.Forms.Panel() Me.Button2 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components) - Me.Label15 = New System.Windows.Forms.Label() - Me.txtVZam = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition() + Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition() Me.pnlBottom.SuspendLayout() CType(Me.picExcel, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.picPDF, System.ComponentModel.ISupportInitialize).BeginInit() @@ -491,12 +491,50 @@ Partial Class frmMDM_USTVAntrag Me.Panel8.Size = New System.Drawing.Size(973, 87) Me.Panel8.TabIndex = 19 ' + 'Label15 + ' + Me.Label15.AutoSize = True + Me.Label15.BackColor = System.Drawing.Color.Transparent + Me.Label15.Cursor = System.Windows.Forms.Cursors.Hand + Me.Label15.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label15.ForeColor = System.Drawing.Color.Black + Me.Label15.Location = New System.Drawing.Point(800, 64) + Me.Label15.Name = "Label15" + Me.Label15.Size = New System.Drawing.Size(53, 17) + Me.Label15.TabIndex = 51 + Me.Label15.Text = "VZ am:" + ' + 'txtVZam + ' + Me.txtVZam._DateTimeOnly = False + Me.txtVZam._numbersOnly = False + Me.txtVZam._numbersOnlyKommastellen = "" + Me.txtVZam._numbersOnlyTrennzeichen = False + Me.txtVZam._Prozent = False + Me.txtVZam._ShortDateNew = False + Me.txtVZam._ShortDateOnly = True + Me.txtVZam._TimeOnly = False + Me.txtVZam._TimeOnly_Seconds = False + Me.txtVZam._value = "" + Me.txtVZam._Waehrung = False + Me.txtVZam._WaehrungZeichen = False + Me.txtVZam.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!) + Me.txtVZam.ForeColor = System.Drawing.Color.Black + Me.txtVZam.Location = New System.Drawing.Point(865, 60) + Me.txtVZam.MaxLength = 10 + Me.txtVZam.MaxLineLength = -1 + Me.txtVZam.MaxLines_Warning = "" + Me.txtVZam.MaxLines_Warning_Label = Nothing + Me.txtVZam.Name = "txtVZam" + Me.txtVZam.Size = New System.Drawing.Size(100, 23) + Me.txtVZam.TabIndex = 52 + ' 'btnAbfertigungsNrVergeben ' Me.btnAbfertigungsNrVergeben.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnAbfertigungsNrVergeben.ForeColor = System.Drawing.Color.Black Me.btnAbfertigungsNrVergeben.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.btnAbfertigungsNrVergeben.Location = New System.Drawing.Point(654, 31) + Me.btnAbfertigungsNrVergeben.Location = New System.Drawing.Point(654, 30) Me.btnAbfertigungsNrVergeben.Name = "btnAbfertigungsNrVergeben" Me.btnAbfertigungsNrVergeben.Size = New System.Drawing.Size(146, 27) Me.btnAbfertigungsNrVergeben.TabIndex = 50 @@ -692,6 +730,7 @@ Partial Class frmMDM_USTVAntrag Me.txtAbfNr.Name = "txtAbfNr" Me.txtAbfNr.Size = New System.Drawing.Size(117, 23) Me.txtAbfNr.TabIndex = 18 + Me.txtAbfNr.Text = "00000000" ' 'Label8 ' @@ -760,7 +799,7 @@ Partial Class frmMDM_USTVAntrag Me.txtBezugsNr._Waehrung = False Me.txtBezugsNr._WaehrungZeichen = False Me.txtBezugsNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!) - Me.txtBezugsNr.ForeColor = System.Drawing.Color.Black + Me.txtBezugsNr.ForeColor = System.Drawing.Color.Red Me.txtBezugsNr.Location = New System.Drawing.Point(654, 4) Me.txtBezugsNr.MaxLength = 10 Me.txtBezugsNr.MaxLineLength = -1 @@ -1322,14 +1361,6 @@ Partial Class frmMDM_USTVAntrag Me.Panel2.Size = New System.Drawing.Size(1438, 263) 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(1282, 261) - Me.UstCntlUSTV_AntragPosition1.TabIndex = 0 - ' 'Panel4 ' Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke @@ -1426,14 +1457,6 @@ Partial Class frmMDM_USTVAntrag Me.pnlErstattungsdetails.Size = New System.Drawing.Size(1436, 261) 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(1280, 259) - Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2 - ' 'Panel1 ' Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke @@ -1484,43 +1507,21 @@ Partial Class frmMDM_USTVAntrag Me.ContextMenuStrip2.Name = "ContextMenuStrip1" Me.ContextMenuStrip2.Size = New System.Drawing.Size(61, 4) ' - 'Label15 + 'UstCntlUSTV_AntragPosition1 ' - Me.Label15.AutoSize = True - Me.Label15.BackColor = System.Drawing.Color.Transparent - Me.Label15.Cursor = System.Windows.Forms.Cursors.Hand - Me.Label15.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.Label15.ForeColor = System.Drawing.Color.Black - Me.Label15.Location = New System.Drawing.Point(800, 64) - Me.Label15.Name = "Label15" - Me.Label15.Size = New System.Drawing.Size(53, 17) - Me.Label15.TabIndex = 51 - Me.Label15.Text = "VZ am:" + 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(1282, 261) + Me.UstCntlUSTV_AntragPosition1.TabIndex = 0 ' - 'txtVZam + 'UstCntlUSTV_AntragErstattungen1 ' - Me.txtVZam._DateTimeOnly = False - Me.txtVZam._numbersOnly = True - Me.txtVZam._numbersOnlyKommastellen = "" - Me.txtVZam._numbersOnlyTrennzeichen = False - Me.txtVZam._Prozent = False - Me.txtVZam._ShortDateNew = True - Me.txtVZam._ShortDateOnly = True - Me.txtVZam._TimeOnly = False - Me.txtVZam._TimeOnly_Seconds = False - Me.txtVZam._value = "" - Me.txtVZam._Waehrung = False - Me.txtVZam._WaehrungZeichen = False - Me.txtVZam.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!) - Me.txtVZam.ForeColor = System.Drawing.Color.Black - Me.txtVZam.Location = New System.Drawing.Point(865, 60) - Me.txtVZam.MaxLength = 10 - Me.txtVZam.MaxLineLength = -1 - Me.txtVZam.MaxLines_Warning = "" - Me.txtVZam.MaxLines_Warning_Label = Nothing - Me.txtVZam.Name = "txtVZam" - Me.txtVZam.Size = New System.Drawing.Size(100, 23) - Me.txtVZam.TabIndex = 52 + 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(1280, 259) + Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2 ' 'frmMDM_USTVAntrag ' diff --git a/SDL/USTV/frmMDM_USTVAntrag.vb b/SDL/USTV/frmMDM_USTVAntrag.vb index ca8e6480..63f70913 100644 --- a/SDL/USTV/frmMDM_USTVAntrag.vb +++ b/SDL/USTV/frmMDM_USTVAntrag.vb @@ -1,5 +1,6 @@ Imports System.IO Imports System.Reflection +Imports System.ServiceModel.Configuration Imports System.Windows.Documents Imports itextsharp.text.pdf Imports itextsharp.text.pdf.parser @@ -15,7 +16,7 @@ Public Class frmMDM_USTVAntrag Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Dim posTabisSelected As Boolean = True Dim atez_api = New cATEZ_NCTS_IN("ATEZ_VAT", False) - + Dim abfNrisSetManually As Boolean = False Dim von, bis As Date Sub New(UStVAn_ID) @@ -296,7 +297,7 @@ Public Class frmMDM_USTVAntrag txt3470.Text = If(USTV_ANTRAG.UStVAn_3470, "") txtVZ.Text = If(USTV_ANTRAG.UStVAn_VZBetrag, "") - txtVZam.Text = If(USTV_ANTRAG.UStVAn_VZDatum, "") + txtVZam._value = If(USTV_ANTRAG.UStVAn_VZDatum, "") txtBezugsNr.Text = If(USTV_ANTRAG.UStVAn_BezugsNr, "") txtAbfNr.Text = If(USTV_ANTRAG.AbfertigungsNr, "") txtEingereichtAm.Text = If(USTV_ANTRAG.UStVAn_AntragEingereichtAm, "") @@ -308,13 +309,10 @@ Public Class frmMDM_USTVAntrag Sub getValue(ByRef USTV_ANTRAG As VERAG_PROG_ALLGEMEIN.cUSTVAntrag, Optional ADR As cAdressen = Nothing, Optional FIRMA As cFirmen = Nothing) If Me_Validate() Then - 'lblFirma.Text = USTV_ANTRAG.UStVAn_Name - 'lblLand.Text = Antrag_LandKz + If IsDate(txtVon._value) Then USTV_ANTRAG.UStVAn_ReDatVon = CDate(txtVon._value) If IsDate(txtBis._value) Then USTV_ANTRAG.UStVAn_ReDatBis = CDate(txtBis._value) - 'lblZeitraum.Text = CDate(USTV_ANTRAG.UStVAn_ReDatVon).ToString("dd.MM.yyyy") & " - " & CDate(USTV_ANTRAG.UStVAn_ReDatBis).ToString("dd.MM.yyyy") - USTV_ANTRAG.UStVAn_Status = cboStatus._value USTV_ANTRAG.UStVAn_AntragArt = cboAntragArt._value USTV_ANTRAG.UStVAn_StatusText = rtbStatusText.Text @@ -335,7 +333,7 @@ Public Class frmMDM_USTVAntrag End If If txtVZam.Text <> "" AndAlso IsDate(txtVZam.Text) Then - USTV_ANTRAG.UStVAn_VZDatum = CDate(txtVZ.Text) + USTV_ANTRAG.UStVAn_VZDatum = CDate(txtVZam.Text) Else USTV_ANTRAG.UStVAn_VZDatum = Nothing End If @@ -344,8 +342,12 @@ Public Class frmMDM_USTVAntrag USTV_ANTRAG.UStVAn_BezugsNr = txtBezugsNr.Text USTV_ANTRAG.AbfertigungsNr = txtAbfNr.Text - If txtEingereichtAm.Text <> "" AndAlso IsDate(txtEingereichtAm.Text) Then USTV_ANTRAG.UStVAn_AntragEingereichtAm = txtEingereichtAm.Text - If txtEingereichtAm.Text = "" Then USTV_ANTRAG.UStVAn_AntragEingereichtAm = Nothing + If txtEingereichtAm.Text <> "" AndAlso IsDate(txtEingereichtAm.Text) Then + USTV_ANTRAG.UStVAn_AntragEingereichtAm = txtEingereichtAm.Text + ElseIf txtEingereichtAm.Text = "" Then + USTV_ANTRAG.UStVAn_AntragEingereichtAm = Nothing + End If + If ADR IsNot Nothing Then USTV_ANTRAG.UStVAn_KuNr = ADR.AdressenNr @@ -2191,7 +2193,7 @@ Public Class frmMDM_USTVAntrag Else - dtSteuerNr = SQL.loadDgvBySql("SELECT * FROM tblSteuernummern WHERE AdressenNr = " & KundenNr & " and tblSteuernummern.LandKz ='" & Antrag_LandKz & "'", "FMZOLL") + dtSteuerNr = SQL.loadDgvBySql("SELECT * FROM tblSteuernummern WHERE AdressenNr = " & KundenNr & " and tblSteuernummern.LandKz ='" & lblLand.Text & "'", "FMZOLL") If dtSteuerNr.Rows.Count > 0 Then txtStNr.Text = IIf(Not IsDBNull(dtSteuerNr.Rows(0).Item("StNrFürRückerstattungUSt")), dtSteuerNr.Rows(0).Item("StNrFürRückerstattungUSt"), "") @@ -2344,8 +2346,8 @@ Public Class frmMDM_USTVAntrag Next - - cProgramFunctions.genExcelFromDT_NEW(dtNew, {"K1:K" & (dtNew.Rows.Count + 1)},, "Statement itemising VAT amounts relating to the period covered by this application", "VAT NO.: " & USTV_ANTRAG.UStVAn_Steuernummer & " " & "Name/Company: " & USTV_ANTRAG.UStVAn_Name & " " & "VAT in " & Antrag_LandKz & ": " & txtStNr.Text, IIf(USTV_ANTRAG.UStVAn_Währungscode = "EUR", "€", ""), True, "E", True, True) + Dim AD As New cAdressen(USTV_ANTRAG.UStVAn_KuNr) + cProgramFunctions.genExcelFromDT_NEW(dtNew, {"K1:K" & (dtNew.Rows.Count + 1)},, "Statement itemising VAT amounts relating to the period covered by this application", "VAT NO.: " & USTV_ANTRAG.UStVAn_Steuernummer & " " & "Name/Company: " & AD.Name_1 & " " & AD.Name_2 & " " & "VAT in " & Antrag_LandKz & ": " & txtStNr.Text, IIf(USTV_ANTRAG.UStVAn_Währungscode = "EUR", "€", ""), True, "E", True, True) End If @@ -2463,8 +2465,21 @@ Public Class frmMDM_USTVAntrag Private Sub txtAbfNr_TextChanged(sender As Object, e As EventArgs) Handles txtAbfNr.TextChanged If IsNumeric(txtAbfNr.Text) AndAlso CInt(txtAbfNr.Text) > 10000 AndAlso USTV_ANTRAG.AbfertigungsNr <> txtAbfNr.Text AndAlso Not btnAbfertigungsNrVergeben.Visible Then - Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, USTV_ANTRAG.AbfertigungsNr, 0) - If spedBuch.hasEntry Then MsgBox("Es existiert bereits ein Speditionsbucheintrag mit dieser Nr!") : Exit Sub + Dim spedBuch As New cSpeditionsbuch(USTV_ANTRAG.FilialenNr, txtAbfNr.Text, 0) + If spedBuch.hasEntry Then + MsgBox("Es existiert bereits ein Speditionsbucheintrag mit dieser Nr!") + Exit Sub + Else + If Not abfNrisSetManually Then + abfNrisSetManually = True + txtAbfNr.Text = CInt(CDate(USTV_ANTRAG.UStVAn_ReDatVon).Year.ToString.Substring(2, 2)) * 1000000 + CInt(txtAbfNr.Text) + + End If + Exit Sub + + End If + Else + abfNrisSetManually = False End If End Sub diff --git a/SDL/USTV/frmUSTVoffeneAntraege.vb b/SDL/USTV/frmUSTVoffeneAntraege.vb index b5425c27..cde52ec1 100644 --- a/SDL/USTV/frmUSTVoffeneAntraege.vb +++ b/SDL/USTV/frmUSTVoffeneAntraege.vb @@ -451,7 +451,7 @@ Public Class frmUSTVoffeneAntraege tblTrdinInvoice.Rechnungsdatum, 'AT' as Land, tblTrdinInvoice.Rechnungsnummer, - tblTrdinInvoice.SteuerbetragLokal, + tblTrdinInvoice.SteuerbetragLokal FROM tblTrdinInvoice inner join Adressen on Adressen.AdressenNr = tblTrdinInvoice.RechnungsKundenNr WHERE tblTrdinInvoice.Rechnungsdatum Between '" & dat_Sum_Von.Value & "' And '" & dat_Sum_Bis.Value & "' AND tblTrdinInvoice.SteuerbetragLokal<>0 AND tblTrdinInvoice.UStVAn_ID is null And Firma_ID = 19 AND tblTrdinInvoice.WährungLokal='EUR' " & sqlwhere & " @@ -910,12 +910,12 @@ Public Class frmUSTVoffeneAntraege If MyDatagridview1.SelectedRows(0).Cells("antragExisitiert").Value > 0 Then Dim frm = New frmMDM_USTVAntrag(MyDatagridview1.SelectedRows(0).Cells("antragExisitiert").Value) - frm.Show() + frm.ShowDialog() Else Dim frm = New frmMDM_USTVAntrag(MyDatagridview1.SelectedRows(0).Cells("KdNr").Value, MyDatagridview1.SelectedRows(0).Cells("Einreichland").Value, dat_Sum_Von.Value, dat_Sum_Bis.Value) - frm.Show() + frm.ShowDialog() End If diff --git a/SDL/buchhaltung/frmBU_Mahnlauf.vb b/SDL/buchhaltung/frmBU_Mahnlauf.vb index 739822c5..b20ef53a 100644 --- a/SDL/buchhaltung/frmBU_Mahnlauf.vb +++ b/SDL/buchhaltung/frmBU_Mahnlauf.vb @@ -1261,7 +1261,7 @@ Public Class frmBU_Mahnlauf Dim dt = MyDatagridview1.DataSource If cbxZahlungseingaenge.Checked Then - cProgramFunctions.genExcelFromDT_NEW(dt, {"E1:E" & (dt.Rows.Count + 1)},,, "Zahlungseingänge vom " & txtZahlEingaenge._value,, True) + cProgramFunctions.genExcelFromDT_NEW(dt, {"D1:D" & (dt.Rows.Count + 1)},,, "Zahlungseingänge vom " & txtZahlEingaenge._value,, True) Else cProgramFunctions.genExcelFromDT_NEW(dt, {"G1:G" & (dt.Rows.Count + 1), "J1:J" & (dt.Rows.Count + 1)}) End If @@ -1357,7 +1357,7 @@ Public Class frmBU_Mahnlauf Dim dt = MyDatagridview1.DataSource Dim desc = "Zahlungseingänge vom " & txtZahlEingaenge._value - Dim attachment = cProgramFunctions.genExcelFromDT_NEW(dt, {"E1:E" & (dt.Rows.Count + 1)},,, desc,, True,,,, False) + Dim attachment = cProgramFunctions.genExcelFromDT_NEW(dt, {"D1:D" & (dt.Rows.Count + 1)},,, desc,, True,,,, False) Dim outl As New Outlook.Application diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cMDMFunctionsAllgemein.vb b/VERAG_PROG_ALLGEMEIN/Classes/cMDMFunctionsAllgemein.vb index fc35912f..8bfc738d 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cMDMFunctionsAllgemein.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cMDMFunctionsAllgemein.vb @@ -427,7 +427,7 @@ Public Class cMDMFunctionsAllgemein Dim dtIDSENeut As DataTable = sql.loadDgvBySql(sqlFMZollDatenNEU, "FMZOLL") For Each r As DataRow In dtIDSENeut.Rows - Dim UST_org = CDbl(r.Item("UST_EUR")) + Dim UST_org = CDbl(r.Item("Vorschaubetrag")) If UST_org <> 0 Then summeNeueSchnittstelle += UST_org End If