You are on page 1of 3

Public Class Form1

Dim DHRSTRABAJADAS As Double


Dim DHRSEXTRAS As Double
Dim DPAGOHORA As Double
Dim DTOTALREMUNERACION As Double
Dim DTOTALDESCUENTOS As Double
Dim DTOTALSUELDOBRUTO As Double
Dim DTOTALSUELDOLIQUIDO As Double
Dim DSALARIO As Double
Dim DAGUINALDO As Double
Dim DBONO As Double
Dim DPUNTUALITO As Double
Dim DAFP As Double
Dim DESSALUD As Double
Dim DFONAVI As Double
Dim DCORRELATIVO As Double
Dim DTOTALBENEFICIOS As Double
Dim DTOTALDSCTOS As Double
Dim DPAGOHORASEXTRAS As Double
Dim DNUM1 As Integer = 1

Private Sub Button1_Click(sender As Object, e As EventArgs)


Handles Button1.Click
DHRSTRABAJADAS = Val(Me.TextBox6.Text)
DPAGOHORA = Val(Me.TextBox4.Text)
DHRSEXTRAS = Val(Me.TextBox7.Text)
DSALARIO = Val(Me.TextBox12.Text)
DTOTALBENEFICIOS = Val(Me.TextBox8.Text)
DTOTALDESCUENTOS = Val(Me.TextBox9.Text)
DTOTALSUELDOLIQUIDO = Val(Me.TextBox11.Text)
DTOTALSUELDOBRUTO = Val(Me.TextBox10.Text)
DCORRELATIVO = Val(Me.TextBox5.Text)

If Me.RadioButton1.Checked Then DSALARIO = (2000) + (2000 * 0.15)


If Me.RadioButton2.Checked Then DSALARIO = (1800) + (1800 * 0.1)
If Me.RadioButton3.Checked Then DSALARIO = (2200) + (2200 * 0.2)
If Me.RadioButton4.Checked Then DSALARIO = (2500) + (2500 * 0.25)
Me.TextBox12.Text = Val(DSALARIO)

If DHRSTRABAJADAS > 192 Then


DHRSEXTRAS = DHRSTRABAJADAS - 192

Else
DHRSEXTRAS = 0

End If
Me.TextBox7.Text = Val(DHRSEXTRAS)

If CheckBox1.Checked Then
DAGUINALDO = DSALARIO * 1
Else
DAGUINALDO = 0
End If
If CheckBox2.Checked Then
DBONO = DSALARIO * 0.3
Else
DBONO = 0
End If
If CheckBox3.Checked Then
DPUNTUALITO = DSALARIO * 0.2
Else
DPUNTUALITO = 0
End If

DTOTALBENEFICIOS = DAGUINALDO + DBONO + DPUNTUALITO


Me.TextBox8.Text = Val(DTOTALBENEFICIOS)

If CheckBox4.Checked Then
DAFP = DSALARIO * 0.12
Else
DAFP = 0
End If
If CheckBox5.Checked Then
DESSALUD = DSALARIO * 0.1
Else
DESSALUD = 0
End If
If CheckBox6.Checked Then
DFONAVI = DSALARIO * 0.15
Else
DFONAVI = 0
End If

DNUM1 = DNUM1
Me.TextBox5.Text = Val(DNUM1)

DPAGOHORA = DSALARIO / 192


DPAGOHORA = Format(DPAGOHORA, "0.00")

Me.TextBox4.Text = Val(DPAGOHORA)

DPAGOHORASEXTRAS = DHRSEXTRAS * DPAGOHORA


DTOTALDESCUENTOS = DAFP + DESSALUD + DFONAVI
Me.TextBox9.Text = Val(DTOTALDESCUENTOS)

DTOTALSUELDOBRUTO = DSALARIO + DTOTALBENEFICIOS + DPAGOHORASEXTRAS


Me.TextBox10.Text = Val(DTOTALSUELDOBRUTO)

DTOTALSUELDOLIQUIDO = DTOTALSUELDOBRUTO - DTOTALDESCUENTOS


Me.TextBox11.Text = Val(DTOTALSUELDOLIQUIDO)

End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs)


Handles Button3.Click
End
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs)


Handles Button2.Click
Me.TextBox1.Clear()
Me.TextBox2.Clear()
Me.TextBox3.Clear()
Me.TextBox4.Clear()
DNUM1 = DNUM1 + 1
Me.TextBox5.Text = Val(DNUM1)
Me.TextBox6.Clear()
Me.TextBox7.Clear()
Me.TextBox8.Clear()
Me.TextBox9.Clear()
Me.TextBox10.Clear()
Me.TextBox11.Clear()
Me.TextBox12.Clear()
Me.CheckBox1.Checked = False
Me.CheckBox2.Checked = False
Me.CheckBox3.Checked = False
Me.CheckBox4.Checked = False
Me.CheckBox5.Checked = False
Me.CheckBox6.Checked = False
Me.RadioButton1.Checked = False
Me.RadioButton2.Checked = False
Me.RadioButton3.Checked = False
Me.RadioButton4.Checked = False
Me.TextBox1.Focus()

End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub
End Class

You might also like