This commit is contained in:
2024-03-01 15:01:01 +01:00
parent 3211e1e60f
commit 8e74638768
3 changed files with 159 additions and 37 deletions

View File

@@ -22,7 +22,6 @@ 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()
@@ -53,6 +52,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.txtAuszManuell = New System.Windows.Forms.TextBox()
Me.cx25 = New System.Windows.Forms.CheckBox()
Me.cbx50 = New System.Windows.Forms.CheckBox()
Me.cbx100 = New System.Windows.Forms.CheckBox()
@@ -61,13 +61,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.txtAuszManuell = New System.Windows.Forms.TextBox()
Me.dgvUeberstunden = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.dgvUeberstunden = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.picShow = New System.Windows.Forms.PictureBox()
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()
Me.SuspendLayout()
'
'dtpMonat
@@ -171,7 +172,7 @@ Partial Class frmUeberstundenauszahlen
'Button1
'
Me.Button1.DialogResult = System.Windows.Forms.DialogResult.OK
Me.Button1.Location = New System.Drawing.Point(341, 170)
Me.Button1.Location = New System.Drawing.Point(464, 170)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(87, 30)
Me.Button1.TabIndex = 12
@@ -261,7 +262,7 @@ Partial Class frmUeberstundenauszahlen
'
'txtberAusz50
'
Me.txtberAusz50.Location = New System.Drawing.Point(311, 69)
Me.txtberAusz50.Location = New System.Drawing.Point(309, 69)
Me.txtberAusz50.Name = "txtberAusz50"
Me.txtberAusz50.ReadOnly = True
Me.txtberAusz50.Size = New System.Drawing.Size(54, 20)
@@ -270,7 +271,7 @@ Partial Class frmUeberstundenauszahlen
'
'txtberAusz100
'
Me.txtberAusz100.Location = New System.Drawing.Point(311, 27)
Me.txtberAusz100.Location = New System.Drawing.Point(309, 27)
Me.txtberAusz100.Name = "txtberAusz100"
Me.txtberAusz100.ReadOnly = True
Me.txtberAusz100.Size = New System.Drawing.Size(54, 20)
@@ -280,7 +281,7 @@ Partial Class frmUeberstundenauszahlen
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(309, 11)
Me.Label1.Location = New System.Drawing.Point(306, 11)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(92, 13)
Me.Label1.TabIndex = 25
@@ -308,7 +309,7 @@ Partial Class frmUeberstundenauszahlen
'
Me.picDel.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.del
Me.picDel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.picDel.Location = New System.Drawing.Point(407, 11)
Me.picDel.Location = New System.Drawing.Point(404, 11)
Me.picDel.Name = "picDel"
Me.picDel.Size = New System.Drawing.Size(21, 16)
Me.picDel.TabIndex = 28
@@ -325,12 +326,14 @@ Partial Class frmUeberstundenauszahlen
'
'Panel1
'
Me.Panel1.Controls.Add(Me.picShow)
Me.Panel1.Controls.Add(Me.txtAuszManuell)
Me.Panel1.Controls.Add(Me.cx25)
Me.Panel1.Controls.Add(Me.cbx50)
Me.Panel1.Controls.Add(Me.cbx100)
Me.Panel1.Controls.Add(Me.txtberAusz25)
Me.Panel1.Controls.Add(Me.cbxoverwrite)
Me.Panel1.Controls.Add(Me.dgvUeberstunden)
Me.Panel1.Controls.Add(Me.Label8)
Me.Panel1.Controls.Add(Me.txt50x1)
Me.Panel1.Controls.Add(Me.Label2)
@@ -355,9 +358,18 @@ Partial Class frmUeberstundenauszahlen
Me.Panel1.Controls.Add(Me.txtAusz50)
Me.Panel1.Location = New System.Drawing.Point(15, 67)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(447, 235)
Me.Panel1.Size = New System.Drawing.Size(619, 235)
Me.Panel1.TabIndex = 30
'
'txtAuszManuell
'
Me.txtAuszManuell.Location = New System.Drawing.Point(272, 196)
Me.txtAuszManuell.Name = "txtAuszManuell"
Me.txtAuszManuell.Size = New System.Drawing.Size(54, 20)
Me.txtAuszManuell.TabIndex = 37
Me.txtAuszManuell.Text = "0"
Me.txtAuszManuell.Visible = False
'
'cx25
'
Me.cx25.AutoSize = True
@@ -387,7 +399,7 @@ Partial Class frmUeberstundenauszahlen
'
'txtberAusz25
'
Me.txtberAusz25.Location = New System.Drawing.Point(311, 108)
Me.txtberAusz25.Location = New System.Drawing.Point(309, 108)
Me.txtberAusz25.Name = "txtberAusz25"
Me.txtberAusz25.ReadOnly = True
Me.txtberAusz25.Size = New System.Drawing.Size(54, 20)
@@ -435,15 +447,6 @@ Partial Class frmUeberstundenauszahlen
Me.cbxTeilzeit.Text = "Teilzeit"
Me.cbxTeilzeit.UseVisualStyleBackColor = True
'
'txtAuszManuell
'
Me.txtAuszManuell.Location = New System.Drawing.Point(272, 196)
Me.txtAuszManuell.Name = "txtAuszManuell"
Me.txtAuszManuell.Size = New System.Drawing.Size(54, 20)
Me.txtAuszManuell.TabIndex = 37
Me.txtAuszManuell.Text = "0"
Me.txtAuszManuell.Visible = False
'
'dgvUeberstunden
'
Me.dgvUeberstunden.AKTUALISIERUNGS_INTERVALL = -1
@@ -451,10 +454,10 @@ Partial Class frmUeberstundenauszahlen
Me.dgvUeberstunden.AllowUserToDeleteRows = False
Me.dgvUeberstunden.BackgroundColor = System.Drawing.Color.White
Me.dgvUeberstunden.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvUeberstunden.Location = New System.Drawing.Point(381, 12)
Me.dgvUeberstunden.Location = New System.Drawing.Point(381, 30)
Me.dgvUeberstunden.Name = "dgvUeberstunden"
Me.dgvUeberstunden.ReadOnly = True
Me.dgvUeberstunden.Size = New System.Drawing.Size(32, 20)
Me.dgvUeberstunden.Size = New System.Drawing.Size(227, 98)
Me.dgvUeberstunden.TabIndex = 13
Me.dgvUeberstunden.Visible = False
'
@@ -468,18 +471,28 @@ Partial Class frmUeberstundenauszahlen
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
'
'frmUeberstundenauszahlen
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(463, 337)
Me.ClientSize = New System.Drawing.Size(646, 337)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.cbxTeilzeit)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.lblBis)
Me.Controls.Add(Me.dtpBis)
Me.Controls.Add(Me.cbxabwDatum)
Me.Controls.Add(Me.dgvUeberstunden)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.lblMA)
Me.Controls.Add(Me.lblMonat)
@@ -492,6 +505,7 @@ Partial Class frmUeberstundenauszahlen
Me.Panel1.PerformLayout()
CType(Me.dgvUeberstunden, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.picShow, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -537,4 +551,5 @@ Partial Class frmUeberstundenauszahlen
Friend WithEvents cbx100 As Windows.Forms.CheckBox
Friend WithEvents txtAuszManuell As Windows.Forms.TextBox
Friend WithEvents PictureBox1 As Windows.Forms.PictureBox
Friend WithEvents picShow As Windows.Forms.PictureBox
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/gUDmPP8usTo0wAAAAlwSFlzAAALEgAACxIB0t1+/AAAHeBJREFUeF7t2VtuI0nT
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEQAACxEBf2RfkQAAHeBJREFUeF7t2VtuI0nT
bdu/VaeNp9ffViEzoQunJF4iyAi38TBeHJUSudzMl4D6v//9738AwDB5CACsLQ8BgLXlIQCwtjwEANaW
hwDA2vIQAFhbHgIAa8tDAGBteQgArC0PAYC15SEAsLY8BADWlocAwNryEABYWx4CAGvLQwBgbXkIAKwt
DwGAteUhALC2PAQA1paHAMDa8hAAWFseAgBry0MAYG15CACsLQ8BgLXlIQCwtjwEANaWhwDA2vIQAFhb

View File

@@ -1,16 +1,20 @@

Imports System.Drawing
Imports System.Text
Imports System.Threading
Imports System.Windows.Forms
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.ToolTip
Public Class frmUeberstundenauszahlen
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim MA As cMitarbeiter = Nothing
Dim timas As cTimasAPI = New cTimasAPI
Dim dt As New DataTable
Dim timeaccountdt As New DataTable
Dim dtResult As New DataTable
'Dim dtbereitsausgezahlteUE As New DataTable
Dim tag As cFeiertage
Dim auszahlugsdatum As New Date
Dim maxUberstundenpruefung As Boolean = True
@@ -30,9 +34,44 @@ Public Class frmUeberstundenauszahlen
Label7.Text = MA.mit_vname & " " & MA.mit_nname
timas.getTimeaccountList(dt)
'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 = "info like '%zuschlag%' Or name = 'Mehrarbeit' Or name like 'Überstunden%' Or info like 'Auszahlungskonto%' Or name like '%01-Lfd Saldo%'"
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"
timeaccountdt = dv.ToTable
getUeberstunden(False)
@@ -73,6 +112,15 @@ Public Class frmUeberstundenauszahlen
startdate = (dtpMonat.Value)
enddate = (dtpBis.Value)
auszahlugsdatum = tag.GetLastyDayYInxMonth(enddate.DayOfWeek, enddate.Month, enddate.Year, True) 'Endmonat des Enddates
'Dim bereitsgezahlteueberstunden = "select sum(isnull(uest_100,0)) as ue100 , sum(isnull(uest_50,0)) as ue50, sum(isnull(uest_25,0)) as ue25, sum(isnull(uest_0,0)) as ue0
'FROM [ADMIN].[dbo].[tblUeberstunden]
'where uest_date between '" & startdate & "' and '" & enddate & "' and uest_deleted = 0 and uest_maId = " & MA.mit_id & "
'group by uest_maId"
'dtbereitsausgezahlteUE.Clear()
'dtbereitsausgezahlteUE = SQL.loadDgvBySql(bereitsgezahlteueberstunden, "ADMIN", 100, True)
Else
startdate = tag.GetFirstyDayYInxMonth(DateTime.Parse(dtpMonat.Value).DayOfWeek, DateTime.Parse(dtpMonat.Value).Month, DateTime.Parse(dtpMonat.Value).Year, True)
enddate = tag.GetLastyDayYInxMonth(DateTime.Parse(dtpMonat.Value).DayOfWeek, DateTime.Parse(dtpMonat.Value).Month, DateTime.Parse(dtpMonat.Value).Year, True)
@@ -89,9 +137,8 @@ Public Class frmUeberstundenauszahlen
Panel1.Enabled = True
End If
Dim dt = getUeberstunden(timeaccountdt, dtResult)
dt = getUeberstunden(timeaccountdt, dtResult)
fillFields(dt)
dgvUeberstunden.DataSource = dt
End If
End Sub
@@ -119,10 +166,10 @@ Public Class frmUeberstundenauszahlen
dtmerged.AcceptChanges()
End If
If (dtmerged.Columns.Contains("date")) Then
dtmerged.Columns.Remove("date")
dtmerged.AcceptChanges()
End If
'If (dtmerged.Columns.Contains("date")) Then
' dtmerged.Columns.Remove("date")
' dtmerged.AcceptChanges()
'End If
Dim groups = dtmerged.AsEnumerable().
@@ -159,6 +206,44 @@ Public Class frmUeberstundenauszahlen
getUeberstunden(cbxabwDatum.Checked)
End Sub
Private Sub picShow_Click(sender As Object, e As EventArgs) Handles picShow.Click
Try
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim frm As New Form
Dim dgv As New DataGridView()
If dt.Rows.Count = 0 Then
MsgBox("keine Daten vorhanden!")
Exit Sub
End If
Dim dv = New DataView(dt)
dv.RowFilter = "accountid = 1550 Or accountid = 1551 Or accountid = 1553"
dgv.DataSource = dv.ToTable
If dgv IsNot Nothing Then
frm.Size = New Size(500, 500)
dgv.Size = New Size(frm.Size.Width, frm.Size.Height)
dgv.Dock = DockStyle.Fill
dgv.Anchor = AnchorStyles.Left
dgv.Anchor = AnchorStyles.Top
dgv.ReadOnly = True
frm.Controls.Add(dgv)
frm.StartPosition = FormStartPosition.CenterScreen
frm.ShowDialog()
End If
Catch ex As System.Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Private Sub txtAusz100_TextChanged(sender As Object, e As EventArgs) Handles txtAusz100.TextChanged, txtAusz50.TextChanged, txtAusz50vonSaldo.TextChanged
overwrittenSum = 0
@@ -279,14 +364,32 @@ Public Class frmUeberstundenauszahlen
picDel.Visible = True
Button1.Enabled = False
txtAusz.Enabled = False
picShow.Visible = True
Else
Button1.Enabled = True
txtAusz.Enabled = True
picShow.Visible = False
End If
'If cbxabwDatum.Checked AndAlso dtbereitsausgezahlteUE IsNot Nothing Then
' 'If dtbereitsausgezahlteUE.Rows.Count > 0 Then
' ' txtberAusz100ZR.Text = CDbl(dtbereitsausgezahlteUE.Rows(0).Item("ue100").ToString)
' ' If istTeilzeit Then
' ' txtberAusz50ZR.Text = CDbl(dtbereitsausgezahlteUE.Rows(0).Item("ue50").ToString) + CDbl(dtbereitsausgezahlteUE.Rows(0).Item("ue0").ToString)
' ' Else
' ' txtberAusz25ZR.Text = CDbl(dtbereitsausgezahlteUE.Rows(0).Item("ue25").ToString) + CDbl(dtbereitsausgezahlteUE.Rows(0).Item("ue0").ToString)
' ' End If
' 'End If
'End If
calxMaxauszahlbar()
End If
End If
End Sub
@@ -378,7 +481,7 @@ Public Class frmUeberstundenauszahlen
ues.uest_25 = sum0
Else
ues.uest_0 = sum0
End If
End If
Dim info As String = ""
@@ -436,8 +539,8 @@ Public Class frmUeberstundenauszahlen
If timas.deleteTimeAccounts(auszahlugsdatum, auszahlugsdatum, MA.mit_timasId, dtdeleteEntries) Then
Dim ues As New cUeberstunden(MA.mit_id, auszahlugsdatum.ToString("dd/MM/yyyy"))
ues.uest_deleted = True
ues.uest_lastChanged = Now()
ues.uest_systemuser = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
ues.uest_lastChanged = Now()
ues.uest_systemuser = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
ues.SAVE()
MsgBox("Erfolgreich aus Timas zurückgesetzt!")
@@ -562,8 +665,12 @@ Public Class frmUeberstundenauszahlen
If stundenlfdSaldo <= 0 Then Button1.Enabled = False
'txtSummeAuszb.Text = stundenlfdSaldo
txtSummeAuszb.Text = stundenlfdSaldobere
If (stunden100bereitsausbezahl + stunden50bereitsausbezahlt + stunden25bereitsausbezahlt) > 0 Then
txtSummeAuszb.Text = stundenlfdSaldo
Else
txtSummeAuszb.Text = stundenlfdSaldobere
End If
End Sub