|
|
|
|
@@ -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
|
|
|
|
|
|