fremdrechnungen, utsva

This commit is contained in:
2025-01-03 13:12:59 +01:00
parent 7ef78a385f
commit 45737ef623
3 changed files with 54 additions and 18 deletions

View File

@@ -1,7 +1,12 @@

Imports System.IO
Imports System.Reflection
Imports System.Windows.Documents
Imports com.sun.org.apache.xml.internal.resolver
Imports com.sun.tools.internal.ws.wsdl.framework
Imports DocumentFormat.OpenXml.Office2010.Drawing.Charts
Imports itextsharp.text.pdf
Imports itextsharp.text.pdf.parser
Imports java.text.Normalizer
Imports jdk.nashorn.internal.objects.annotations
'Imports DocumentFormat.OpenXml.Drawing.Charts
@@ -1437,40 +1442,71 @@ Public Class frmMDM_USTVAntrag
Select Case schnnittstellenNr
Case 1
If dsID > 0 Then
Me.Cursor = Cursors.WaitCursor
cFakturierung.doRechnungsDruck_SRorER(dsID,, False, 3)
End If
Case Else
'----------- ERST AKTIVIEREN; WENN POR ANTRAG RECHNUNG (üer RE-NR)
'Case 8
' Me.Cursor = Cursors.WaitCursor
' Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER(dsID)
' Dim path_src As String = DS.OPEN_SINGLE(False)
' If path_src = "" Then Exit Sub
' Dim pdfDoc As itextsharp.text.Document = Nothing
' Try
' Dim fi As New System.IO.DirectoryInfo(path_src)
' Dim pdf As itextsharp.text.pdf.PdfReader = New itextsharp.text.pdf.PdfReader(path_src)
' pdf.unethicalreading = True
' Dim pages As New List(Of Integer)()
' For page As Integer = 1 To pdf.NumberOfPages
' Dim strategy As ITextExtractionStrategy = New SimpleTextExtractionStrategy()
' Dim currentPageText As String = PdfTextExtractor.GetTextFromPage(pdf, page, strategy)
' Dim searchtext As String = "ON BEHALF AND FOR ACCOUNT OF:"
' Dim searchtext2 As String = "IDS Europe B.V. " & Antrag_LandKz.ToString
' If Not (currentPageText.Contains(searchtext) AndAlso currentPageText.Contains(searchtext2)) Then
' Dim pageDictionary As PdfDictionary = pdf.GetPageN(page)
' pageDictionary.Put(PdfName.PAGEMODE, PdfName.USENONE)
' Else
' pages.Add(page)
' End If
' Next
' pdf.Close()
' 'For Each page In pages
' ' MsgBox("Text found on page: " & page)
' 'Next
' Catch ex As Exception
' VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
' End Try
Case Else
If dsID > 0 Then
Me.Cursor = Cursors.WaitCursor
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER(dsID)
DS.OPEN_SINGLE()
End If
End Select
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Me.Cursor = Cursors.Default
End Try
Me.Cursor = Cursors.Default
End Sub
Private Function getDaID(SchnittstellenNr, reDat, reNr)
Dim da_id = -1
Select Case If(SchnittstellenNr, -1)