1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 劳务报酬个人所得税JAVA计算

劳务报酬个人所得税JAVA计算

时间:2020-04-13 00:08:03

相关推荐

劳务报酬个人所得税JAVA计算

/*** 劳务报酬个人所得税计算器* 单位:分* @param totalIncome 总收入* @return 应缴税额*/public static int getTax(int totalIncome) {//税率double taxRate;//速算扣除数int quickDeducData;//应纳税所得额double taxIncome;//应缴税额double tax;if (totalIncome < 80000) {tax = 0;} else {if (totalIncome <= 400000) {taxIncome = totalIncome - 80000;} else {taxIncome = totalIncome * (1 - 0.2);}if (taxIncome <= 2000000) {taxRate = 0.2;quickDeducData = 0;} else if (taxIncome <= 5000000) {taxRate = 0.3;quickDeducData = 200000;} else {taxRate = 0.4;quickDeducData = 700000;}tax = taxIncome * taxRate - quickDeducData;}return getInt(tax);}protected static int getInt(double number) {if (number == 0) {return 0;}BigDecimal bd = new BigDecimal(number).setScale(0, BigDecimal.ROUND_HALF_UP);return bd.intValue();}

校验是否正确

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。