Bugfix Gesamtsicherheiten, Prüfung ob Referenzbetrag unterschritten wird.
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("3.8.4.1")>
|
<Assembly: AssemblyVersion("3.8.4.2")>
|
||||||
<Assembly: AssemblyFileVersion("3.8.4.1")>
|
<Assembly: AssemblyFileVersion("3.8.4.2")>
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ Public Class frmGesamtsicherheitenMenuNEU
|
|||||||
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "VORLAGEN", "SONSTIGE", "", "", "Gesamtsicherheit_VERAG_AG")
|
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "VORLAGEN", "SONSTIGE", "", "", "Gesamtsicherheit_VERAG_AG")
|
||||||
DS.OPEN_SINGLE_ORIG()
|
DS.OPEN_SINGLE_ORIG()
|
||||||
|
|
||||||
Case "VERAG CS"
|
Case "Verag CS"
|
||||||
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "VORLAGEN", "SONSTIGE", "", "", "Gesamtsicherheit_VERAG_CS")
|
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "VORLAGEN", "SONSTIGE", "", "", "Gesamtsicherheit_VERAG_CS")
|
||||||
DS.OPEN_SINGLE_ORIG()
|
DS.OPEN_SINGLE_ORIG()
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
currentGesSichRef = New VERAG_PROG_ALLGEMEIN.cAufschubKonten(Standort)
|
currentGesSichRef = New VERAG_PROG_ALLGEMEIN.cAufschubKonten(Standort)
|
||||||
SaldoNew = Decimal.Parse(currentGesSichRef.CalcSaldo())
|
SaldoNew = Decimal.Parse(currentGesSichRef.CalcSaldo())
|
||||||
lblSaldo.Text = "Saldo: €" & Decimal.Parse(currentGesSichRef.CalcSaldo()).ToString("N")
|
lblSaldo.Text = "Saldo: €" & SaldoNew.ToString("N")
|
||||||
|
|
||||||
Me.Text = "Gesamtsicherheit " & Standort
|
Me.Text = "Gesamtsicherheit " & Standort
|
||||||
|
|
||||||
@@ -415,7 +415,7 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub txtMRNDate_GotFocus(sender As Object, e As EventArgs) Handles txtSicherheitDat.GotFocus, txtSicherheitTime.GotFocus, txtPosTime.GotFocus, txtUhrzeitaendern.GotFocus, txtDatumaendern.GotFocus
|
Private Sub txtMRNDate_GotFocus(sender As Object, e As EventArgs) Handles txtSicherheitDat.GotFocus, txtSicherheitTime.GotFocus, txtPosTime.GotFocus, txtUhrzeitaendern.GotFocus, txtDatumaendern.GotFocus, txtPosDat.GotFocus
|
||||||
Select Case sender.name
|
Select Case sender.name
|
||||||
Case "txtSicherheitDat"
|
Case "txtSicherheitDat"
|
||||||
If txtSicherheitDat.Text.Length < 1 Then txtSicherheitDat.Text = Date.Today.ToString("dd.MM.yyyy")
|
If txtSicherheitDat.Text.Length < 1 Then txtSicherheitDat.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||||
@@ -611,7 +611,8 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
Sub AfterButton()
|
Sub AfterButton()
|
||||||
currentGesSichRef.CalcSaldo()
|
'currentGesSichRef.CalcSaldo()
|
||||||
|
lblSaldo.Text = "Saldo: €" & Decimal.Parse(currentGesSichRef.CalcSaldo()).ToString("N")
|
||||||
LoadDGVSicherheiten()
|
LoadDGVSicherheiten()
|
||||||
EmptyTXT()
|
EmptyTXT()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -635,7 +636,7 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
Public Sub EmptyTXT()
|
Public Sub EmptyTXT()
|
||||||
Dim a As New List(Of Windows.Forms.Control)
|
Dim a As New List(Of Windows.Forms.Control)
|
||||||
For Each contr As Windows.Forms.Control In panOben.Controls
|
For Each contr As Windows.Forms.Control In panOben.Controls
|
||||||
If contr.GetType.FullName = "System.Windows.Forms.TextBox" Or contr.GetType.FullName = "VERAG_PROG_ALLGEMEIN.MyTextBox" Then contr.Text = ""
|
If (contr.GetType.FullName = "System.Windows.Forms.TextBox" Or contr.GetType.FullName = "VERAG_PROG_ALLGEMEIN.MyTextBox") And Not contr.Name = "txtZollsatzueberschreiben" Then contr.Text = ""
|
||||||
Next
|
Next
|
||||||
cboSicherheitATR.SelectedItem = Nothing
|
cboSicherheitATR.SelectedItem = Nothing
|
||||||
End Sub
|
End Sub
|
||||||
@@ -788,9 +789,11 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
btnAddSicherheit.Visible = True
|
btnAddSicherheit.Visible = True
|
||||||
btnDeleteSicherheit.Visible = False
|
btnDeleteSicherheit.Visible = False
|
||||||
AfterButton()
|
AfterButton()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnUpdatePos_Click(sender As Object, e As EventArgs) Handles btnUpdatePos.Click
|
Private Sub btnUpdatePos_Click(sender As Object, e As EventArgs) Handles btnUpdatePos.Click
|
||||||
|
|
||||||
With currentSPos
|
With currentSPos
|
||||||
|
|
||||||
.gsp_art = "CLOSE"
|
.gsp_art = "CLOSE"
|
||||||
@@ -995,32 +998,26 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
'Dim currentSaldo As Double = Decimal.Parse(currentGesSichRef.CalcSaldo()).ToString("N")
|
|
||||||
|
|
||||||
Dim SaldoNewTemp = SaldoNew
|
Dim SaldoNewTemp = SaldoNew
|
||||||
Dim calcSicherheiten As Double = calcSicherheitsbetragGestelle()
|
Dim calcSicherheiten As Double = calcSicherheitsbetragGestelle()
|
||||||
Dim calcSicherheitenPos As Double = calcSicherheitsbetragPos()
|
Dim calcSicherheitenPos As Double = calcSicherheitsbetragPos()
|
||||||
Dim newCalcSaldo As Double
|
Dim newCalcSaldo As Double
|
||||||
|
|
||||||
|
newCalcSaldo = SaldoNew - currentSBetrag
|
||||||
|
|
||||||
If newPosition Then
|
'Dim referenzbetrag As Double = currentGesSichRef.brgakto_betrag
|
||||||
newCalcSaldo = SaldoNewTemp - currentSBetrag
|
|
||||||
Else
|
|
||||||
newCalcSaldo = SaldoNewTemp - currentSBetrag
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim referenzbetrag As Double = currentGesSichRef.brgakto_betrag
|
|
||||||
|
|
||||||
|
|
||||||
If SaldoNewTemp < 0 Then
|
If SaldoNew < 0 Then
|
||||||
MsgBox("Achtung!" & vbCrLf & " Saldo ist NEGATIV")
|
MsgBox("Achtung!" & vbCrLf & "Saldo ist NEGATIV")
|
||||||
Return True 'Saldo ist bereits negativ!
|
Return True 'Saldo ist bereits negativ!
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim diffAbs As Double = Math.Abs(SaldoNewTemp - currentSBetrag)
|
Dim diffAbs As Double = Math.Abs(SaldoNew - currentSBetrag)
|
||||||
|
|
||||||
If (referenzbetrag - newCalcSaldo < 0) Then
|
'If (referenzbetrag - newCalcSaldo < 0) Then
|
||||||
If vbNo = MsgBox("ACHTUNG! " & vbCrLf & " Dieser Sicherheitsbetrag würde den jezigen Saldo um " & diffAbs & " übersteigen !" & vbCrLf & "Trotzdem speichen?", vbYesNo) Then
|
If (newCalcSaldo < 0) Then
|
||||||
|
If vbNo = MsgBox("ACHTUNG!" & vbCrLf & "Dieser Sicherheitsbetrag würde den jetzigen Saldo um " & Math.Abs(newCalcSaldo) & "€ übersteigen!" & vbCrLf & "Trotzdem speichen?", vbYesNo) Then
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
Return True
|
Return True
|
||||||
@@ -1032,7 +1029,6 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
MsgBox(ex.Message)
|
MsgBox(ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user