Jobs Sichtbeleg Anpassung

This commit is contained in:
Developer01
2025-11-19 16:41:36 +01:00
parent aa5742a529
commit ceb688fc3f
3 changed files with 24 additions and 51 deletions

View File

@@ -19,8 +19,6 @@ Public Class XRechnungViewDocument
Private fontResName As String
Private fontResNameBold As String
Private fontResNameItalic As String
Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer, GDPictureLicenseKey As String)
_logConfig = LogConfig
_logger = LogConfig.GetLogger()
@@ -301,7 +299,7 @@ Public Class XRechnungViewDocument
'Dim otextBoxYPos As Integer
If oArea = "POSITION" Or oArea = "ALLOWANCE" Then
If oItemSPECNAME <> Former_oItemSPECNAME And Former_oItemSPECNAME <> "" Then
If oItemSPECNAME = "INVOICE_POSITION_ARTICLE" And oItemSPECNAME = "INVOICE_POSITION_ARTICLE_DESCRIPTION" Then
If oItemSPECNAME = "INVOICE_POSITION_ARTICLE_DESCRIPTION" And Former_oItemSPECNAME = "INVOICE_POSITION_ARTICLE" Then
oDescriptionFollowup = True
Else
Former_oItemSPECNAME = oItemSPECNAME
@@ -311,9 +309,10 @@ Public Class XRechnungViewDocument
End If
If {"INVOICE_POSITION_AMOUNT", "POSITION_ALLOWANCE_ACTUAL_AMOUNT", "RECEIPT_ALLOWANCE_ACTUAL_AMOUNT"}.Contains(oItemSPECNAME) Then
oPosCount += 1
oYPlus = 0
oYDyn = 0
yPosition += 5
If Not oDescriptionFollowup Then
oYPlus = 0
oYDyn = 0
End If
oPosTerm = ""
MyGDPicturePDF.DrawText(fontResName, 10, yPosition, oPosCount)
If oItemSPECNAME = "INVOICE_POSITION_AMOUNT" Then
@@ -330,7 +329,7 @@ Public Class XRechnungViewDocument
End If
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, 66)
Dim oParts As List(Of String) = StringFunctions.SplitText_Length(olinepart, 64)
' Durchlaufen der einzelnen Teile in einer Schleife
For Each part As String In oParts
MyGDPicturePDF.DrawText(fontResName, 19, oYDyn, part)
@@ -348,21 +347,22 @@ Public Class XRechnungViewDocument
oDisplay = False
ElseIf {"POSITION_ALLOWANCE_REASON", "RECEIPT_ALLOWANCE_REASON", "INVOICE_POSITION_ARTICLE", "INVOICE_POSITION_ARTICLE_DESCRIPTION"}.Contains(oItemSPECNAME) Then
'Tabellendarstellung
oYPlus = 0
If Not oDescriptionFollowup Then
oYPlus = 0
End If
If oYDyn = 0 Then
oYDyn = yPosition
End If
Dim oX = 50
If oItemSPECNAME.Contains("ALLOWANCE") Then
oX = 20
End If
oPosDesc = ""
oPosDesc = oItemValue
If oYDyn = 0 Then
oYDyn = yPosition
End If
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, 66)
Dim oParts As List(Of String) = StringFunctions.SplitText_Length(olinepart, 64)
' Durchlaufen der einzelnen Teile in einer Schleife
For Each part As String In oParts
MyGDPicturePDF.DrawText(fontResName, oX, oYDyn, part)
@@ -370,8 +370,6 @@ Public Class XRechnungViewDocument
oYPlus += 5
Next
Next
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_POSITION_NOTE" Then
'Tabellendarstellung
@@ -392,26 +390,6 @@ Public Class XRechnungViewDocument
Next
Next
'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
If oYDyn = 0 Then
oYDyn = yPosition
End If
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
MyGDPicturePDF.DrawText(fontResName, 50, oYDyn, part)
oYDyn += 5
oYPlus += 5
Next
Next
'oPosTerm += $" {oItemValue}"
oDisplay = False
ElseIf {"INVOICE_TAXPOS_TAX_RATE", "INVOICE_TAXPOS_RATE", "POSITION_ALLOWANCE_CALCULATION_PERCENT", "RECEIPT_ALLOWANCE_CALCULATION_PERCENT", "RECEIPT_ALLOWANCE_VAT_RATE"}.Contains(oItemSPECNAME) Then
@@ -500,8 +478,6 @@ Public Class XRechnungViewDocument
Else
If oItemSPECNAME = "INVOICE_POSITION_TAX_AMOUNT" And oYPlus > 0 Then
yPosition += oYPlus
ElseIf oItemSPECNAME = "RECEIPT_ALLOWANCE_CHARGE_INDICATOR" Then
yPosition -= 5
Else