Messenger, Ueberstunden

This commit is contained in:
2024-03-07 14:21:52 +01:00
parent bcba9114c7
commit 25d5767574
8 changed files with 142 additions and 38 deletions

View File

@@ -22,6 +22,7 @@ Partial Class frmUeberstundenauszahlen
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmUeberstundenauszahlen))
Me.dtpMonat = New System.Windows.Forms.DateTimePicker()
Me.lblMonat = New System.Windows.Forms.Label()
@@ -52,6 +53,7 @@ Partial Class frmUeberstundenauszahlen
Me.picDel = New System.Windows.Forms.PictureBox()
Me.txtAusz50vonSaldo = New System.Windows.Forms.TextBox()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.picShow = New System.Windows.Forms.PictureBox()
Me.txtAuszManuell = New System.Windows.Forms.TextBox()
Me.cx25 = New System.Windows.Forms.CheckBox()
Me.cbx50 = New System.Windows.Forms.CheckBox()
@@ -61,14 +63,14 @@ Partial Class frmUeberstundenauszahlen
Me.Label8 = New System.Windows.Forms.Label()
Me.txt50x1 = New System.Windows.Forms.TextBox()
Me.cbxTeilzeit = New System.Windows.Forms.CheckBox()
Me.dgvUeberstunden = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.picShow = New System.Windows.Forms.PictureBox()
Me.dgvUeberstunden = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.lblWarning = New System.Windows.Forms.Label()
CType(Me.picDel, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout()
CType(Me.dgvUeberstunden, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.picShow, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvUeberstunden, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'dtpMonat
@@ -361,6 +363,17 @@ Partial Class frmUeberstundenauszahlen
Me.Panel1.Size = New System.Drawing.Size(619, 235)
Me.Panel1.TabIndex = 30
'
'picShow
'
Me.picShow.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.today
Me.picShow.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.picShow.Location = New System.Drawing.Point(431, 11)
Me.picShow.Name = "picShow"
Me.picShow.Size = New System.Drawing.Size(21, 16)
Me.picShow.TabIndex = 38
Me.picShow.TabStop = False
Me.picShow.Visible = False
'
'txtAuszManuell
'
Me.txtAuszManuell.Location = New System.Drawing.Point(272, 196)
@@ -447,6 +460,16 @@ Partial Class frmUeberstundenauszahlen
Me.cbxTeilzeit.Text = "Teilzeit"
Me.cbxTeilzeit.UseVisualStyleBackColor = True
'
'PictureBox1
'
Me.PictureBox1.BackgroundImage = CType(resources.GetObject("PictureBox1.BackgroundImage"), System.Drawing.Image)
Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.PictureBox1.Location = New System.Drawing.Point(422, 12)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(29, 26)
Me.PictureBox1.TabIndex = 38
Me.PictureBox1.TabStop = False
'
'dgvUeberstunden
'
Me.dgvUeberstunden.AKTUALISIERUNGS_INTERVALL = -1
@@ -461,32 +484,21 @@ Partial Class frmUeberstundenauszahlen
Me.dgvUeberstunden.TabIndex = 13
Me.dgvUeberstunden.Visible = False
'
'PictureBox1
'lblWarning
'
Me.PictureBox1.BackgroundImage = CType(resources.GetObject("PictureBox1.BackgroundImage"), System.Drawing.Image)
Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.PictureBox1.Location = New System.Drawing.Point(422, 12)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(29, 26)
Me.PictureBox1.TabIndex = 38
Me.PictureBox1.TabStop = False
'
'picShow
'
Me.picShow.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.today
Me.picShow.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.picShow.Location = New System.Drawing.Point(431, 11)
Me.picShow.Name = "picShow"
Me.picShow.Size = New System.Drawing.Size(21, 16)
Me.picShow.TabIndex = 38
Me.picShow.TabStop = False
Me.picShow.Visible = False
Me.lblWarning.AutoSize = True
Me.lblWarning.ForeColor = System.Drawing.Color.Red
Me.lblWarning.Location = New System.Drawing.Point(413, 48)
Me.lblWarning.Name = "lblWarning"
Me.lblWarning.Size = New System.Drawing.Size(0, 13)
Me.lblWarning.TabIndex = 39
'
'frmUeberstundenauszahlen
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(646, 337)
Me.Controls.Add(Me.lblWarning)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.cbxTeilzeit)
Me.Controls.Add(Me.Panel1)
@@ -503,9 +515,9 @@ Partial Class frmUeberstundenauszahlen
CType(Me.picDel, System.ComponentModel.ISupportInitialize).EndInit()
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
CType(Me.dgvUeberstunden, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.picShow, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.dgvUeberstunden, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -552,4 +564,5 @@ Partial Class frmUeberstundenauszahlen
Friend WithEvents txtAuszManuell As Windows.Forms.TextBox
Friend WithEvents PictureBox1 As Windows.Forms.PictureBox
Friend WithEvents picShow As Windows.Forms.PictureBox
Friend WithEvents lblWarning As Windows.Forms.Label
End Class

View File

@@ -168,7 +168,7 @@
XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS
fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+
tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEQAACxEBf2RfkQAAHeBJREFUeF7t2VtuI0nT
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALDAAACwwBP0AiyAAAHeBJREFUeF7t2VtuI0nT
bdu/VaeNp9ffViEzoQunJF4iyAi38TBeHJUSudzMl4D6v//9738AwDB5CACsLQ8BgLXlIQCwtjwEANaW
hwDA2vIQAFhbHgIAa8tDAGBteQgArC0PAYC15SEAsLY8BADWlocAwNryEABYWx4CAGvLQwBgbXkIAKwt
DwGAteUhALC2PAQA1paHAMDa8hAAWFseAgBry0MAYG15CACsLQ8BgLXlIQCwtjwEANaWhwDA2vIQAFhb

View File

@@ -9,6 +9,7 @@ Public Class frmUeberstundenauszahlen
Dim MA As cMitarbeiter = Nothing
Dim timas As cTimasAPI = New cTimasAPI
Dim dt As New DataTable
Dim customFields As New DataTable
Dim timeaccountdt As New DataTable
Dim dtResult As New DataTable
'Dim dtbereitsausgezahlteUE As New DataTable
@@ -17,6 +18,7 @@ Public Class frmUeberstundenauszahlen
Dim maxUberstundenpruefung As Boolean = True
Dim istTeilzeit As Boolean = False
Dim faktorTeilzeit As Double = 100
Dim faktorSamstagsarbeit As Double = 150
Dim stunden100ausz, stunden50ausz, stunden100auszbere, stunden50auszbere, stunden100bereitsausbezahl, stunden50bereitsausbezahlt, stunden25bereitsausbezahlt, mehrabeit, stundenlfdSaldo, stundenlfdSaldobere, overwrittenSum As Double
@@ -29,6 +31,7 @@ Public Class frmUeberstundenauszahlen
MA = New cMitarbeiter(mit_id)
tag = New cFeiertage(DateTime.Parse(dtpMonat.Value).Year)
Label7.Text = MA.mit_vname & " " & MA.mit_nname
timas.getEmployee(MA.mit_timasId, customFields)
timas.getTimeaccountList(dt)
'65;"01-Lfd Saldo"
@@ -73,6 +76,39 @@ Public Class frmUeberstundenauszahlen
getUeberstunden(False)
For Each row As DataRow In customFields.Rows
If Not IsDBNull(row.Item("value")) AndAlso Not IsDBNull(row.Item("name")) Then
If row.Item("name") = "Teilzeit" Then
If row.Item("value") = "true" Then
cbxTeilzeit.Checked = True
Else
cbxTeilzeit.Checked = False
End If
End If
If row.Item("name") = "SA-Zuschlag" Then
If row.Item("value") = "true" Then
faktorSamstagsarbeit = 150 'Samstagsarbeit wir im Timas hochgerechnet
Else
faktorSamstagsarbeit = 100 'Samstagsarbeit wir im Timas NICHT hochgerechnet
End If
End If
If row.Item("name") = "Zuschlagsfrei" Then
If row.Item("value") = "true" Then
lblWarning.Text = "Zuschlagsfrei"
Else
lblWarning.Text = ""
End If
End If
End If
Next
End Sub
@@ -127,10 +163,11 @@ Public Class frmUeberstundenauszahlen
timas.getTimeAccounts(startdate, enddate, MA.mit_timasId, timeaccountdt, dtResult)
If dtResult.Rows.Count < 1 Then
MsgBox("Für den gewählten Zeitraum konnten keine Stunden ermittelt werden!")
lblWarning.Text = "Für den gewählten Zeitraum konnten keine Stunden ermittelt werden!"
Panel1.Enabled = False
Exit Sub
Else
lblWarning.Text = ""
Panel1.Enabled = True
End If
@@ -438,7 +475,7 @@ Public Class frmUeberstundenauszahlen
Dim sum100, sum50, sum0, gesamt As Double
sum100 = RoundOfDigits(CDbl(txtAusz100.Text) * 100 / 200, 2) 'Übergabe in ZE-System als heruntergerechnete 100%ige bzw. 50%ige ÜS!
sum50 = RoundOfDigits(CDbl(txtAusz50.Text) * 100 / 150, 2)
sum50 = RoundOfDigits(CDbl(txtAusz50.Text) * 100 / faktorSamstagsarbeit, 2)
sum0 = RoundOfDigits(CDbl(txtAusz50vonSaldo.Text) * 100 / faktorTeilzeit, 2)
gesamt = IIf(overwrittenSum > 0, overwrittenSum, CDbl(txtAusz.Text))
@@ -494,6 +531,7 @@ Public Class frmUeberstundenauszahlen
ues.uest_ignoreLimit = Not maxUberstundenpruefung
ues.uest_maxUE = CDbl(txtSummeAuszb.Text)
ues.uest_paidout_sum = gesamt
ues.uest_isParttime = cbxTeilzeit.Checked
If istTeilzeit Then
ues.uest_25 = sum0
@@ -683,9 +721,9 @@ Public Class frmUeberstundenauszahlen
If stundenlfdSaldo <= 0 Then Button1.Enabled = False
If (stunden100bereitsausbezahl + stunden50bereitsausbezahlt + stunden25bereitsausbezahlt) > 0 Then
txtSummeAuszb.Text = stundenlfdSaldo
Else
txtSummeAuszb.Text = stundenlfdSaldobere
Else
txtSummeAuszb.Text = stundenlfdSaldo
End If