Anpassung auf Änderung von Schnittstelle (REST-API von Timas).
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Forms
|
||||
Imports DocumentFormat.OpenXml.EMMA
|
||||
|
||||
Public Class frmUeberstundenauszahlen
|
||||
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
@@ -33,44 +35,18 @@ Public Class frmUeberstundenauszahlen
|
||||
customFields = timas.getEmployeecustomFields(MA.mit_timasId)
|
||||
timas.getTimeaccountList(dt)
|
||||
|
||||
Dim dv = New DataView(dt)
|
||||
dv.RowFilter = "accountid = 65 Or accountid = 69 Or accountid = 70 Or accountid = 72 Or accountid = 73 Or accountid = 1209 Or accountid = 1235 Or accountid = 1550 Or accountid = 1551 Or accountid = 1553"
|
||||
'65;"01-Lfd Saldo"
|
||||
'66;02-Krank
|
||||
'67;03-Urlaub
|
||||
'69;"10-Na 22-06"
|
||||
'70;"11-Sa 00-24"
|
||||
'72;"13-So 00-24"
|
||||
'73;"14-FtN 00-24"
|
||||
'438;04-Sonstige
|
||||
'986;Stundenlohn
|
||||
'987;FT-Ersatzzeit
|
||||
'993;"Ausz. ÜS"
|
||||
'1209;Mehrarbeit
|
||||
'1210;"Script hilfskonto WSaldo"
|
||||
'1227;Schichtzulage
|
||||
'1231;Urlaubsstunden
|
||||
'1235;"Überstunden 100% gesamt"
|
||||
'1257;Zuschlag
|
||||
'1272;"unbezahlter Urlaub"
|
||||
'1366;"Mehrarbeit am 25. des Monats gesamt"
|
||||
'1393;"Urlaub (Stunden)"
|
||||
'1550;"AUSZ ÜS 100%"
|
||||
'1551;"AUSZ ÜS 50%"
|
||||
|
||||
'65
|
||||
'69
|
||||
'70
|
||||
'72
|
||||
'73
|
||||
'1209
|
||||
'1235
|
||||
'1550
|
||||
'1551
|
||||
'1553
|
||||
|
||||
|
||||
|
||||
Dim dv = New DataView(dt)
|
||||
dv.RowFilter = "accountid = 65 Or accountid = 69 Or accountid = 70 Or accountid = 72 Or accountid = 73 Or accountid = 1209 Or accountid = 1235 Or accountid = 1550 Or accountid = 1551 Or accountid = 1553"
|
||||
'1553;"AUSZ ÜS MA 25%"
|
||||
timeaccountdt = dv.ToTable
|
||||
|
||||
getUeberstunden(False)
|
||||
@@ -500,19 +476,29 @@ Public Class frmUeberstundenauszahlen
|
||||
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
|
||||
End If
|
||||
|
||||
If sum50 > 0 Then
|
||||
If (sum50 > 0 Or sum0 > 0) And Not istTeilzeit Then
|
||||
Dim row = dtsetEntries.NewRow
|
||||
row.Item("accountid") = 1551
|
||||
row.Item("value") = sum50.ToString.Replace(",", ".")
|
||||
row.Item("value") = (sum50 + sum0).ToString.Replace(",", ".")
|
||||
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
|
||||
|
||||
End If
|
||||
If istTeilzeit Then
|
||||
If sum50 > 0 Then
|
||||
Dim row = dtsetEntries.NewRow
|
||||
row.Item("accountid") = 1551
|
||||
row.Item("value") = sum50.ToString.Replace(",", ".")
|
||||
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
|
||||
End If
|
||||
|
||||
If sum0 > 0 Then
|
||||
Dim row = dtsetEntries.NewRow
|
||||
row.Item("accountid") = 1553
|
||||
row.Item("value") = sum0.ToString.Replace(",", ".")
|
||||
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
|
||||
End If
|
||||
End If
|
||||
|
||||
If sum0 > 0 Then
|
||||
Dim row = dtsetEntries.NewRow
|
||||
row.Item("accountid") = IIf(istTeilzeit, 1553, 1551)
|
||||
row.Item("value") = sum0.ToString.Replace(",", ".")
|
||||
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
|
||||
End If
|
||||
|
||||
If gesamt > 0 Then 'vom ldf Saldo, ev. über API Möglich monatliche Korrektur direkt zu befüllen, dann muss dieser If Zweig überarbeitet werden!!!!!!!!!!!!!!
|
||||
Dim row = dtsetEntries.NewRow
|
||||
@@ -565,7 +551,7 @@ Public Class frmUeberstundenauszahlen
|
||||
txtAusgabe.Append("100% ÜS: " & txtberAusz100.Text & vbNewLine)
|
||||
txtAusgabe.Append("50% ÜS: " & txtberAusz50.Text + IIf(Not istTeilzeit, CDbl(txtberAusz25.Text), 0) & vbNewLine)
|
||||
If istTeilzeit Then txtAusgabe.Append("25% ÜS: " & CDbl(txtberAusz25.Text) & vbNewLine)
|
||||
txtAusgabe.Append("ÜS gesamt: " & CDbl(txtberAusz100.Text) + CDbl(txtberAusz50.Text) + CDbl(txtberAusz25.Text))
|
||||
'txtAusgabe.Append("ÜS gesamt: " & CDbl(txtberAusz100.Text) + CDbl(txtberAusz50.Text) + CDbl(txtberAusz25.Text))
|
||||
|
||||
|
||||
Dim aksAuszahlung As MsgBoxResult = MsgBox(txtAusgabe.ToString, vbYesNo)
|
||||
@@ -602,6 +588,18 @@ Public Class frmUeberstundenauszahlen
|
||||
End If
|
||||
|
||||
If timas.deleteTimeAccounts(auszahlugsdatum, auszahlugsdatum, MA.mit_timasId, dtdeleteEntries) Then
|
||||
|
||||
'Dim dtEntriesset0 As New DataTable
|
||||
'dtEntriesset0.Columns.Add("accountid", GetType(Integer))
|
||||
'dtEntriesset0.Columns.Add("value", GetType(Double))
|
||||
'Dim row0 = dtEntriesset0.NewRow
|
||||
'row0.Item("accountid") = 1598
|
||||
'row0.Item("value") = -0.000001 'darf nicht 0 sein!!!!
|
||||
'dtEntriesset0.Rows.InsertAt(row0, dtEntriesset0.Rows.Count)
|
||||
'timas.setTimeAccountEntries(MA, dtEntriesset0, auszahlugsdatum, "")
|
||||
|
||||
|
||||
|
||||
Dim ues As New cUeberstunden(MA.mit_id, auszahlugsdatum.ToString("dd/MM/yyyy"))
|
||||
ues.uest_deleted = True
|
||||
ues.uest_lastChanged = Now()
|
||||
|
||||
Reference in New Issue
Block a user