USTVA, etc.
This commit is contained in:
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.3.8.0")>
|
<Assembly: AssemblyVersion("1.3.8.1")>
|
||||||
<Assembly: AssemblyFileVersion("1.3.8.0")>
|
<Assembly: AssemblyFileVersion("1.3.8.1")>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
Imports System.ComponentModel
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Reflection
|
Imports System.Reflection
|
||||||
Imports System.Windows.Documents
|
Imports System.Windows.Documents
|
||||||
|
|||||||
@@ -44,6 +44,15 @@ Public Class ustCntlUSTV_AntragPosition
|
|||||||
txtLand.Text = ""
|
txtLand.Text = ""
|
||||||
txtUIDNr.Text = ""
|
txtUIDNr.Text = ""
|
||||||
|
|
||||||
|
gridAktiv = True
|
||||||
|
|
||||||
|
Dim filter As String = "UstV_aktiv = 1"
|
||||||
|
If Antrag_LandKz <> "" AndAlso cbxAntragsfilter.Checked Then
|
||||||
|
filter &= " and left(UstV_Leistender_UstNr,2)='" & Antrag_LandKz & "'"
|
||||||
|
sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender] + ' ' + isnull([UstV_Leistender_UstNr],'')) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
|
||||||
|
Else
|
||||||
|
sbLeistender.initSearchBox(Me.FindForm, "[UStV_LeistenderId],[UStV_Leistender], ([UStV_Leistender] + ' ' + isnull([UstV_Leistender_UstNr],'')) as Leistender,[UstV_Leistender_PLZ] as PLZ, ([UstV_Leistender_Strasse] + ' ' +[UstV_Leistender_StrasseNr]) as Strasse, [UstV_Leistender_Stadt] as Stadt FROM [tblUStVLeistender]", {"UStV_Leistender", "UstV_Leistender_UstNr"}, filter, "UStV_Leistender", "UStV_LeistenderId", "Leistender", "FMZOLL",, 400, 200, {"UStV_Leistender", "UStV_LeistenderId"})
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -425,24 +434,33 @@ Public Class ustCntlUSTV_AntragPosition
|
|||||||
If sender Is txtUSTBetrag Then
|
If sender Is txtUSTBetrag Then
|
||||||
If IsNumeric(txtUSTBetrag.Text) AndAlso IsNumeric(txtUmrechnungskurs.Text) Then
|
If IsNumeric(txtUSTBetrag.Text) AndAlso IsNumeric(txtUmrechnungskurs.Text) Then
|
||||||
|
|
||||||
If CDbl(UStV_POS.UStVPo_USteuerbetrag) <> CDbl(txtUSTBetrag.Text) Then
|
If CDbl(UStV_POS.UStVPo_USteuerbetrag) <> CDbl(txtUSTBetrag.Text) OrElse UStV_POS.UStVPo_USteuerbetrag Is Nothing Then
|
||||||
'Umrechnung bei Währung <> EUR im Antrag!
|
'Umrechnung bei Währung <> EUR im Antrag!
|
||||||
|
|
||||||
Dim antr As New cUSTVAntrag(UStV_POS.UStVAn_ID)
|
Dim antr As New cUSTVAntrag(UStV_POS.UStVAn_ID)
|
||||||
|
|
||||||
If antr.UStVAn_Währungscode <> "EUR" AndAlso IsDate(UStV_POS.UStVPo_ReDat) Then
|
If antr.UStVAn_Währungscode <> "EUR" AndAlso (IsDate(UStV_POS.UStVPo_ReDat) OrElse (txtRgDatum.Text <> "" AndAlso IsDate(txtRgDatum.Text))) Then
|
||||||
If txtUmrechnungskurs.Text = 1 Or txtUmrechnungskurs.Text = "" Then
|
If txtUmrechnungskurs.Text = 1 Or txtUmrechnungskurs.Text = "" Then
|
||||||
Dim kurs As New cEZB_Waehrungskurse(antr.UStVAn_Währungscode)
|
Dim kurs As New cEZB_Waehrungskurse(antr.UStVAn_Währungscode)
|
||||||
txtUmrechnungskurs.Text = kurs.ezb_kurs
|
|
||||||
|
If IsDate(UStV_POS.UStVPo_ReDat) Then
|
||||||
|
txtUmrechnungskurs.Text = kurs.GET_KURS(antr.UStVAn_Währungscode, CDate(UStV_POS.UStVPo_ReDat))
|
||||||
|
ElseIf IsDate(txtRgDatum.Text) Then
|
||||||
|
txtUmrechnungskurs.Text = kurs.GET_KURS(antr.UStVAn_Währungscode, CDate(txtRgDatum.Text))
|
||||||
|
Else
|
||||||
|
txtUmrechnungskurs.Text = kurs.ezb_kurs
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
txtUSTBetragEUR.Text = Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
|
txtUSTBetragEUR.Text = Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
|
||||||
txtChanged = True
|
txtChanged = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ElseIf sender Is txtUSTBetragEUR Then
|
ElseIf sender Is txtUSTBetragEUR Then
|
||||||
|
|
||||||
@@ -457,11 +475,11 @@ Public Class ustCntlUSTV_AntragPosition
|
|||||||
|
|
||||||
If IsNumeric(txtUSTBetragEUR.Text) AndAlso IsNumeric(txtUSTBetrag.Text) Then
|
If IsNumeric(txtUSTBetragEUR.Text) AndAlso IsNumeric(txtUSTBetrag.Text) Then
|
||||||
|
|
||||||
If CDbl(UStV_POS.UStVPo_USteuerbetragEUR) <> CDbl(txtUSTBetragEUR.Text) Then
|
If CDbl(UStV_POS.UStVPo_USteuerbetragEUR) <> CDbl(txtUSTBetragEUR.Text) OrElse UStV_POS.UStVPo_USteuerbetragEUR Is Nothing Then
|
||||||
|
|
||||||
Dim zahl1 = txtUSTBetragEUR.Text / txtUSTBetrag.Text
|
Dim zahl1 = CDbl(txtUSTBetrag.Text) / CDbl(txtUSTBetragEUR.Text)
|
||||||
|
|
||||||
txtUmrechnungskurs.Text = zahl1
|
txtUmrechnungskurs.Text = Math.Round(zahl1, 2)
|
||||||
txtChanged = True
|
txtChanged = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -471,7 +489,7 @@ Public Class ustCntlUSTV_AntragPosition
|
|||||||
|
|
||||||
If IsNumeric(txtUSTBetrag.Text) AndAlso IsNumeric(txtUmrechnungskurs._value) Then
|
If IsNumeric(txtUSTBetrag.Text) AndAlso IsNumeric(txtUmrechnungskurs._value) Then
|
||||||
|
|
||||||
If UStV_POS.UStVPo_Umrechnungskurs <> txtUmrechnungskurs.Text.Replace(",", ".") Then
|
If UStV_POS.UStVPo_Umrechnungskurs <> txtUmrechnungskurs.Text.Replace(",", ".") OrElse UStV_POS.UStVPo_Umrechnungskurs Is Nothing Then
|
||||||
|
|
||||||
txtUSTBetragEUR.Text = Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
|
txtUSTBetragEUR.Text = Math.Floor((txtUSTBetrag.Text / txtUmrechnungskurs.Text) * 100 + 0.5) / 100
|
||||||
txtChanged = True
|
txtChanged = True
|
||||||
@@ -485,28 +503,28 @@ Public Class ustCntlUSTV_AntragPosition
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UStV_Leist.hasEntry Then
|
If UStV_Leist.hasEntry Then
|
||||||
|
|
||||||
|
|
||||||
UStV_POS.UStVPo_Leistender = UStV_Leist.UStV_Leistender
|
UStV_POS.UStVPo_Leistender = UStV_Leist.UStV_Leistender
|
||||||
If UStV_Leist.UStV_LeistenderId > 0 Then UStV_POS.UStVPo_LeistenderId = UStV_Leist.UStV_LeistenderId
|
If UStV_Leist.UStV_LeistenderId > 0 Then UStV_POS.UStVPo_LeistenderId = UStV_Leist.UStV_LeistenderId
|
||||||
|
|
||||||
txtChanged = True
|
txtChanged = True
|
||||||
'UStV_POS.SAVE()
|
'UStV_POS.SAVE()
|
||||||
'RaiseEvent CHANGED(UStV_POS.UStVPo_ID)
|
'RaiseEvent CHANGED(UStV_POS.UStVPo_ID)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ElseIf sender Is txtRgDatum Then
|
ElseIf sender Is txtRgDatum Then
|
||||||
|
|
||||||
If txtRgDatum.Text <> "" Then
|
If txtRgDatum.Text <> "" Then
|
||||||
txtRgDatum.Text = txtRgDatum.Text.Replace("-", ".")
|
txtRgDatum.Text = txtRgDatum.Text.Replace("-", ".")
|
||||||
'If IsDate(txtRgDatum.Text) Then txtChanged = True
|
'If IsDate(txtRgDatum.Text) Then txtChanged = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1355,7 +1355,7 @@ Public Class cProgramFunctions
|
|||||||
For i As Integer = 0 To dgv.SelectedRows.Count - 1
|
For i As Integer = 0 To dgv.SelectedRows.Count - 1
|
||||||
row = dt.Rows.Add
|
row = dt.Rows.Add
|
||||||
For Each column As DataGridViewColumn In dgv.Columns
|
For Each column As DataGridViewColumn In dgv.Columns
|
||||||
Dim valueTmp As Object = dgv.SelectedRows.Item(i).Cells(column.Index).Value
|
Dim valueTmp As Object = dgv.SelectedRows.Item((dgv.SelectedRows.Count - 1) - i).Cells(column.Index).Value
|
||||||
If valueTmp Is DBNull.Value Then
|
If valueTmp Is DBNull.Value Then
|
||||||
row.Item(column.Index) = ""
|
row.Item(column.Index) = ""
|
||||||
Else
|
Else
|
||||||
|
|||||||
Reference in New Issue
Block a user