From a420c1a618acd4cb1a3b19749e76d8c054d73196 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Fri, 25 Apr 2025 14:57:24 +0200 Subject: [PATCH] MS Jobs sichtbeelg --- Jobs/My Project/AssemblyInfo.vb | 4 +- Jobs/ZUGFeRD/XRechnungViewDocument.vb | 77 +++++++++++++++++++++------ Windows/Windows.vbproj | 2 +- 3 files changed, 64 insertions(+), 19 deletions(-) diff --git a/Jobs/My Project/AssemblyInfo.vb b/Jobs/My Project/AssemblyInfo.vb index 493beac6..7a4eb7c1 100644 --- a/Jobs/My Project/AssemblyInfo.vb +++ b/Jobs/My Project/AssemblyInfo.vb @@ -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: - - + + diff --git a/Jobs/ZUGFeRD/XRechnungViewDocument.vb b/Jobs/ZUGFeRD/XRechnungViewDocument.vb index b11e9f29..38040cb3 100644 --- a/Jobs/ZUGFeRD/XRechnungViewDocument.vb +++ b/Jobs/ZUGFeRD/XRechnungViewDocument.vb @@ -163,10 +163,11 @@ Public Class XRechnungViewDocument ElseIf oArea = "POSITION" Then 'Tabellendarstellung MyGDPicturePDF.DrawText(fontResName, 10, yPosition, "Pos#") - MyGDPicturePDF.DrawText(fontResName, 20, yPosition, "Anz./Am.") - MyGDPicturePDF.DrawText(fontResName, 38, yPosition, "Pos.-Text") - MyGDPicturePDF.DrawText(fontResName, 155, yPosition, "Steuer/Tax") - MyGDPicturePDF.DrawText(fontResName, 175, yPosition, "Betrag/Sum") + MyGDPicturePDF.DrawText(fontResName, 19, yPosition, "Anz./am.") + MyGDPicturePDF.DrawText(fontResName, 35, yPosition, "Einh/unt") + MyGDPicturePDF.DrawText(fontResName, 50, yPosition, "Pos.Text") + MyGDPicturePDF.DrawText(fontResName, 164, yPosition, "Steuer/tax") + MyGDPicturePDF.DrawText(fontResName, 181, yPosition, "Betrag/sum") yPosition += 5 'Tabellendarstellung Ende End If @@ -191,7 +192,7 @@ Public Class XRechnungViewDocument 'MyGDPicturePDF.DrawTextBox(fontResName, 10, otextBoxYPos, 16, YCoo_TextBoxPlus5(otextBoxYPos), ' TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentNear, ' oPosCount) - MyGDPicturePDF.DrawText(fontResName, 20, yPosition, oItemValue) + MyGDPicturePDF.DrawText(fontResName, 19, yPosition, oItemValue) 'Tabellendarstellung Ende oDisplay = False ' yPosition -= 5 @@ -214,7 +215,6 @@ Public Class XRechnungViewDocument If oItemSPECNAME = "INVOICE_POSITION_AMOUNT" Then oPosCount += 1 oYPlus = 0 - 'oPosTerm = $"{oPosCount}. {oItemValue} * " 'Tabellendarstellung yPosition += 5 oPosTerm = "" @@ -223,9 +223,14 @@ Public Class XRechnungViewDocument 'MyGDPicturePDF.DrawTextBox(fontResName, 10, otextBoxYPos, 16, YCoo_TextBoxPlus5(otextBoxYPos), ' TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentNear, ' oPosCount) - MyGDPicturePDF.DrawText(fontResName, 20, yPosition, oItemValue) + MyGDPicturePDF.DrawText(fontResName, 19, yPosition, oItemValue) 'Tabellendarstellung Ende oDisplay = False + ElseIf oItemSPECNAME = "INVOICE_POSITION_UNIT_TYPE" Then + oYPlus = 0 + Dim oUnit = Return_UnitType(oItemValue) + MyGDPicturePDF.DrawText(fontResName, 35, yPosition, oUnit) + oDisplay = False ElseIf oItemSPECNAME = "INVOICE_POSITION_ARTICLE" Then 'Tabellendarstellung oYPlus = 0 @@ -239,7 +244,7 @@ Public Class XRechnungViewDocument For Each part As String In oParts oYDyn += 5 oYPlus += 5 - MyGDPicturePDF.DrawText(fontResName, 38, oYDyn, part) + MyGDPicturePDF.DrawText(fontResName, 50, oYDyn, part) Next Next 'Tabellendarstellung Ende @@ -248,25 +253,25 @@ Public Class XRechnungViewDocument ElseIf oItemSPECNAME = "INVOICE_POSITION_NOTE" Then 'Tabellendarstellung Dim cleanedText As String = RemoveNewlinesAndTabs(oItemValue) - Dim oParts As List(Of String) = StringFunctions.SplitText_Length(cleanedText, 68) + 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, 67) + 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, 38, oYDyn, part) + MyGDPicturePDF.DrawText(fontResName, 50, oYDyn, part) Next Next - 'Tabellendarstellung Ende + 'oPosTerm += $" {oItemValue}" oDisplay = False ElseIf oItemSPECNAME = "INVOICE_TAXPOS_TAX_RATE" Or oItemSPECNAME = "INVOICE_TAXPOS_RATE" Then 'Tabellendarstellung - MyGDPicturePDF.DrawText(fontResName, 155, yPosition, $"{oItemValue} %") + MyGDPicturePDF.DrawText(fontResName, 164, yPosition, $"{oItemValue} %") 'Tabellendarstellung ENDE ' oPosTerm += $" - {oItemValue} %" oDisplay = False @@ -274,10 +279,12 @@ Public Class XRechnungViewDocument ' oPosTerm += $" - {oItemValue} {oCurrencySymbol}" 'Tabellendarstellung Dim oYPos = yPosition - 3.5 - MyGDPicturePDF.DrawTextBox(fontResName, 175, oYPos, 193, YCoo_TextBoxPlus5(oYPos), + Dim TAXTERM = $"{oItemValue} {oCurrencySymbol}" + MyGDPicturePDF.DrawTextBox(fontResName, 177, oYPos, 198, YCoo_TextBoxPlus5(oYPos), TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentNear, - $"{oItemValue} {oCurrencySymbol}") - ' MyGDPicturePDF.DrawText(fontResName, 175, yPosition, $"{oItemValue} {oCurrencySymbol}") + TAXTERM) + ' MyGDPicturePDF.DrawText(fontResName, 180, yPosition, $"{oItemValue} {oCurrencySymbol}") + 'Tabellendarstellung Ende End If oItemValue = oPosTerm @@ -453,4 +460,42 @@ Public Class XRechnungViewDocument Return oReturn End Function + Private Function Return_UnitType(pType As String) As String + Dim oReturn As String = "Stück/pc" + If pType = "C62" Then + oReturn = "Stück/pc" + ElseIf pType = "DAY" Then + oReturn = "Tag/day" + ElseIf pType = "HAR" Then + oReturn = "Hek/hec" + ElseIf pType = "HUR" Then + oReturn = "h" + ElseIf pType = "KGM" Then + oReturn = "kg" + ElseIf pType = "KTM" Then + oReturn = "km" + ElseIf pType = "KWH" Then + oReturn = pType + ElseIf pType = "LS" Then + oReturn = "pausch/flat" + ElseIf pType = "MIN" Then + oReturn = "minute" + ElseIf pType = "MTK" Then + oReturn = "QM/SM" + ElseIf pType = "Kubik/CM" Then + oReturn = "MTR" + ElseIf pType = "Meter" Then + oReturn = "minute" + ElseIf pType = "P1" Then + oReturn = "%" + ElseIf pType = "SET" Then + oReturn = "Set" + ElseIf pType = "TNE" Then + oReturn = "Tonne/ton" + ElseIf pType = "WEE" Then + oReturn = "Woche/week" + End If + Return oReturn + End Function + End Class diff --git a/Windows/Windows.vbproj b/Windows/Windows.vbproj index cfa781bc..eaa73b43 100644 --- a/Windows/Windows.vbproj +++ b/Windows/Windows.vbproj @@ -35,7 +35,7 @@ On - Binary + Text Off