Good Evening to all Istoryans na mga gahig VB.net
I don't know if napost na ba ni sa laing thread, pakitangtang lang ko mods if naa na ning post nako sa lain thanks.
HTML Code:
Public Class Payroll_mini
Private Sub Payroll_mini_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.cboStatus.Items.Add("Single")
Me.cboStatus.Items.Add("Married")
Me.cboStatus.Items.Add("Single Parent")
Me.cboPstn.Items.Add("IT")
Me.cboPstn.Items.Add("HR")
Me.cboPstn.Items.Add("Staff")
End Sub
Private Sub cboPstn_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboPstn.SelectedIndexChanged
Select Case cboPstn.SelectedItem.ToString
Case "IT" : txtSlry.Text = "PhP35000"
Case "HR" : txtSlry.Text = "PhP28000"
Case "Staff" : txtSlry.Text = "PhP20000"
End Select
End Sub
Private Sub btnCmpt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCmpt.Click
compute()
End Sub
Private Sub compute()
'Inputs
Dim inputRWHrs As Double = Me.txtRWHrs.Text
Dim inputOTWHrs As Double = Me.txtOTWHrs.Text
If inputRWHrs <= 176 And inputOTWHrs <= 30 Then
compute()
'Tax by Status
'Dim taxSingle As Double
Dim taxMarried As Double = 0.12
'Dim taxSingleParent As Double
Dim OTamount As Double
Dim taxOT As Double
'Salary by Position
Dim slryIT As Double = 35000 \ 22 \ 8
'Dim slryHR As Double
'Dim slryStff As Double
'Outputs
Dim AMS As Double
Dim Tax As Double
Dim TotalSalary As Double
OTamount = slryIT + slryIT * 0.25
AMS = inputRWHrs * slryIT + inputOTWHrs * OTamount
Me.txtAMS.Text = AMS.ToString("C")
Tax = AMS * taxMarried + OTamount * taxOT
Me.txtTax.Text = Tax.ToString("C")
TotalSalary = AMS - Tax
Me.txtTtlSlry.Text = TotalSalary.ToString("C")
Else
MessageBox.Show("That is invalid, Enter the correct parameters!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
End Sub
Private Sub status()
'Tax by Status
End Sub
End Class
Ngayo takog guideline about my recent exercises na mini payroll
sukad paning ganihang sayong buntag, mao ra jud ning akong nabuhat.
status Tax:
Single - 15%'Married - 12%'Single Parent - 10%
Salary:
IT - 35,000 /22 / 8 = 198/hr
HR - 28,000 /22 / 8 = 159/hr
Staff - 20,000 /22 / 8 = 114/hr
Hours of Work:
Regular - 100% salary (22d x 8hrs/d = 176hrs/mnth)
OT - 125% salary And 2% tax (30hrs/mnth)
Allowable OT for 1 month:
Maximum of 176hrs
Allowable OT for 1 month:
Maximum of 30hrs
Accumulated Monthly Salary:
OTamount = slryIT + slryIT * 0.25
AMS = inputRWHrs x slryIT + inputOThrs x OTamount
Tax:
tax = AMS x sttsMrrd + OTamount x taxOT
Total salary = AMS - tax
mini payroll mao ni iyang UI or windows form
gusto ta nako ig pili nako sa status(Single, Married ug Single Parent) ug position(IT, HR, Staff) maapil nako ug compute ang ilang inputs diri sa sub compute(). Kinahanglan ba na mohimo kog laing sub para sa macapture nako ang corresponding value everytime mopili kog STATUS combobox ug POSITION combobox.
Any suggestions, clues and hints is much appreciated or any recommended ebooks for to read in order to solve this problem og. Thanks in advance for the help.
P. S. Since November 14 this year pako gasugod ug tackle sa VB.net.
and sorry if naa moy walay masabtan ning akong problema, galabad na jud akong ulo mao moundang sako coding.