AMBAR, Ueberstundenauszahlung, etc.

This commit is contained in:
2024-04-30 17:38:24 +02:00
parent 54f7a3ca76
commit 1dc6528253
10 changed files with 609 additions and 279 deletions

View File

@@ -778,6 +778,10 @@ Public Class cRechnungsausgangPositionen
Sub New()
End Sub
Sub New(_RK_ID)
RK_ID = _RK_ID
End Sub
Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)

View File

@@ -433,7 +433,7 @@ Public Class frmMitarbeitersuche
Dim dtZeiten As New DataTable
If timas IsNot Nothing Then
Dim isServiceRunning As Boolean = True
timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, "dailyBalanceYesterday", isServiceRunning)
timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, "dailyBalanceYesterday", isServiceRunning, "time")
If Not isServiceRunning Then
'Abfrage konnte nicht durchgeführt werden.
MsgBox("Abfragefehler am Timas-Server!")

View File

@@ -347,6 +347,7 @@ Partial Class frmUeberstundenauszahlen
'Panel1
'
Me.Panel1.Controls.Add(Me.Label12)
Me.Panel1.Controls.Add(Me.LinkLabel1)
Me.Panel1.Controls.Add(Me.txtBruttoSum)
Me.Panel1.Controls.Add(Me.txtNettoSum)
Me.Panel1.Controls.Add(Me.Label11)
@@ -390,7 +391,7 @@ Partial Class frmUeberstundenauszahlen
Me.Panel1.Controls.Add(Me.txtAusz50)
Me.Panel1.Location = New System.Drawing.Point(6, 68)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(619, 258)
Me.Panel1.Size = New System.Drawing.Size(619, 281)
Me.Panel1.TabIndex = 30
'
'Label12
@@ -652,7 +653,7 @@ Partial Class frmUeberstundenauszahlen
'LinkLabel1
'
Me.LinkLabel1.AutoSize = True
Me.LinkLabel1.Location = New System.Drawing.Point(464, 48)
Me.LinkLabel1.Location = New System.Drawing.Point(447, 258)
Me.LinkLabel1.Name = "LinkLabel1"
Me.LinkLabel1.Size = New System.Drawing.Size(161, 13)
Me.LinkLabel1.TabIndex = 131
@@ -674,7 +675,6 @@ Partial Class frmUeberstundenauszahlen
'TabPage1
'
Me.TabPage1.Controls.Add(Me.cbxabwDatum)
Me.TabPage1.Controls.Add(Me.LinkLabel1)
Me.TabPage1.Controls.Add(Me.dtpMonat)
Me.TabPage1.Controls.Add(Me.PictureBox5)
Me.TabPage1.Controls.Add(Me.lblMonat)

View File

@@ -10,7 +10,7 @@ Public Class frmUeberstundenauszahlen
Dim refresh As Boolean = False
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim MA As cMitarbeiter = Nothing
Dim timas As cTimasAPI = New cTimasAPI("timas")
Dim timas = New cTimasAPI("timas")
Dim dt As New DataTable
Dim customFields As New DataTable
Dim timeaccountdt As New DataTable

View File

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