MS Sichtbeleg Jobs

This commit is contained in:
Developer01 2025-05-28 15:40:44 +02:00
parent 0261d237b6
commit 1d31298d8d
2 changed files with 32 additions and 61 deletions

View File

@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben:
<Assembly: AssemblyVersion("2.9.3.0")>
<Assembly: AssemblyFileVersion("2.9.3.0")>
<Assembly: AssemblyVersion("2.9.4.0")>
<Assembly: AssemblyFileVersion("2.9.4.0")>

View File

@ -87,6 +87,7 @@ Public Class XRechnungViewDocument
Dim oIndex As Integer = 0
Dim oYPlus As Integer = 0
Dim oCreateTextBox As Boolean = False
Dim oPosRowY As Integer = 0
For Each oRow As DataRow In pDTItemValues.Rows
Dim Y_eq_lastrow As Boolean = CBool(oRow.Item("Y_eq_lastrow"))
Dim oRowCaption As String = oRow.Item("Row_Caption")
@ -150,6 +151,9 @@ Public Class XRechnungViewDocument
End If
If Not oAREACaption = String.Empty Then
If oArea = "AMOUNT" Then
Dim oY = yPosition
End If
'erste Area-Linie
yPosition += 5
MyGDPicturePDF.DrawLine(10, yPosition, oWidthLine, yPosition)
@ -186,20 +190,12 @@ Public Class XRechnungViewDocument
oIsPosition = True
If oItemSPECNAME = "INVOICE_POSITION_AMOUNT" Then
oPosCount += 1
'oPosTerm = $"{oPosCount}. {oItemValue} * "
'oItemValue = oPosTerm
'Tabellendarstellung
oPosTerm = ""
oPosRowY = yPosition
MyGDPicturePDF.DrawText(fontResName, 10, yPosition, oPosCount)
'
'Dim otextBoxYPos As Integer = yPosition - 3.5
'MyGDPicturePDF.DrawTextBox(fontResName, 10, otextBoxYPos, 16, YCoo_TextBoxPlus5(otextBoxYPos),
' TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentNear,
' oPosCount)
MyGDPicturePDF.DrawText(fontResName, 19, yPosition, oItemValue)
'Tabellendarstellung Ende
oDisplay = False
' yPosition -= 5
End If
ElseIf oArea = "TAXPOS" Then
oIsPosition = True
@ -219,17 +215,13 @@ Public Class XRechnungViewDocument
If oArea = "POSITION" Then
If oItemSPECNAME = "INVOICE_POSITION_AMOUNT" Then
oPosCount += 1
oYPlus = 0
'Tabellendarstellung
yPosition += 5
oYPlus = 0
oPosTerm = ""
MyGDPicturePDF.DrawText(fontResName, 10, yPosition, oPosCount)
'otextBoxYPos = yPosition - 3.5
'MyGDPicturePDF.DrawTextBox(fontResName, 10, otextBoxYPos, 16, YCoo_TextBoxPlus5(otextBoxYPos),
' TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentNear,
' oPosCount)
oPosRowY = yPosition
MyGDPicturePDF.DrawText(fontResName, 19, yPosition, oItemValue)
'Tabellendarstellung Ende
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_POSITION_UNIT_TYPE" Then
oYPlus = 0
@ -237,11 +229,11 @@ Public Class XRechnungViewDocument
MyGDPicturePDF.DrawText(fontResName, 35, yPosition, oUnit)
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_POSITION_ARTICLE" Then
'Tabellendarstellung
oYPlus = 0
oPosDesc = ""
oPosDesc = oItemValue
Dim oYDyn As Integer = yPosition - 5
Dim oPartsNL As List(Of String) = StringFunctions.SplitTextByNewLine(oItemValue)
For Each olinepart As String In oPartsNL
Dim oParts As List(Of String) = StringFunctions.SplitText_Length(olinepart, 67)
@ -252,14 +244,15 @@ Public Class XRechnungViewDocument
MyGDPicturePDF.DrawText(fontResName, 50, oYDyn, part)
Next
Next
'Tabellendarstellung Ende
' oPosTerm += $" {oItemValue}"
yPosition = oYDyn
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_POSITION_NOTE" Then
'Tabellendarstellung
Dim cleanedText As String = RemoveNewlinesAndTabs(oItemValue)
Dim oParts As List(Of String) = StringFunctions.SplitText_Length(cleanedText, 70)
' Durchlaufen der einzelnen Teile in einer Schleife
ElseIf oItemSPECNAME = "INVOICE_POSITION_ARTICLE_DESCRIPTION" Or
oItemSPECNAME = "INVOICE_POSITION_NOTE" Then
_logger.Debug($"oItemSPECNAME: {oItemSPECNAME}")
'Dim cleanedText As String = RemoveNewlinesAndTabs(oItemValue)
'Dim oParts As List(Of String) = StringFunctions.SplitText_Length(cleanedText, 70)
'' Durchlaufen der einzelnen Teile in einer Schleife
Dim oYDyn As Integer = yPosition
Dim oPartsNL As List(Of String) = StringFunctions.SplitTextByNewLine(oItemValue)
For Each olinepart As String In oPartsNL
@ -271,37 +264,17 @@ Public Class XRechnungViewDocument
MyGDPicturePDF.DrawText(fontResName, 50, oYDyn, part)
Next
Next
yPosition = oYDyn
'oPosTerm += $" {oItemValue}"
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_POSITION_ARTICLE_DESCRIPTION" Then
'Tabellendarstellung
Dim cleanedText As String = RemoveNewlinesAndTabs(oItemValue)
Dim oParts As List(Of String) = StringFunctions.SplitText_Length(cleanedText, 70)
' Durchlaufen der einzelnen Teile in einer Schleife
Dim oYDyn As Integer = yPosition
Dim oPartsNL As List(Of String) = StringFunctions.SplitTextByNewLine(oItemValue)
For Each olinepart As String In oPartsNL
Dim oPartsPN As List(Of String) = StringFunctions.SplitText_Length(olinepart, 70)
' Durchlaufen der einzelnen Teile in einer Schleife
For Each part As String In oPartsPN
oYDyn += 5
oYPlus += 5
MyGDPicturePDF.DrawText(fontResName, 50, oYDyn, part)
Next
Next
'oPosTerm += $" {oItemValue}"
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_TAXPOS_TAX_RATE" Or oItemSPECNAME = "INVOICE_TAXPOS_RATE" Then
'Tabellendarstellung
MyGDPicturePDF.DrawText(fontResName, 164, yPosition, $"{oItemValue} %")
'Tabellendarstellung ENDE
' oPosTerm += $" - {oItemValue} %"
MyGDPicturePDF.DrawText(fontResName, 164, oPosRowY, $"{oItemValue} %")
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_POSITION_TAX_AMOUNT" Then
'Tabellendarstellung
Dim oYPos = yPosition - 3.5
Dim oYPos = oPosRowY - 3.5
Dim oBetrag As Decimal = oItemValue
Dim oFormatiert As String = oBetrag.ToString("N2", New Globalization.CultureInfo("de-DE"))
@ -309,9 +282,7 @@ Public Class XRechnungViewDocument
MyGDPicturePDF.DrawTextBox(fontResName, 177, oYPos, 198, YCoo_TextBoxPlus5(oYPos),
TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentNear,
TAXTERM)
' MyGDPicturePDF.DrawText(fontResName, 180, yPosition, $"{oItemValue} {oCurrencySymbol}")
'Tabellendarstellung Ende
oDisplay = False
End If
oItemValue = oPosTerm
ElseIf oArea = "HEAD" Then
@ -391,12 +362,12 @@ Public Class XRechnungViewDocument
End If
End If
Else
'Tabellendarstellung
If oItemSPECNAME = "INVOICE_POSITION_TAX_AMOUNT" And oYPlus > 0 Then
yPosition += oYPlus - 5
End If
'Tabellendarstellung Ende
'Else
' 'Tabellendarstellung
' If oItemSPECNAME = "INVOICE_POSITION_TAX_AMOUNT" And oYPlus > 0 Then
' yPosition += oYPlus - 5
' End If
' 'Tabellendarstellung Ende
End If
oIndex += 1
Next