Compare commits

...

2 Commits

Author SHA1 Message Date
Developer01
48406884ca Merge branch 'master' of http://git.dd:3000/AppStd/Modules 2025-09-15 08:46:37 +02:00
Developer01
f7c0a29676 v3.1. Änderung Sichtbeleg Version 1 vor Abstimmung WISAG 2025-09-05 10:59:39 +02:00
2 changed files with 22 additions and 16 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("3.0.3.0")>
<Assembly: AssemblyFileVersion("3.0.3.0")>
<Assembly: AssemblyVersion("3.1.0.0")>
<Assembly: AssemblyFileVersion("3.1.0.0")>

View File

@ -143,6 +143,8 @@ Public Class XRechnungViewDocument
ElseIf oArea = "POSITION" Then
oAREACaption = "Positionen / Positions:"
oIsPosition = True
ElseIf oArea = "ALLOWANCE" Then
oAREACaption = "Zu- oder Abschlag/Surcharge or Discount:"
ElseIf oArea = "AMOUNT" Then
oAREACaption = "Beträge / Amounts:"
oCreateTextBox = True
@ -310,10 +312,7 @@ Public Class XRechnungViewDocument
ElseIf oItemSPECNAME = "INVOICE_POSITION_TAX_AMOUNT" Then
'Tabellendarstellung
Dim oYPos = yPosition - 3.5
Dim oBetrag As Decimal = oItemValue
Dim oFormatiert As String = oBetrag.ToString("N2", New Globalization.CultureInfo("de-DE"))
Dim TAXTERM = $"{oFormatiert} {oCurrencySymbol}"
Dim TAXTERM = FormatCurrency(oItemValue, oCurrencySymbol)
MyGDPicturePDF.DrawTextBox(fontResName, 177, oYPos, 198, YCoo_TextBoxPlus5(oYPos),
TextAlignment.TextAlignmentFar, TextAlignment.TextAlignmentNear,
TAXTERM)
@ -332,10 +331,7 @@ Public Class XRechnungViewDocument
oPosTerm = $"{oItemValue} %:"
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_TAXPOS_AMOUNT" Then
Dim oBetrag As Decimal = oItemValue
Dim oFormatiert As String = oBetrag.ToString("N2", New Globalization.CultureInfo("de-DE"))
oFormatiert += $" {oCurrencySymbol}"
oPosTerm += $" {oFormatiert}"
oPosTerm += FormatCurrency(oItemValue, oCurrencySymbol)
oDisplay = False
ElseIf oItemSPECNAME = "INVOICE_TAXPOS_TYPE" Then
oPosTerm += $" {oItemValue}"
@ -350,12 +346,12 @@ Public Class XRechnungViewDocument
If Y_eq_lastrow = False And oAreaSwitch = False Then
yPosition += 5
End If
If oArea = "AMOUNT" Then
If oItemSPECNAME = "INVOICE_TOTAL_TAX" Or oItemSPECNAME = "INVOICE_TOTAL_NET" Or oItemSPECNAME = "INVOICE_TOTAL_GROSS" Then
Dim oBetrag As Decimal = oItemValue
Dim oFormatiert As String = oBetrag.ToString("N2", New Globalization.CultureInfo("de-DE"))
oFormatiert += $" {oCurrencySymbol}"
oItemValue = oFormatiert
If oArea = "AMOUNT" Or oArea = "ALLOWANCE" Then
Dim oCURRENCYFORMAT = {"INVOICE_TOTAL_TAX", "INVOICE_TOTAL_NET", "INVOICE_TOTAL_GROSS", "RECEIPT_ALLOWANCE_ACTUAL_AMOUNT",
"RECEIPT_ALLOWANCE_CALCULATION_PERCENT"}
If oCURRENCYFORMAT.Contains(oItemSPECNAME) Then
oItemValue = FormatCurrency(oItemValue, oCurrencySymbol)
End If
End If
@ -437,6 +433,16 @@ Public Class XRechnungViewDocument
Return Nothing
End Try
End Function
Private Function FormatCurrency(ByVal pValue As String, pCurrencySymbol As String) As String
pValue = pValue.replace(".", ",")
Dim oBetrag As Decimal = pValue
Dim oFormatiert As String = oBetrag.ToString("N2", New Globalization.CultureInfo("de-DE"))
oFormatiert = $"{oFormatiert} {pCurrencySymbol}"
Return oFormatiert
End Function
Private Function FormatStringT(ByVal text As String) As String
Return text.Replace(vbCr, " - ").Replace(vbLf, "").Replace(vbTab, " ")
End Function
Private Function RemoveNewlinesAndTabs(ByVal text As String) As String
Return text.Replace(vbCr, " - ").Replace(vbLf, "").Replace(vbTab, " ")
End Function