Merge branch 'newMaster2024' of https://dev.azure.com/VeragAG/_git/SDL into newMaster2024

This commit is contained in:
2025-04-14 09:12:51 +02:00
6 changed files with 517 additions and 465 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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
@@ -2462,9 +2464,23 @@ 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
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, 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
@@ -2475,9 +2491,39 @@ Public Class frmMDM_USTVAntrag
MsgBox("Bitte Filiale auswählen!") : Exit Sub
End If
txtAbfNr.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.getMaxPosNrIncrement(cbxFiliale._value, Now.Year)
If txtBezugsNr.Text = "" AndAlso txtAbfNr.Text.ToString.Length >= 6 Then
txtBezugsNr.Text = txtAbfNr.Text.Substring(txtAbfNr.Text.ToString.Length - 6, 6)
txtBezugsNr.Text = txtBezugsNr.Text.TrimStart("0"c)
End If
cbxFiliale.Enabled = False
btnAbfertigungsNrVergeben.Visible = False
End Sub
Private Sub txtAbfNr_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtAbfNr.PreviewKeyDown
If e.KeyValue = 9 Then
If IsNumeric(txtAbfNr.Text) AndAlso CInt(txtAbfNr.Text) > 10000 AndAlso USTV_ANTRAG.AbfertigungsNr <> txtAbfNr.Text Then
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
End If
If txtBezugsNr.Text = "" AndAlso txtAbfNr.Text.ToString.Length >= 6 Then
txtBezugsNr.Text = txtAbfNr.Text.Substring(txtAbfNr.Text.ToString.Length - 6, 6)
txtBezugsNr.Text = txtBezugsNr.Text.TrimStart("0"c)
End If
End If
End If
End Sub
Private Sub calcSumme()

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -666,6 +666,8 @@ Public Class cATEZ_NCTS_IN
Dim bTls As Boolean = True
Dim port As Integer = 443
Dim bAutoReconnect As Boolean = True
'API_STRING = API_STRING.Replace("https://", "")
'API_STRING = API_STRING.Replace("http://", "")
success = rest.Connect(API_STRING, port, bTls, bAutoReconnect)
If (success <> True) Then
Debug.WriteLine("ConnectFailReason: " & rest.ConnectFailReason)
@@ -691,6 +693,10 @@ Public Class cATEZ_NCTS_IN
'rest.DebugMode = True
Dim sbResponseBody As New Chilkat.StringBuilder
'myuri = myuri.Replace("https:/", "")
'myuri = myuri.Replace("http:/", "")
Dim ResponseStr = rest.FullRequestSb(method, myuri, sbRequestBody, sbResponseBody)