Merge branch 'newMaster2024' of https://git.it.verag.ag/edv/SDL into newMaster2024

This commit is contained in:
2025-11-05 08:47:41 +01:00
56 changed files with 8463 additions and 1235 deletions

View File

@@ -377,34 +377,39 @@ Public Class usrcntlPDFScanList
Try
Dim added = False
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
If DS IsNot Nothing Then
If files.Count > 1 Then
MsgBox("Nur eine Datei möglich!")
ElseIf files.Count > 0 Then
If files(0) <> "" Then
Dim fio As New System.IO.FileInfo(files(0))
If DS.uploadDataToDATENSERVER(files(0), fio.Name, ".pdf") Then
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
If files.Count > 1 Then
MsgBox("Nur eine Datei möglich!")
ElseIf files.Count > 0 Then
If files(0) <> "" Then
Dim fio As New System.IO.FileInfo(files(0))
If DS.uploadDataToDATENSERVER(files(0), fio.Name, ".pdf") Then
RaiseEvent FileAdded(DS.da_id, DS.GET_TOP1_PATH, DS.da_name)
MsgBox("Dokument wurde hochgeladen.")
End If
End If
End If
ElseIf e.Data.GetDataPresent("FileGroupDescriptor") Then
Dim FilePath = VERAG_PROG_ALLGEMEIN.cProgramFunctions.EmAilAttach(e)
If FilePath <> "" Then
Dim fio As New System.IO.FileInfo(FilePath)
If DS.uploadDataToDATENSERVER(FilePath, fio.Name, ".pdf") Then
RaiseEvent FileAdded(DS.da_id, DS.GET_TOP1_PATH, DS.da_name)
MsgBox("Dokument wurde hochgeladen.")
End If
End If
End If
ElseIf e.Data.GetDataPresent("FileGroupDescriptor") Then
Dim FilePath = VERAG_PROG_ALLGEMEIN.cProgramFunctions.EmAilAttach(e)
If FilePath <> "" Then
Dim fio As New System.IO.FileInfo(FilePath)
If DS.uploadDataToDATENSERVER(FilePath, fio.Name, ".pdf") Then
RaiseEvent FileAdded(DS.da_id, DS.GET_TOP1_PATH, DS.da_name)
MsgBox("Dokument wurde hochgeladen.")
End If
End If
initPdf()
End If
initPdf()
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)

View File

@@ -824,6 +824,7 @@ Public Class SQL
Case "VERAG" : conn = GetNewOpenConnectionFMZOLL()
Case "WEB" : conn = GetNewOpenConnectionWEB()
Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT()
Case "FIBU" : conn = GetNewOpenConnectionSYSKA()
End Select
Using cmd As New SqlCommand(sql, conn)

View File

@@ -10,6 +10,7 @@ Public Class cKundenVollmachten
Property kdvm_erhalten_Datum As Object = Nothing
Property kdvm_Info As String
Property kdvm_datenarchivId As Object = Nothing
Property kdvm_datenarchivId_2 As Object = Nothing
Property kdvm_archiviert As Boolean = False
Property kdvm_gueltig_bis As Object = Nothing
Property kdvm_gueltig_ab As Object = Nothing
@@ -43,6 +44,7 @@ Public Class cKundenVollmachten
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kdvm_erhalten_Datum", kdvm_erhalten_Datum))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kdvm_Info", kdvm_Info))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kdvm_datenarchivId", kdvm_datenarchivId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kdvm_datenarchivId_2", kdvm_datenarchivId_2))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kdvm_archiviert", kdvm_archiviert))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kdvm_gueltig_bis", kdvm_gueltig_bis))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kdvm_gueltig_ab", kdvm_gueltig_ab))

View File

@@ -828,7 +828,7 @@ Public Class cMDMFunctionsAllgemein
Case 10 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) [daId] FROM [tblUTAImportNew] where Rechnungsdatum='" & reDat & "' and Abrechnungsnummer='" & reNr & "' and Lieferland_ISO2='" & Antrag_LandKz & "' AND daId is not null", "FMZOLL",,, -1)
Case 7 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) [rmc_daId] FROM [tblRMCImport] where rmc_reDatum='" & reDat & "' and rmc_reNr='" & reNr & "' and rmc_landKZ='" & Antrag_LandKz & "' AND [rmc_daId] is not null", "FMZOLL",,, -1)
Case 8 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNew.daId FROM [tblIDSTransactionsNew] INNER JOIN tbl_IDS_Länder ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode LEFT JOIN tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber where tblIDSTransactionsNew.[YearMonthDay] ='" & reDat & "' AND ISNULL(tblIDSTransactionsNew.[OBONumber], ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) ='" & reNr & "' and tbl_IDS_Länder.Lieferland_ISO2='" & Antrag_LandKz & "' AND tblIDSInvoicesNew.daId is not null", "FMZOLL",,, -1)
Case 12 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNewSplittedByCountry.daId FROM [tblIDSInvoicesNewSplittedByCountry] where tblIDSInvoicesNewSplittedByCountry.[YearMonthDay] ='" & reDat & "' AND tblIDSInvoicesNewSplittedByCountry.Invoicenumber ='" & reNr.ToString.Replace("/", "") & "' andtblIDSInvoicesNewSplittedByCountry.Country='" & Antrag_LandKz & "' AND tblIDSInvoicesNewSplittedByCountry.daId is not null", "FMZOLL",,, -1)
Case 12 : da_id = SQL.getValueTxtBySql("SELECT TOP(1) tblIDSInvoicesNewSplittedByCountry.daId FROM [tblIDSInvoicesNewSplittedByCountry] where tblIDSInvoicesNewSplittedByCountry.[YearMonthDay] ='" & reDat & "' AND tblIDSInvoicesNewSplittedByCountry.Invoicenumber ='" & reNr.ToString.Replace("/", "") & "' and tblIDSInvoicesNewSplittedByCountry.Country='" & Antrag_LandKz & "' AND tblIDSInvoicesNewSplittedByCountry.daId is not null", "FMZOLL",,, -1)
End Select
Return da_id

View File

@@ -20,6 +20,8 @@ Public Class cMDMZinsberechnung
Property zahlungsperiode_start As Object = Nothing
Property zahlungsperiode_ende As Object = Nothing
Property faelligkeitsDatum As Object = Nothing
Public hasEntry = False
Dim SQL As New SQL
@@ -53,6 +55,7 @@ Public Class cMDMZinsberechnung
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("zahlungsBetrag", zahlungsBetrag))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("zahlungsperiode_start", zahlungsperiode_start))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("zahlungsperiode_ende", zahlungsperiode_ende))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("faelligkeitsDatum", faelligkeitsDatum))
Return list

View File

@@ -28,6 +28,7 @@ Public Class cTranslate_LIST
T.trs_text = dr("trs_text")
T.trs_FirmaID = dr("trs_FirmaID")
T.trs_Option = dr("trs_Option")
T.trs_textDE = dr("trs_textDE")
list.Add(T)
End While
dr.Close()
@@ -49,6 +50,7 @@ Public Class cTranslate
Property trs_subControl As Object = Nothing
Property trs_sprache As String
Property trs_text As String
Property trs_textDE As String
Property trs_Option As Object = Nothing
Property trs_FirmaID As Object = Nothing

View File

@@ -498,8 +498,9 @@ Class TrdInvoice_FUNCTIONS
Dim Buchungstext As String = ROW("RK_Buchungstext")
If Buchungstext <> "" AndAlso Buchungstext.Contains("Abrechnungsperiode von") Then
Buchungstext = Buchungstext.Replace("Abrechnungsperiode von", "Zinsen")
If Buchungstext <> "" AndAlso Buchungstext.Contains("Zahlungen vom") Then
Buchungstext = Buchungstext.Replace("Zahlungen vom", "Zinsen")
Buchungstext &= " / nicht verzinsen"
End If
If TRD_INVOICE.SAVE Then

View File

@@ -33,6 +33,8 @@ Public Class cUIDPruefung
Property uid_adr5 As Object = Nothing
Property uid_adr6 As Object = Nothing
Property uid_pruefungstool As Object = Nothing
Shared SQL As New SQL
@@ -68,6 +70,8 @@ Public Class cUIDPruefung
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uid_adr4", uid_adr4))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uid_adr5", uid_adr5))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uid_adr6", uid_adr6))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uid_pruefungstool", uid_pruefungstool))
Return list
End Function
@@ -150,25 +154,27 @@ Public Class cUIDPruefung
Public Shared Function doUIDPruefungALL(Optional datum As Object = Nothing, Optional SaveErgInAdressen As Boolean = True, Optional Sciherheitsabfrage As Boolean = True, Optional MaxEintraege As Integer = -1, Optional showErr As Boolean = True, Optional finanzOnline As Boolean = True, Optional veroegerungMs As Integer = 1500) As DataTable
Dim dt As DataTable = Nothing
If datum = Nothing Then datum = CDate("15." & Now.ToString("MM.yyyy")).AddMonths(-1)
'If datum = Nothing Then datum = CDate("15." & Now.ToString("MM.yyyy")).AddMonths(-1)
Dim where = ""
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
Case "AMBAR" : where = " And Filialen.FilialenNr IN (5701)"
Case "IMEX" : where = " And Filialen.FilialenNr IN (5501)"
Case "ATILLA" : where = " And Filialen.FilialenNr IN (4801)"
Case "UNISPED" : where = " AND Filialen.firma='UNISPED' "
Case Else : where = " AND Filialen.firma='VERAG' " '" And isnull(FilialenNr,'') Not IN (5501,5701)"
End Select
Dim Top = ""
If MaxEintraege > 0 Then
Top = " TOP " & MaxEintraege
End If
'Dim where = ""
'Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
' Case "AMBAR" : where = " And Filialen.FilialenNr IN (5701)"
' Case "IMEX" : where = " And Filialen.FilialenNr IN (5501)"
' Case "ATILLA" : where = " And Filialen.FilialenNr IN (4801)"
' Case "UNISPED" : where = " AND Filialen.firma='UNISPED' "
' Case Else : where = " AND Filialen.firma='VERAG' " '" And isnull(FilialenNr,'') Not IN (5501,5701)"
'End Select
'Dim Top = ""
'If MaxEintraege > 0 Then
' Top = " TOP " & MaxEintraege
'End If
dt = SQL.loadDgvBySql("SELECT " & Top & " [AdressenNr] as KdNr,[Ordnungsbegriff] as Firma,UstIdGeprüft as [letzte Prüfung],Adressen.UstIdKz,Adressen.UstIdnr " &
" From [Adressen] inner Join kunden On KundenNr=AdressenNr inner join Filialen on Filialen.FilialenNr=Kunden.FilialenNr " &
" where (UstIdGeprüft <= '" & datum.ToShortDateString & "' OR UstIdGeprüft is null) and (Adressen.UstIdKz is not null and Adressen.UstIdNr is not null) " &
" And Auswahl='A' " & where & " ORDER BY Ordnungsbegriff", "FMZOLL")
'dt = SQL.loadDgvBySql("SELECT " & Top & " [AdressenNr] as KdNr,[Ordnungsbegriff] as Firma,UstIdGeprüft as [letzte Prüfung],Adressen.UstIdKz,Adressen.UstIdnr " &
' " From [Adressen] inner Join kunden On KundenNr=AdressenNr inner join Filialen on Filialen.FilialenNr=Kunden.FilialenNr " &
' " where (UstIdGeprüft <= '" & datum.ToShortDateString & "' OR UstIdGeprüft is null) and (isnull(Adressen.UstIdKz,'') <> ''and isnull(Adressen.UstIdNr,'') <> '') " &
' " And Auswahl='A' " & where & " ORDER BY Ordnungsbegriff", "FMZOLL")
dt = get_zupruefendeKunden(MaxEintraege, datum)
If dt IsNot Nothing Then
If dt.Rows.Count = 0 Then Return Nothing
@@ -198,7 +204,7 @@ Public Class cUIDPruefung
Case "EUROPE"
For Each r As DataRow In dt.Rows
Dim UID_TMP = doUIDPruefung(r("KdNr"),, SaveErgInAdressen, showErr)
Dim UID_TMP = doUIDPruefung(r("KdNr"),, SaveErgInAdressen, showErr, ART)
If UID_TMP IsNot Nothing Then
If UID_TMP.uid_valid Then
r("Ergebnis") = "OK"
@@ -292,8 +298,43 @@ Public Class cUIDPruefung
Return dt
End Function
Public Shared Function get_zupruefendeKunden(MaxEintraege As Integer, Optional datum As Object = Nothing, Optional Firma As String = "") As DataTable
Public Shared Function doUIDPruefung(ba_KundenNr, Optional AskIfDouble = False, Optional SaveErgInAdressen = True, Optional showErr = True) As cUIDPruefung
Dim dt As DataTable = Nothing
If datum = Nothing Then datum = CDate("15." & Now.ToString("MM.yyyy")).AddMonths(-1)
Dim where = ""
If Firma = "" Then
Firma = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
End If
Select Case Firma
Case "AMBAR" : where = " And Filialen.FilialenNr IN (5701)"
Case "IMEX" : where = " And Filialen.FilialenNr IN (5501)"
Case "ATILLA" : where = " And Filialen.FilialenNr IN (4801)"
Case "UNISPED" : where = " AND Filialen.firma='UNISPED' "
Case Else : where = " AND Filialen.firma='VERAG' " '" And isnull(FilialenNr,'') Not IN (5501,5701)"
End Select
Dim Top = ""
If MaxEintraege > 0 Then
Top = " TOP " & MaxEintraege
End If
dt = SQL.loadDgvBySql("SELECT " & Top & " [AdressenNr] as KdNr,[Ordnungsbegriff] as Firma,UstIdGeprüft as [letzte Prüfung],Adressen.UstIdKz,Adressen.UstIdnr " &
" From [Adressen] inner Join kunden On KundenNr=AdressenNr inner join Filialen on Filialen.FilialenNr=Kunden.FilialenNr " &
" where (UstIdGeprüft <= '" & datum.ToShortDateString & "' OR UstIdGeprüft is null) and (isnull(Adressen.UstIdKz,'') <> ''and isnull(Adressen.UstIdNr,'') <> '') " &
" And Auswahl='A' " & where & " ORDER BY Ordnungsbegriff", "FMZOLL")
Return dt
End Function
Public Shared Function doUIDPruefung(ba_KundenNr, Optional AskIfDouble = False, Optional SaveErgInAdressen = True, Optional showErr = True, Optional Art = "") As cUIDPruefung
Dim AD As New cAdressen(ba_KundenNr)
If AD IsNot Nothing Then
@@ -370,7 +411,7 @@ Public Class cUIDPruefung
UID_TMP.uid_UstIdNr = AD.UstIdNr
UID_TMP.uid_stufe = 1
UID_TMP.Firma = If(VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA, "VERAG")
UID_TMP.uid_pruefungstool = Art.ToString
UID_TMP.uid_abfrageUid = requesterCountryCode & requesterVatNumber
' UID.uid_firma =
' UID.uid_strasse))

View File

@@ -1394,30 +1394,21 @@ Public Class cFormularManager
For Each pdfPath As String In PDFFile
Dim doc As New Spire.Pdf.PdfDocument(pdfPath)
Using doc As New Spire.Pdf.PdfDocument(pdfPath)
'Versuche, die Seitengröße zu überprüfen
'-----------------------------------------
If doc.Pages.Count = 0 Then
' Leeres Dokument, überspringen
Continue For
End If
Dim pageSize = doc.Pages(0).Size
If pageSize.Width <= 0 OrElse pageSize.Height <= 0 Then
' Ungültige Seitengröße, überspringen
Continue For
End If
'-----------------------------------------
If doc.Pages.Count = 0 Then Continue For
Dim size = doc.Pages(0).Size
If size.Width <= 0 OrElse size.Height <= 0 Then Continue For
' --- Druckeinstellungen ---
doc.PrintSettings.PrinterName = printerName
doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.ActualSize, False)
doc.PrintSettings.Landscape = True
doc.PrintSettings.PaperSize = New System.Drawing.Printing.PaperSize("A4", 827, 1169)
doc.Print()
doc.PageSettings.Size = Spire.Pdf.PdfPageSize.A4
doc.PageSettings.Orientation = Spire.Pdf.PdfPageOrientation.Landscape
doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.FitSize, True)
doc.PrintSettings.PrinterName = printerName
doc.Print()
Next
End Using
Next
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)

View File

@@ -169,6 +169,8 @@ Public Class cFinanzOnlineWebService
UID_TMP.uid_stufe = Stufe
UID_TMP.uid_pruefungstool = "FINANZONLINE"
UID_TMP.SAVE()
If multiUID Then
@@ -203,7 +205,7 @@ Public Class cFinanzOnlineWebService
UID_TMP_new.uid_adr6 = adrz6
UID_TMP_new.uid_stufe = Stufe
UID_TMP.uid_pruefungstool = "FINANZONLINE"
UID_TMP_new.SAVE()
If (UID_TMP.uid_valid) Then 'OK

View File

@@ -348,7 +348,7 @@ Public Class cSyska_Interface
If dt_BuchungenZeilen IsNot Nothing AndAlso dt_BuchungenZeilen.Rows.Count > 0 Then
For Each rz In dt_BuchungenZeilen.Rows
file.WriteLine(genBuchungsZeile(rz, SummeBuchungen, Geschaeftsjahr, FIRMA, curDifferenzbetrag, ambargubuchungen)) ' BuchungsZeilen...
file.WriteLine(genBuchungsZeile(rz, SummeBuchungen, Geschaeftsjahr, FIRMA, curDifferenzbetrag, ambargubuchungen, r("Buchungstext"))) ' BuchungsZeilen...
Next
End If
If curDifferenzbetrag <> 0 Then 'Differenz --> Ausgelich auf Diff.Konto
@@ -741,7 +741,7 @@ Public Class cSyska_Interface
Return genBuchungsZeileSum
End Function
Public Shared Function genBuchungsZeile(row As DataRow, ByRef SummeBuchungen As Double, ByRef Geschäftsjahr As Integer, ByRef FIRMA As VERAG_PROG_ALLGEMEIN.cFirmen, ByRef curDifferenzbetrag As Double, Optional ambargubuchungen As Boolean = False) As String
Public Shared Function genBuchungsZeile(row As DataRow, ByRef SummeBuchungen As Double, ByRef Geschäftsjahr As Integer, ByRef FIRMA As VERAG_PROG_ALLGEMEIN.cFirmen, ByRef curDifferenzbetrag As Double, Optional ambargubuchungen As Boolean = False, Optional Buchungstext As String = "") As String
Dim curSteuerbetrag As Double
Dim curNettobetrag As Double
@@ -818,7 +818,8 @@ Public Class cSyska_Interface
genBuchungsZeile &= FiBuSollkontonummer & vbTab
genBuchungsZeile &= FiBuHabenkontonummer & vbTab
genBuchungsZeile &= row("FilialenNr") & "/" & row("AbfertigungsNr") & "/" & CDbl(row("UnterNr")).ToString("00") & vbTab
'genBuchungsZeile &= row("FilialenNr") & "/" & row("AbfertigungsNr") & "/" & CDbl(row("UnterNr")).ToString("00") & vbTab
genBuchungsZeile &= IIf(Buchungstext <> "" AndAlso Buchungstext.Contains("Zinsen"), Buchungstext & vbTab, row("FilialenNr") & "/" & row("AbfertigungsNr") & "/" & CDbl(row("UnterNr")).ToString("00") & vbTab)
genBuchungsZeile &= Format(CDbl(FiBuBruttobetrag), fmt) & vbTab