AMBAR, Ueberstundenauszahlung, etc.
This commit is contained in:
@@ -63,11 +63,11 @@ Public Class cTimasAPI
|
||||
|
||||
End Function
|
||||
|
||||
Public Function getTimeSaldo(maid As Integer, ByRef info As String, kindofbalance As String, ByRef Optional isEndpointRunning As Boolean = True, Optional datetimeformat As String = "seconds") As Double
|
||||
Public Function getTimeSaldo(maid As Integer, ByRef info As String, kindofbalance As String, ByRef Optional isEndpointRunning As Boolean = True, Optional datetimeformat As String = "seconds") As String
|
||||
Try
|
||||
Dim returnText As String = ""
|
||||
Dim failureText As String = ""
|
||||
Dim timesaldo As Double = -1
|
||||
Dim timesaldo = "-1"
|
||||
|
||||
|
||||
If maid < 1 Then
|
||||
@@ -114,27 +114,29 @@ Public Class cTimasAPI
|
||||
Else
|
||||
Dim saldo = json.StringOf(kindofbalance) 'Tagessaldo (gestern) in Sekunden
|
||||
If saldo IsNot Nothing Then
|
||||
Dim saldoAsDouble = CDbl(saldo)
|
||||
Dim saldoAsDouble As Double
|
||||
Dim infoBuilder As New StringBuilder
|
||||
Select Case datetimeformat
|
||||
Case "seconds"
|
||||
saldoAsDouble = CDbl(saldo)
|
||||
saldoAsDouble = Math.Round(saldoAsDouble / 3600, 2)
|
||||
infoBuilder.Append(saldoAsDouble)
|
||||
infoBuilder.Append(" h")
|
||||
info = infoBuilder.ToString()
|
||||
timesaldo = saldoAsDouble
|
||||
timesaldo = saldoAsDouble.ToString
|
||||
Case "minutes"
|
||||
saldoAsDouble = Math.Round(saldoAsDouble / 3600, 2)
|
||||
saldoAsDouble = CDbl(saldo)
|
||||
saldoAsDouble = Math.Round(saldoAsDouble / 60, 2)
|
||||
infoBuilder.Append(saldoAsDouble)
|
||||
infoBuilder.Append(" min")
|
||||
info = infoBuilder.ToString()
|
||||
timesaldo = saldoAsDouble
|
||||
timesaldo = saldoAsDouble.ToString
|
||||
|
||||
Case "time"
|
||||
infoBuilder.Append(saldoAsDouble)
|
||||
infoBuilder.Append(" Zeit")
|
||||
infoBuilder.Append(saldo)
|
||||
infoBuilder.Append(" h")
|
||||
info = infoBuilder.ToString()
|
||||
timesaldo = saldoAsDouble
|
||||
timesaldo = saldo
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
Reference in New Issue
Block a user