Sonderzeichen entfernen aus Anträge
This commit is contained in:
@@ -4293,7 +4293,7 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim UIDNrLeistender = ""
|
||||
Dim LeistenderName As String = ""
|
||||
|
||||
Dim Leistungstyp As String = ""
|
||||
Dim listOfLeistungstyp As New List(Of String)
|
||||
|
||||
|
||||
If Not IsDBNull(row.Cells("UstV_Leistender_UstNr").Value) AndAlso row.Cells("UstV_Leistender_UstNr").Value IsNot Nothing AndAlso row.Cells("UstV_Leistender_UstNr").Value <> "" IsNot Nothing Then
|
||||
@@ -4309,7 +4309,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If Not IsDBNull(row.Cells("UStVPo_Leistungsbezeichnung").Value) AndAlso row.Cells("UStVPo_Leistungsbezeichnung").Value IsNot Nothing Then
|
||||
|
||||
Leistungstyp = getLeistungsTyp(row.Cells("UStVPo_Leistungsbezeichnung").Value, CInt(row.Cells("UStVPo_SchnittstellenNr").Value))
|
||||
listOfLeistungstyp = getLeistungsTyp(row.Cells("UStVPo_Leistungsbezeichnung").Value, CInt(row.Cells("UStVPo_SchnittstellenNr").Value))
|
||||
|
||||
End If
|
||||
|
||||
@@ -4317,7 +4317,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Dim code As Integer = 0
|
||||
Dim Subcode = ""
|
||||
getCode(Antrag_LandKz, Leistungstyp, code, Subcode, True)
|
||||
getCode(Antrag_LandKz, listOfLeistungstyp(0), code, Subcode, "RO")
|
||||
|
||||
Dim goods As New GoodsDescription With {.GoodsItem = New List(Of GoodsItem)}
|
||||
goods.GoodsItem.Add(New GoodsItem With {.Code = code, .SubCode = Subcode, .FreeText = ""})
|
||||
@@ -4563,7 +4563,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Dim UIDNrLeistender = ""
|
||||
Dim LeistenderName As String = ""
|
||||
Dim Leistungstyp As String = ""
|
||||
Dim listOfLeistungstyp As New List(Of String)
|
||||
|
||||
|
||||
If Not IsDBNull(row.Cells("UstV_Leistender_UstNr").Value) AndAlso row.Cells("UstV_Leistender_UstNr").Value IsNot Nothing AndAlso row.Cells("UstV_Leistender_UstNr").Value <> "" IsNot Nothing Then
|
||||
@@ -4579,7 +4579,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If Not IsDBNull(row.Cells("UStVPo_Leistungsbezeichnung").Value) AndAlso row.Cells("UStVPo_Leistungsbezeichnung").Value IsNot Nothing Then
|
||||
|
||||
Leistungstyp = getLeistungsTyp(row.Cells("UStVPo_Leistungsbezeichnung").Value, CInt(row.Cells("UStVPo_SchnittstellenNr").Value))
|
||||
listOfLeistungstyp = getLeistungsTyp(row.Cells("UStVPo_Leistungsbezeichnung").Value, CInt(row.Cells("UStVPo_SchnittstellenNr").Value))
|
||||
|
||||
End If
|
||||
|
||||
@@ -4609,7 +4609,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Dim code As Integer = 0
|
||||
Dim Subcode = ""
|
||||
getCode(Antrag_LandKz, Leistungstyp, code, Subcode)
|
||||
getCode(Antrag_LandKz, listOfLeistungstyp(0), code, Subcode)
|
||||
|
||||
p.GoodsDescription = New GoodsDescription_ With {.Code = code, .Subcode = Subcode}
|
||||
|
||||
@@ -4700,7 +4700,9 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
End Function
|
||||
|
||||
Private Function getLeistungsTyp(LeistungsBez As String, SchnittstellenNr As Integer) As String
|
||||
Private Function getLeistungsTyp(LeistungsBez As String, SchnittstellenNr As Integer) As List(Of String)
|
||||
|
||||
Dim list As New List(Of String)
|
||||
|
||||
|
||||
LeistungsBez = LeistungsBez.ToLower
|
||||
@@ -4710,19 +4712,31 @@ Public Class frmMDM_USTVAntrag
|
||||
ElseIf SchnittstellenNr = 9 Then
|
||||
LeistungsBez = "maut" 'MSE immer MAUT
|
||||
Else
|
||||
If LeistungsBez.Contains("maut") Or LeistungsBez.Contains("toll") Then Return "maut"
|
||||
If LeistungsBez.Contains("diesel") Or LeistungsBez.Contains("fuel") Then Return "diesel"
|
||||
If LeistungsBez.Contains("parkplatz") Then Return "parkplatz"
|
||||
If LeistungsBez.Contains("zubeh") Then Return "zubehör"
|
||||
If LeistungsBez.Contains("übern") Then Return "übernachtung"
|
||||
Return "rest"
|
||||
If LeistungsBez.Contains("maut") Or LeistungsBez.Contains("toll") Then
|
||||
list.Add("maut")
|
||||
End If
|
||||
If LeistungsBez.Contains("diesel") Or LeistungsBez.Contains("fuel") Then
|
||||
list.Add("diesel")
|
||||
End If
|
||||
If LeistungsBez.Contains("parkplatz") Then
|
||||
list.Add("parkplatz")
|
||||
End If
|
||||
If LeistungsBez.Contains("zubeh") Then
|
||||
list.Add("zubehzubehör")
|
||||
End If
|
||||
If LeistungsBez.Contains("übern") Then
|
||||
list.Add("übernachtung")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Return list
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub getCode(ByRef AntragLand As String, ByRef typ As String, ByRef Code As Integer, ByRef SubCode As String, Optional isRO As Boolean = False)
|
||||
Private Sub getCode(ByRef AntragLand As String, ByRef typ As String, ByRef Code As Integer, ByRef SubCode As String, Optional Portal As String = "")
|
||||
|
||||
If isRO Then
|
||||
If Portal = "RO" Then
|
||||
Select Case typ
|
||||
Case "diesel"
|
||||
Code = 1
|
||||
@@ -4741,6 +4755,29 @@ Public Class frmMDM_USTVAntrag
|
||||
Code = 6
|
||||
SubCode = "6.5"
|
||||
End Select
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If Portal = "DE" Then
|
||||
Select Case typ
|
||||
Case "diesel"
|
||||
Code = 1
|
||||
SubCode = "1.1.2"
|
||||
Case "maut"
|
||||
Code = 4
|
||||
SubCode = "4.1"
|
||||
Case "zubehör"
|
||||
Code = 3
|
||||
SubCode = "3.1.3"
|
||||
Case "parkplatz"
|
||||
Code = 3
|
||||
SubCode = "3.1.4"
|
||||
Case "übernachtung"
|
||||
Code = 6
|
||||
SubCode = "6.1"
|
||||
End Select
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
@@ -4775,11 +4812,11 @@ Public Class frmMDM_USTVAntrag
|
||||
End If
|
||||
|
||||
If typ = "rest" Then
|
||||
Code = 3
|
||||
SubCode = "3.13"
|
||||
End If
|
||||
Code = 3
|
||||
SubCode = "3.13"
|
||||
End If
|
||||
|
||||
Case "ES"
|
||||
Case "ES"
|
||||
If typ = "diesel" Then
|
||||
Code = 1
|
||||
SubCode = "1.14"
|
||||
@@ -4860,7 +4897,6 @@ Public Class frmMDM_USTVAntrag
|
||||
SubCode = ""
|
||||
End If
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
@@ -4890,9 +4926,9 @@ Public Class frmMDM_USTVAntrag
|
||||
Try
|
||||
filePath = sPath & filename
|
||||
|
||||
If File.Exists(filePath) Then
|
||||
File.Delete(filePath)
|
||||
End If
|
||||
'If File.Exists(filePath) Then
|
||||
' File.Delete(filePath)
|
||||
'End If
|
||||
|
||||
My.Computer.FileSystem.WriteAllBytes(filePath, My.Resources.Ustveu_Rechnungsanlagen_DE, False)
|
||||
|
||||
@@ -4914,15 +4950,18 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
Dim UIDNrLeistender = ""
|
||||
Dim LeistenderName As String = ""
|
||||
Dim listOfLeistungstyp As New List(Of String)
|
||||
|
||||
Dim maut As Boolean = False
|
||||
Dim diesel As Boolean = False
|
||||
Dim parkplatz As Boolean = False
|
||||
Dim zubeh As Boolean = False
|
||||
Dim uebernachtung As Boolean = False
|
||||
Dim Strasse As String = ""
|
||||
If Not IsDBNull(row.Cells("UstV_Leistender_Strasse").Value) AndAlso row.Cells("UstV_Leistender_Strasse").Value IsNot Nothing AndAlso row.Cells("UstV_Leistender_Strasse").Value <> "" Then Strasse = row.Cells("UstV_Leistender_Strasse").Value
|
||||
|
||||
Dim Ort As String = ""
|
||||
If Not IsDBNull(row.Cells("UstV_Leistender_Stadt").Value) AndAlso row.Cells("UstV_Leistender_Stadt").Value IsNot Nothing AndAlso row.Cells("UstV_Leistender_Stadt").Value <> "" Then Ort = row.Cells("UstV_Leistender_Stadt").Value
|
||||
|
||||
If Not IsDBNull(row.Cells("UstV_Leistender_UstNr").Value) AndAlso row.Cells("UstV_Leistender_UstNr").Value IsNot Nothing AndAlso row.Cells("UstV_Leistender_UstNr").Value <> "" IsNot Nothing Then
|
||||
Dim PLZ As String = ""
|
||||
If Not IsDBNull(row.Cells("UstV_Leistender_PLZ").Value) AndAlso row.Cells("UstV_Leistender_PLZ").Value IsNot Nothing AndAlso row.Cells("UstV_Leistender_PLZ").Value <> "" Then PLZ = row.Cells("UstV_Leistender_PLZ").Value
|
||||
|
||||
If Not IsDBNull(row.Cells("UstV_Leistender_UstNr").Value) AndAlso row.Cells("UstV_Leistender_UstNr").Value IsNot Nothing AndAlso row.Cells("UstV_Leistender_UstNr").Value <> "" Then
|
||||
UIDNrLeistender = row.Cells("UstV_Leistender_UstNr").Value
|
||||
'UIDNrLeistender = UIDNrLeistender.ToString.Replace(Antrag_LandKz, "") DEU wollen das Land dabei!
|
||||
End If
|
||||
@@ -4956,11 +4995,11 @@ Public Class frmMDM_USTVAntrag
|
||||
Blatt.Range("D" & counter + 1).Value = Nettobetrag.ToString("0.00", CultureInfo.InvariantCulture)
|
||||
Blatt.Range("E" & counter + 1).Value = Steuerbetrag.ToString("0.00", CultureInfo.InvariantCulture)
|
||||
Blatt.Range("F" & counter + 1).Value = Steuerbetrag.ToString("0.00", CultureInfo.InvariantCulture)
|
||||
Blatt.Range("H" & counter + 1).Value = "False"
|
||||
Blatt.Range("I" & counter + 1).Value = LeistenderName
|
||||
Blatt.Range("J" & counter + 1).Value = row.Cells("UstV_Leistender_Strasse").Value
|
||||
Blatt.Range("M" & counter + 1).Value = row.Cells("UstV_Leistender_PLZ").Value
|
||||
Blatt.Range("N" & counter + 1).Value = row.Cells("UstV_Leistender_Stadt").Value
|
||||
Blatt.Range("H" & counter + 1).Value = "false"
|
||||
Blatt.Range("I" & counter + 1).Value = VERAG_PROG_ALLGEMEIN.cDATENSERVER.replaceInvalidCahr(LeistenderName)
|
||||
Blatt.Range("J" & counter + 1).Value = VERAG_PROG_ALLGEMEIN.cDATENSERVER.replaceInvalidCahr(Strasse)
|
||||
Blatt.Range("M" & counter + 1).Value = PLZ
|
||||
Blatt.Range("N" & counter + 1).Value = Ort
|
||||
Blatt.Range("O" & counter + 1).Value = iso2Land
|
||||
Blatt.Range("P" & counter + 1).Value = UIDNrLeistender
|
||||
|
||||
@@ -4970,53 +5009,21 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If Not IsDBNull(row.Cells("UStVPo_Leistungsbezeichnung").Value) AndAlso row.Cells("UStVPo_Leistungsbezeichnung").Value IsNot Nothing Then
|
||||
|
||||
Dim Bez As String = row.Cells("UStVPo_Leistungsbezeichnung").Value
|
||||
Bez = Bez.ToLower
|
||||
|
||||
If row.Cells("UStVPo_SchnittstellenNr").Value = 10 Then
|
||||
'UTA überspringen
|
||||
ElseIf row.Cells("UStVPo_SchnittstellenNr").Value = 9 Then
|
||||
maut = True 'MSE immer MAUT
|
||||
Else
|
||||
If Bez.Contains("maut") Or Bez.Contains("toll") Then maut = True
|
||||
If Bez.Contains("diesel") Or Bez.Contains("fuel") Then diesel = True
|
||||
If Bez.Contains("parkplatz") Then parkplatz = True
|
||||
If Bez.Contains("zubeh") Then zubeh = True
|
||||
If Bez.Contains("übern") Then uebernachtung = True
|
||||
End If
|
||||
|
||||
|
||||
listOfLeistungstyp = getLeistungsTyp(row.Cells("UStVPo_Leistungsbezeichnung").Value, row.Cells("UStVPo_SchnittstellenNr").Value)
|
||||
|
||||
For Each listEntry In listOfLeistungstyp
|
||||
|
||||
Dim code As Integer = 0
|
||||
Dim Subcode = ""
|
||||
getCode(Antrag_LandKz, listEntry, code, Subcode, "DE")
|
||||
|
||||
If diesel Then
|
||||
Blatt.Range("A" & counterLeistungen + 1).Value = counter
|
||||
Blatt.Range("B" & counterLeistungen + 1).Value = "1.1.2"
|
||||
Blatt.Range("B" & counterLeistungen + 1).Value = Subcode 'nur Subcodes!
|
||||
counterLeistungen += 1
|
||||
End If
|
||||
|
||||
If maut Then
|
||||
Blatt.Range("A" & counterLeistungen + 1).Value = counter
|
||||
Blatt.Range("B" & counterLeistungen + 1).Value = "4.1"
|
||||
counterLeistungen += 1
|
||||
End If
|
||||
|
||||
If zubeh Then
|
||||
Blatt.Range("A" & counterLeistungen + 1).Value = counter
|
||||
Blatt.Range("B" & counterLeistungen + 1).Value = "3.1.3"
|
||||
counterLeistungen += 1
|
||||
End If
|
||||
|
||||
If parkplatz Then
|
||||
Blatt.Range("A" & counterLeistungen + 1).Value = counter
|
||||
Blatt.Range("B" & counterLeistungen + 1).Value = "3.1.4"
|
||||
counterLeistungen += 1
|
||||
End If
|
||||
|
||||
If uebernachtung Then
|
||||
Blatt.Range("A" & counterLeistungen + 1).Value = counter
|
||||
Blatt.Range("B" & counterLeistungen + 1).Value = "6.1"
|
||||
counterLeistungen += 1
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user