我一直在计算工资变化率上的员工年度应纳税额。存储过程计算应纳税额
salary_assigned_date | salary
-------------------------------
2011-12-06 5000
2012-01-05 10000
2012-02-10 15000
2012-04-08 20000
2012-08-01 28000
现在,在几个月的方面我应纳税所得额在2012年今年应该是这样的:
我假设没有。在一个月中的天数为30.
month | taxable_amount
-----------------------------------------------
01 833.33 + 8333.33 /* Since salary has been changed
at 6th of month,
for 5 days,
taxable amount = 5000/30*5
=> 833.33
and for remaining 25 days
= 10000/30*25=> 8333.33
and same case for remaining months.*/
02 3000 + 10500
03 15000
04 4666.67 + 15333.33
05 20000
06 20000
07 20000
08 933.33 + 27066.67
09 28000
10 28000
11 28000
12 28000
我试图编写存储过程以计算应纳税额,但是我无法完成此操作。
有人可以帮忙吗?
你尝试过什么吗?请发布您的存储过程 – DevelopmentIsMyPassion 2013-03-21 14:29:28
本月第一天的分配公式是什么? – Strawberry 2013-03-21 14:34:15
@AshReva:最好不要在这里发布该代码,它的混乱和它不遵循英文日历。它基于尼泊尔日历。 – hsuk 2013-03-22 03:40:34