hi, im creating a payroll system for my project and part of it is a time calculator and my problem is I really don't know how to deduct late. it should work this way "for every minute of late, their daily rate will be deducted 1.16"
what i did is i created a textbox that will contain their monthly rate and it is save in a database and I created another textbox that will contain the number of days in a month then ill just devide the of days in a month to their monthly rate to get their daily rate. for the time calculator i have created 8 textboxes. textbox1 is for AM IN, textbox2 is for OUT, textbox3 is for PM IN, textbox4 is for PM OUT, textbox5 is for the total working hours in the morning, textbox6 is for the total working hours in the afternoon, textbox7 is for the total working hours in a day and textbox8 for their salary at that day.
Dim d1 As DateTime
Dim d2 As DateTime
Dim ts11 As TimeSpan
Dim ts22 As TimeSpan
Dim tsfinal1 As TimeSpan
TextBox9.Text = Val(SalTextBox.Text) / Val(TextBox8.Text)
d1 = DateTime.Parse("1/1/2012 " + Me.TextBox1.Text.Trim)
d2 = DateTime.Parse("1/1/2012 " + Me.TextBox2.Text.Trim)
ts11 = d2 - d1
TextBox5.Text = (ts11.ToString)
d1 = DateTime.Parse("1/1/2012 " + Me.TextBox3.Text.Trim)
d2 = DateTime.Parse("1/1/2012 " + Me.TextBox4.Text.Trim)
ts22 = d2 - d1
TextBox7.Text = (ts22.ToString)
tsFinal1 = ts11 + ts22
TextBox7.Text = tsfinal1.ToString`
please help me on how will i calculate their late and how will i deduct it to their daily rate.
every help will be very much appreciated.