如何计算个人所得税?可以参考的11个标准计算工资的步骤,不足之处请补充
2009-05-03 11:34 通用C#系统架构 阅读(2793) 评论(16) 编辑 收藏 举报希望能给大家带来帮助,请只做参考用,主要是请看11个计算的步骤注释说明。
1 /// <summary>
2 /// 计算工资算法
3 /// </summary>
4 /// <param name="departmentID">部门主键</param>
5 /// <param name="targetYearMonth">目标年月</param>
6 /// <returns>影响的行数</returns>
7 public int Calculate(String departmentID, String targetYearMonth)
8 {
9 int returnValue = 0;
10 BaseParameterDao parameterDao = new BaseParameterDao(this.DbHelper, this.UserInfo);
11 String qiZhengE = parameterDao.GetParameter("System", "SalaryPersonalIncomeTax", "QiZhengE");
12 String year = targetYearMonth.Substring(0, 4);
13 String month = targetYearMonth.Substring(5);
14 DataTable dataTable = this.SearchByDepartment(departmentID, year, month, false);
15 // 01 检查个人所得税起征额是否为空的?
16 this.CheckPersonalIncomeTax(dataTable, qiZhengE);
17 // 02 税前应加项合计
18 this.GetSum(dataTable, "税前应加项目", BaseSalaryTable.FieldShuiQianYingJiaXiang);
19 // 03 税前应扣项合计
20 this.GetSum(dataTable, "税前应扣项目", BaseSalaryTable.FieldShuiQianYingKouXiang);
21 // 04 基金补贴保险类合计,例如三金
22 this.GetSum(dataTable, "基金保险补贴类", BaseSalaryTable.FieldJiJinBaoXianBuTieLei);
23 // 05 纳税项合计[记税工资,是否纳税项目来计算]
24 this.GetSalaryTax(dataTable);
25 // 06 计算个人所得税相关数据
26 this.GetPersonalIncomeTax(dataTable);
27 // 07 计算应发工资
28 this.GetSalary(dataTable);
29 // 08 计算税后应扣项目
30 this.GetSum(dataTable, "税后代加项目", BaseSalaryTable.FieldShuiHouDaiJiaXiang);
31 // 09 计算税后应加项目
32 this.GetSum(dataTable, "税后代扣项目", BaseSalaryTable.FieldShuiHouDaiKouXiang);
33 // 10 计算实发工资
34 this.GetRealSalary(dataTable);
35 // 11 将计算结果保存到数据库
36 BaseSalaryEntity salaryEntity = null;
37 BaseSalaryDao salaryDao = new BaseSalaryDao(this.DbHelper, this.UserInfo);
38 foreach (DataRow dataRow in dataTable.Rows)
39 {
40 if (dataRow.RowState == DataRowState.Modified)
41 {
42 salaryEntity = new BaseSalaryEntity(dataRow);
43 returnValue += salaryDao.UpdateEntity(salaryEntity);
44 }
45 }
46 return returnValue;
47 }
48
2 /// 计算工资算法
3 /// </summary>
4 /// <param name="departmentID">部门主键</param>
5 /// <param name="targetYearMonth">目标年月</param>
6 /// <returns>影响的行数</returns>
7 public int Calculate(String departmentID, String targetYearMonth)
8 {
9 int returnValue = 0;
10 BaseParameterDao parameterDao = new BaseParameterDao(this.DbHelper, this.UserInfo);
11 String qiZhengE = parameterDao.GetParameter("System", "SalaryPersonalIncomeTax", "QiZhengE");
12 String year = targetYearMonth.Substring(0, 4);
13 String month = targetYearMonth.Substring(5);
14 DataTable dataTable = this.SearchByDepartment(departmentID, year, month, false);
15 // 01 检查个人所得税起征额是否为空的?
16 this.CheckPersonalIncomeTax(dataTable, qiZhengE);
17 // 02 税前应加项合计
18 this.GetSum(dataTable, "税前应加项目", BaseSalaryTable.FieldShuiQianYingJiaXiang);
19 // 03 税前应扣项合计
20 this.GetSum(dataTable, "税前应扣项目", BaseSalaryTable.FieldShuiQianYingKouXiang);
21 // 04 基金补贴保险类合计,例如三金
22 this.GetSum(dataTable, "基金保险补贴类", BaseSalaryTable.FieldJiJinBaoXianBuTieLei);
23 // 05 纳税项合计[记税工资,是否纳税项目来计算]
24 this.GetSalaryTax(dataTable);
25 // 06 计算个人所得税相关数据
26 this.GetPersonalIncomeTax(dataTable);
27 // 07 计算应发工资
28 this.GetSalary(dataTable);
29 // 08 计算税后应扣项目
30 this.GetSum(dataTable, "税后代加项目", BaseSalaryTable.FieldShuiHouDaiJiaXiang);
31 // 09 计算税后应加项目
32 this.GetSum(dataTable, "税后代扣项目", BaseSalaryTable.FieldShuiHouDaiKouXiang);
33 // 10 计算实发工资
34 this.GetRealSalary(dataTable);
35 // 11 将计算结果保存到数据库
36 BaseSalaryEntity salaryEntity = null;
37 BaseSalaryDao salaryDao = new BaseSalaryDao(this.DbHelper, this.UserInfo);
38 foreach (DataRow dataRow in dataTable.Rows)
39 {
40 if (dataRow.RowState == DataRowState.Modified)
41 {
42 salaryEntity = new BaseSalaryEntity(dataRow);
43 returnValue += salaryDao.UpdateEntity(salaryEntity);
44 }
45 }
46 return returnValue;
47 }
48
将权限管理、工作流管理做到我能力的极致,一个人只能做好那么很少的几件事情。