div. Änderungen

This commit is contained in:
2026-03-31 16:22:01 +02:00
parent 377f33b4e7
commit ca6dba389b
11 changed files with 217 additions and 39 deletions

View File

@@ -165,6 +165,14 @@
<bindingRedirect oldVersion="0.0.0.0-18.2.2.0" newVersion="18.2.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<applicationSettings>

View File

@@ -5,7 +5,6 @@ Imports System.Threading
Public Class cFiskaltrustClient
Private ReadOnly _baseUrl As String
Private ReadOnly _cashboxId As String
Private ReadOnly _accessToken As String

View File

@@ -101,8 +101,8 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\Portable.BouncyCastle.1.8.5\lib\net40\BouncyCastle.Crypto.dll</HintPath>
<Reference Include="BouncyCastle.Crypto, Version=1.7.4137.9688, Culture=neutral, PublicKeyToken=a4292a325f69b123, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="BouncyCastle.Cryptography">
<HintPath>F:\PROGRAMMIERUNG\dll\ActiveReports18\allDll\BouncyCastle.Cryptography.dll</HintPath>
@@ -147,6 +147,21 @@
<Reference Include="ExcelNumberFormat, Version=1.0.10.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\..\..\AVISO\Aviso\packages\ExcelNumberFormat.1.0.10\lib\net20\ExcelNumberFormat.dll</HintPath>
</Reference>
<Reference Include="fiskaltrust.ifPOS.Utilities, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\fiskaltrust.interface.utilities.1.2.24060.71293\lib\net40\fiskaltrust.ifPOS.Utilities.dll</HintPath>
</Reference>
<Reference Include="fiskaltrust.interface, Version=1.3.45.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\fiskaltrust.interface.1.3.45\lib\net461\fiskaltrust.interface.dll</HintPath>
</Reference>
<Reference Include="fiskaltrust.Middleware.Interface.Client.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\fiskaltrust.Middleware.Interface.Client.Soap.1.3.45\lib\net461\fiskaltrust.Middleware.Interface.Client.Common.dll</HintPath>
</Reference>
<Reference Include="fiskaltrust.Middleware.Interface.Client.Http, Version=1.3.45.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\fiskaltrust.Middleware.Interface.Client.Http.1.3.45\lib\net461\fiskaltrust.Middleware.Interface.Client.Http.dll</HintPath>
</Reference>
<Reference Include="fiskaltrust.Middleware.Interface.Client.Soap, Version=1.3.45.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\fiskaltrust.Middleware.Interface.Client.Soap.1.3.45\lib\net461\fiskaltrust.Middleware.Interface.Client.Soap.dll</HintPath>
</Reference>
<Reference Include="Ghostscript.NET, Version=1.2.1.0, Culture=neutral, PublicKeyToken=f85051de34525b59, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>F:\PROGRAMMIERUNG\dll\Ghostscript.NET.dll</HintPath>
@@ -395,7 +410,9 @@
<Reference Include="MESCIUS.Data.VBFunctionLib, Version=4.0.3.0, Culture=neutral, PublicKeyToken=0b5e1563d2869208, processorArchitecture=MSIL">
<HintPath>..\..\..\DISPO\DISPO\packages\MESCIUS.Data.VBFunctionLib.4.0.3\lib\net462\MESCIUS.Data.VBFunctionLib.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -445,6 +462,9 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Design" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Interactive.Async, Version=4.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\System.Interactive.Async.4.0.0\lib\net461\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
<Private>True</Private>
@@ -458,6 +478,9 @@
<Reference Include="System.IO.Packaging, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Packaging.4.5.0\lib\net46\System.IO.Packaging.dll</HintPath>
</Reference>
<Reference Include="System.Linq.Async, Version=4.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\System.Linq.Async.4.0.0\lib\net461\System.Linq.Async.dll</HintPath>
</Reference>
<Reference Include="System.Management" />
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
@@ -469,6 +492,9 @@
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
<Reference Include="System.Security" />
@@ -493,6 +519,10 @@
<Private>True</Private>
</Reference>
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\Aviso\AVISO\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
@@ -792,6 +822,7 @@
<Compile Include="Fakturierung\rptSammelRechnungAnlagenDruck_Leistungen.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="Fiskaltrust\IFiskaltrustClientN.vb" />
<Compile Include="Formulare\CARNET-TIR\frmTIR.Designer.vb">
<DependentUpon>frmTIR.vb</DependentUpon>
</Compile>

View File

@@ -189,7 +189,7 @@ Public Class frmProvisionisverguetung
Mail.HTMLBody = TextHTML
End If
Mail.Subject = "Provisionsauswertung"
Mail.Subject = "PROVISIONSABRECHNUNG"
Mail.To = VERAG_PROG_ALLGEMEIN.cKundenKontakte.getMailAdress(ad.AdressenNr, "Rechnung an")
Mail.CC = VERAG_PROG_ALLGEMEIN.cKundenKontakte.getMailAdressCC(ad.AdressenNr, "Rechnung an")

View File

@@ -179,7 +179,7 @@ Public Class usrCntlATLAS_NCTS004
'End Select
If SENDUNG IsNot Nothing Then
FIRMA_DY = cDakosyFunftions.getFirma_DY(SENDUNG.FilialenNr.ToString, Me.FindForm, "NCTS")
MsgBox(SENDUNG.FilialenNr)
'MsgBox(SENDUNG.FilialenNr)
End If
' MsgBox(FIRMA_DY)

View File

@@ -109,12 +109,12 @@ Public Class usrCntlATLAS_AnkunftsAnzeige
' dim FilialenNr
Dim FIRMA_DY = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
FIRMA_DY = DAKOSY_Worker.cDakosyFunftions.getFirma_DY(SENDUNG.FilialenNr, Me.FindForm, "AA")
'Dim FIRMA_DY = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
'FIRMA_DY = DAKOSY_Worker.cDakosyFunftions.getFirma_DY(SENDUNG.FilialenNr, Me.FindForm, "AA")
If txtDyMandant.Text = "VERG" And FIRMA_DY = "IMEX" Then 'IMEX verwendet VERAG-Gestellungskonto!!!
FIRMA_DY = "VERAG"
End If
'If txtDyMandant.Text = "VERG" And FIRMA_DY = "IMEX" Then 'IMEX verwendet VERAG-Gestellungskonto!!!
' FIRMA_DY = "VERAG"
'End If
Dim saveFile = ""
@@ -127,7 +127,7 @@ Public Class usrCntlATLAS_AnkunftsAnzeige
End If
If generateEingangsanzeigeNCTSDE_003(AVISO, SENDUNG, BezugsNrBez, lblBezugsnummer.Text, saveFile, cboDakosyAction._value, FIRMA_DY, cboStammreferenz._value) Then
If generateEingangsanzeigeNCTSDE_003(AVISO, SENDUNG, BezugsNrBez, lblBezugsnummer.Text, saveFile, cboDakosyAction._value, txtDyMandant.Text, txtDyNiederlassung.Text, cboStammreferenz._value) Then
If saveFile <> "" Then
'-------------------------------------------------------
@@ -157,7 +157,7 @@ Public Class usrCntlATLAS_AnkunftsAnzeige
Shared Function generateEingangsanzeigeNCTSDE_003(AVISO As VERAG_PROG_ALLGEMEIN.cAviso, SND As VERAG_PROG_ALLGEMEIN.cSendungen, ByVal Bezugsnummer As String, ByVal BezugsnummerALIAS As String, ByRef saveFile As String, DY_ACTION As String, FIRMA_DY As String, Optional BezugsnummerVorblendung As String = "") As Boolean
Shared Function generateEingangsanzeigeNCTSDE_003(AVISO As VERAG_PROG_ALLGEMEIN.cAviso, SND As VERAG_PROG_ALLGEMEIN.cSendungen, ByVal Bezugsnummer As String, ByVal BezugsnummerALIAS As String, ByRef saveFile As String, DY_ACTION As String, IOPartner As String, IODivision3 As String, Optional BezugsnummerVorblendung As String = "") As Boolean
Dim Interface_VERSION = "003"
Dim ObjectAktion = DY_ACTION
' Dim BezugsnummerVorblendung = "AA_NCTS_DE_ZE_WO_MITTICH"
@@ -167,12 +167,12 @@ Public Class usrCntlATLAS_AnkunftsAnzeige
'Transaktion:
XML.Transaktion = New DAKOSY_Worker.EingangsanzeigeNCTSDE_003.TransaktionNCTSTyp
XML.Transaktion.IOPartner = SDL.DAKOSY_Interface_SEND.getIOPartner(FIRMA_DY) 'If(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "VERA", "VERG")
XML.Transaktion.IOPartner = IOPartner 'SDL.DAKOSY_Interface_SEND.getIOPartner(FIRMA_DY) 'If(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "VERA", "VERG")
XML.Transaktion.IODatumZeit = Now
XML.Transaktion.IOReferenz = SND.FilialenNr & "-" & SND.AbfertigungsNr & "_" & Now.ToString("ddMMyyHHmmSS")
If Not VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then XML.Transaktion.IODivision3 = SDL.DAKOSY_Interface_SEND.getDivision(FIRMA_DY) '"SUW"
If Not VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then XML.Transaktion.IODivision3 = IODivision3 '"SUW"
XML.Transaktion.Version = Interface_VERSION
' XML.Transaktion.IODivision3 = "DUR"
' XML.Transaktion.IODivision3 = IODivision3
XML.EinzelEingangsanzeige = New EingangsanzeigeNCTSDE_003.EinzelEingangsanzeigeTyp
'ObjektIdentifizierung:

View File

@@ -71,6 +71,7 @@ Partial Class frmBelegNeu
Me.btnAusgabebeleg = New System.Windows.Forms.Button()
Me.lblErrPos = New System.Windows.Forms.Label()
Me.pnlData = New System.Windows.Forms.Panel()
Me.Button4 = New System.Windows.Forms.Button()
Me.cboBuchungsoforterzeugen = New System.Windows.Forms.CheckBox()
Me.lblErr_Fahrer = New System.Windows.Forms.Label()
Me.lblErr_Pass = New System.Windows.Forms.Label()
@@ -145,7 +146,6 @@ Partial Class frmBelegNeu
Me.DataGridViewTextBoxColumn9 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.FlowLayoutPanel2 = New System.Windows.Forms.FlowLayoutPanel()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.Button4 = New System.Windows.Forms.Button()
CType(Me.dgvBelegPos, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnl.SuspendLayout()
Me.pnlData.SuspendLayout()
@@ -647,7 +647,6 @@ Partial Class frmBelegNeu
'pnlData
'
Me.pnlData.BackColor = System.Drawing.Color.FromArgb(CType(CType(244, Byte), Integer), CType(CType(244, Byte), Integer), CType(CType(244, Byte), Integer))
Me.pnlData.Controls.Add(Me.Button4)
Me.pnlData.Controls.Add(Me.cboBuchungsoforterzeugen)
Me.pnlData.Controls.Add(Me.lblErr_Fahrer)
Me.pnlData.Controls.Add(Me.lblErr_Pass)
@@ -694,6 +693,21 @@ Partial Class frmBelegNeu
Me.pnlData.Size = New System.Drawing.Size(624, 208)
Me.pnlData.TabIndex = 5
'
'Button4
'
Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button4.ForeColor = System.Drawing.Color.Black
Me.Button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button4.Location = New System.Drawing.Point(120, 38)
Me.Button4.Name = "Button4"
Me.Button4.Padding = New System.Windows.Forms.Padding(0, 0, 5, 0)
Me.Button4.Size = New System.Drawing.Size(51, 21)
Me.Button4.TabIndex = 49
Me.Button4.Text = "TEST"
Me.Button4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button4.UseVisualStyleBackColor = True
Me.Button4.Visible = False
'
'cboBuchungsoforterzeugen
'
Me.cboBuchungsoforterzeugen.AutoSize = True
@@ -1222,6 +1236,7 @@ Partial Class frmBelegNeu
'
'pnlOPt
'
Me.pnlOPt.Controls.Add(Me.Button4)
Me.pnlOPt.Controls.Add(Me.LinkLabel1)
Me.pnlOPt.Controls.Add(Me.cboPrinter)
Me.pnlOPt.Controls.Add(Me.cbxBelegOffnen)
@@ -1763,21 +1778,6 @@ Partial Class frmBelegNeu
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
Me.ContextMenuStrip1.Size = New System.Drawing.Size(61, 4)
'
'Button4
'
Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button4.ForeColor = System.Drawing.Color.Black
Me.Button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button4.Location = New System.Drawing.Point(340, 6)
Me.Button4.Name = "Button4"
Me.Button4.Padding = New System.Windows.Forms.Padding(0, 0, 5, 0)
Me.Button4.Size = New System.Drawing.Size(60, 30)
Me.Button4.TabIndex = 49
Me.Button4.Text = "TEST"
Me.Button4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button4.UseVisualStyleBackColor = True
Me.Button4.Visible = False
'
'frmBelegNeu
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)

View File

@@ -1881,16 +1881,15 @@ Public Class frmBelegNeu
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
'KASSE.LOAD(6) 'AT-Kasse
KASSE.LOAD(12) 'DE-kasse
KASSE.LOAD(cboKassen._value)
If KASSE.rksv_FT_RestServiceURL <> "" Then
Dim client As New cFiskaltrustClient(KASSE.rksv_FT_RestServiceURL, KASSE.rksv_FT_CashboxID, KASSE.rksv_FT_AccessToken, KASSE.rksv_FT_Country)
Dim result = client.Echo()
Else
MsgBox("keine Rest-Service URL hinterlegt!")
End If

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.7.0" targetFramework="net48" />
<package id="ClosedXML" version="0.95.4" targetFramework="net47" />
<package id="Common.Logging" version="3.4.1" targetFramework="net48" />
<package id="Common.Logging.Core" version="3.4.1" targetFramework="net48" />
@@ -11,6 +12,10 @@
<package id="DS.Documents.Pdf" version="7.2.2" targetFramework="net48" />
<package id="esendex-dotnet-sdk" version="3.8.0" targetFramework="net47" />
<package id="ExcelNumberFormat" version="1.0.10" targetFramework="net47" />
<package id="fiskaltrust.interface" version="1.3.45" targetFramework="net48" />
<package id="fiskaltrust.interface.utilities" version="1.2.24060.71293" targetFramework="net48" />
<package id="fiskaltrust.Middleware.Interface.Client.Http" version="1.3.45" targetFramework="net48" />
<package id="fiskaltrust.Middleware.Interface.Client.Soap" version="1.3.45" targetFramework="net48" />
<package id="Hardcodet.NotifyIcon.Wpf" version="1.0.5" targetFramework="net40-Client" requireReinstallation="True" />
<package id="IKVM" version="8.0.5449.1" targetFramework="net47" />
<package id="itext7" version="7.1.11" targetFramework="net48" />
@@ -52,18 +57,23 @@
<package id="MESCIUS.Data.DataEngine" version="4.0.3" targetFramework="net48" />
<package id="MESCIUS.Data.ExpressionInfo" version="4.0.3" targetFramework="net48" />
<package id="MESCIUS.Data.VBFunctionLib" version="4.0.3" targetFramework="net48" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net48" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net47" />
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net48" />
<package id="Portable.BouncyCastle" version="1.8.5" targetFramework="net48" />
<package id="System.Interactive.Async" version="4.0.0" targetFramework="net48" />
<package id="System.IO" version="4.3.0" targetFramework="net48" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.IO.Packaging" version="4.5.0" targetFramework="net48" />
<package id="System.Linq.Async" version="4.0.0" targetFramework="net48" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
<package id="System.Runtime" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
<package id="TAlex.WPF.Controls" version="2.0.1.0" targetFramework="net40-Client" />
<package id="WpfAnimatedGif" version="1.4.14" targetFramework="net45" />
<package id="ZUGFeRD.NET" version="1.0.1" targetFramework="net48" />

View File

@@ -4,7 +4,7 @@ Imports System.Reflection
Public Class cFremdwaehrungskurse
Property fw_id As String
Property fw_id As Integer
Property fw_iso2 As String
Property fw_iso3 As String
Property fw_land As String
@@ -12,6 +12,8 @@ Public Class cFremdwaehrungskurse
Property fw_enddatum As Date
Property fw_kurswert As Double
Public hasEntry = False
Dim SQL As New SQL
@@ -19,10 +21,19 @@ Public Class cFremdwaehrungskurse
End Sub
Sub New(fw_iso3 As String)
Me.fw_iso3 = fw_iso3
LOAD_ByWaehrungscode(fw_iso3)
End Sub
Public Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("fw_id", fw_id))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("fw_id", fw_id,, True))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("fw_iso2", fw_iso2))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("fw_iso3", fw_iso3))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("fw_land", fw_land))
@@ -50,6 +61,33 @@ Public Class cFremdwaehrungskurse
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
End Function
Public Sub LOAD_ByWaehrungscode(fw_iso3 As String)
Try
hasEntry = False
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT top(1) * FROM tblZOLL_Wechselkurse WHERE fw_iso3=@fw_iso3 ORDER BY fw_startdatum desc ", conn)
cmd.Parameters.AddWithValue("@fw_iso3", fw_iso3)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
For Each li In getParameterList()
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
If dr.Item(li.Text) Is DBNull.Value Then
propInfo.SetValue(Me, Nothing)
Else
propInfo.SetValue(Me, dr.Item(li.Text))
End If
Next
hasEntry = True
End If
dr.Close()
End Using
End Using
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
End Sub
Public Function getUpdateCmd() As String
@@ -116,6 +154,13 @@ Public Class cFremdwaehrungskurse
'End Function
Shared Function EXCHANGE_CURTOEUR(betrag As Double, waehrungscode As String, datum As Date) As Double
Dim sqlstr = " SELECT TOP 1 [fw_kurswert] FROM [tblZOLL_Wechselkurse] where fw_iso3='" & waehrungscode & "' and fw_startdatum<='" & datum.ToShortDateString & "' order by fw_startdatum desc"
Return betrag / (New SQL).getValueTxtBySql(sqlstr, "FMZOLL",,, 0)
End Function
End Class

View File

@@ -1656,6 +1656,92 @@ Public Class cFormularManager
Return ""
End Function
Public Shared Function getFile_FromURLStream_NEW(URL As String, Optional filename As String = "", Optional targetPath As String = "", Optional showError As Boolean = True) As String
Try
Using webClient As New Net.WebClient()
' 🟡 Simulate browser (important for protected systems)
webClient.Headers.Add("User-Agent", "Mozilla/5.0")
webClient.Headers.Add("Accept", "*/*")
' Download data
Dim data() As Byte = webClient.DownloadData(URL)
' Read Content-Type header safely
Dim contentType As String = ""
If webClient.ResponseHeaders IsNot Nothing AndAlso webClient.ResponseHeaders("Content-Type") IsNot Nothing Then
contentType = webClient.ResponseHeaders("Content-Type").ToLower()
End If
' Try to get filename from headers if not provided
If String.IsNullOrEmpty(filename) Then
Dim contentDisposition = webClient.ResponseHeaders("Content-Disposition")
If contentDisposition IsNot Nothing AndAlso contentDisposition.Contains("filename=") Then
filename = contentDisposition.Split("filename=")(1).Replace("""", "").Trim()
filename = System.IO.Path.GetFileNameWithoutExtension(filename)
Else
filename = Guid.NewGuid().ToString()
End If
End If
' Determine extension
Dim extension As String = ""
If contentType.Contains("pdf") Then
extension = ".pdf"
ElseIf contentType.Contains("spreadsheetml") Then
extension = ".xlsx"
ElseIf contentType.Contains("ms-excel") Then
extension = ".xls"
ElseIf contentType.Contains("json") Then
extension = ".json"
ElseIf contentType.Contains("html") Then
extension = ".html" ' ⚠️ likely login page instead of file
End If
' Fallback: detect PDF by magic number
If extension = "" AndAlso data.Length > 4 Then
If data(0) = &H25 AndAlso data(1) = &H50 AndAlso data(2) = &H44 AndAlso data(3) = &H46 Then
extension = ".pdf"
End If
End If
' Default fallback
If extension = "" Then extension = ".bin"
' Build path
Dim fullPath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), filename & extension)
' Save file
If extension = ".pdf" Then
Using stream As New MemoryStream(data)
Dim doc As New Spire.Pdf.PdfDocument()
doc.LoadFromStream(stream)
doc.SaveToFile(fullPath)
End Using
Else
System.IO.File.WriteAllBytes(fullPath, data)
End If
targetPath = fullPath
Return targetPath
End Using
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace,
System.Reflection.MethodInfo.GetCurrentMethod.Name,
If(Not showError, "LOG", ""))
End Try
Return ""
End Function
Public Shared Sub PrintViaGS(PDFFile As String, printerName As String)
Try
Dim assembly = System.Reflection.Assembly.GetExecutingAssembly()