ustva, uta, etc.

This commit is contained in:
2025-01-09 15:56:47 +01:00
parent 6f0ae44756
commit 0b08a9652a
6 changed files with 146 additions and 45 deletions

View File

@@ -5,13 +5,13 @@ 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 itextsharp.text.pdf
Imports itextsharp.text.pdf.parser
Imports java.text.Normalizer
Imports jdk.nashorn.internal.objects.annotations
'Imports DocumentFormat.OpenXml.Drawing.Charts
Imports Microsoft.Office.Interop
Imports Org.BouncyCastle.Pqc.Crypto
Imports org.BouncyCastle.Pqc.Crypto
Imports sun.swing
Imports VERAG_PROG_ALLGEMEIN
@@ -682,7 +682,7 @@ Public Class frmMDM_USTVAntrag
Dim bytSchnittstellenNr = 1
Dim USTV_ANTRAG As New VERAG_PROG_ALLGEMEIN.cUSTVAntrag(UStVAn_ID)
Dim dt_RE As New DataTable
Dim GET_Rechnungen = cTrdInvoice.GET_RECHNUNGEN(dt_RE, USTV_ANTRAG.UStVAn_ReDatVon, USTV_ANTRAG.UStVAn_ReDatBis, USTV_ANTRAG.UStVAn_KuNr)
Dim GET_Rechnungen = cTrdInvoice.GET_RECHNUNGEN(dt_RE, USTV_ANTRAG.UStVAn_ReDatVon, USTV_ANTRAG.UStVAn_ReDatBis, USTV_ANTRAG.UStVAn_KuNr, ArchivierteEintracheNochmalsEinarbetien)
Dim verarbeitet As Boolean = True
If GET_Rechnungen Then
@@ -749,7 +749,7 @@ Public Class frmMDM_USTVAntrag
If USTV_POS.INSERT() Then
verarbeitet = sql.doSQL("Update tblTrdinInvoice SET tblTrdinInvoice.UStVAn_ID = NULL WHERE tblTrdinInvoice.Rechnungsdatum = '" & USTV_POS.UStVPo_ReDat & "' And tblTrdinInvoice.Rechnungsnummer = " & USTV_POS.UStVPo_ReNr, "FMZOLL")
verarbeitet = sql.doSQL("Update tblTrdinInvoice SET tblTrdinInvoice.UStVAn_ID = " & USTV_POS.UStVAn_ID & " WHERE tblTrdinInvoice.Rechnungsdatum = '" & USTV_POS.UStVPo_ReDat & "' And tblTrdinInvoice.Rechnungsnummer = " & USTV_POS.UStVPo_ReNr, "FMZOLL")
If Not verarbeitet Then
MsgBox("Fehler beim Setzen der UStVAn_ID")
Return verarbeitet
@@ -916,6 +916,7 @@ Public Class frmMDM_USTVAntrag
For Each r As DataRow In dt.Rows
Dim kdnr = r.Item("Kundennummer")
Dim kdnrUTA = r.Item("KundennummerUTA")
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
@@ -956,7 +957,8 @@ Public Class frmMDM_USTVAntrag
End If
If USTV_POS.INSERT() Then
cUTA.UPDATE_ARCHIV(USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_ReNr, kdnr, USTV_POS.UStVAn_ID)
'kdnnr von UTA nicht unsere verwenden!!!!
cUTA.UPDATE_ARCHIV(USTV_POS.UStVPo_ReDat, USTV_POS.UStVPo_ReNr, kdnrUTA, USTV_POS.UStVAn_ID)
End If
'tblUStVPositionen
End If
@@ -1519,11 +1521,11 @@ Public Class frmMDM_USTVAntrag
Try
Dim fi As New System.IO.DirectoryInfo(path_src)
Dim pdfReader As iTextSharp.text.pdf.PdfReader = New iTextSharp.text.pdf.PdfReader(path_src)
Dim pdfReader As itextsharp.text.pdf.PdfReader = New itextsharp.text.pdf.PdfReader(path_src)
Dim TMP_Path_New = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath(fi.Name, fi.Extension,, True, "IDS-Rechnungen")
Dim srcDoc As New iTextSharp.text.Document()
Dim PdfCopyProvider As New iTextSharp.text.pdf.PdfCopy(srcDoc, New FileStream(TMP_Path_New, System.IO.FileMode.Create))
Dim srcDoc As New itextsharp.text.Document()
Dim PdfCopyProvider As New itextsharp.text.pdf.PdfCopy(srcDoc, New FileStream(TMP_Path_New, System.IO.FileMode.Create))
PdfCopyProvider.SetFullCompression()
srcDoc.Open()
PdfReader.unethicalreading = True
@@ -1534,7 +1536,7 @@ Public Class frmMDM_USTVAntrag
Dim strategy As ITextExtractionStrategy = New SimpleTextExtractionStrategy()
Dim currentpagetext As String = PdfTextExtractor.GetTextFromPage(pdfReader, page, strategy)
Dim searchtext As String = ReNr
Dim impPage As iTextSharp.text.pdf.PdfImportedPage = Nothing
Dim impPage As itextsharp.text.pdf.PdfImportedPage = Nothing
If (currentpagetext.Contains(searchtext)) Then
@@ -1547,7 +1549,7 @@ Public Class frmMDM_USTVAntrag
impPage = PdfCopyProvider.GetImportedPage(pdfReader, page)
' ----- Ermitteln der Seitenauflösung und setzen für die neue Seite
PdfCopyProvider.SetPageSize(New iTextSharp.text.Rectangle(0.0F, 0.0F, impPage.Width, impPage.Height, pdfReader.GetPageRotation(page)))
PdfCopyProvider.SetPageSize(New itextsharp.text.Rectangle(0.0F, 0.0F, impPage.Width, impPage.Height, pdfReader.GetPageRotation(page)))
' ----- PDF Seite in das neue Dokument einfügen
If impPage IsNot Nothing Then PdfCopyProvider.AddPage(impPage)
Catch ex As Exception