[rules-users] drools appropriate for calculating uk tax
Carolyn Green
carrie_green at hotmail.com
Wed Sep 10 01:35:41 EDT 2008
I'm currently studying uk tax, and I was wondering whether drools would be suitable for calculating an individuals tax liability.
There are lots of rules such as:
if age < 65
then
allowance = 5225
if age >= 65 and age < 75
then
allowance = 7550 - ((net income - 20,900) * 0.5)
if allowance < 5225
then allowance = 5225
if age >= 75
then
allowance =7690 - ((net income - 20,900) * 0.5)
if allowance < 5225
then allowance = 5225
if 1=1 (run always)
// calculate taxableOtherIncome (earnings, trading profits)
taxableOtherIncome = otherIncome - allowance
allowanceUsed = taxableOtherIncome - otherIncome
allowanceRemaining = allowance - allowanceUsed
allowance = allowanceRemaining
// calculate taxableSavingsIncome
taxableSavingsIncome = savingsIncome - allowance
allowanceUsed = taxableSavingsIncome - savingsIncome
allowanceRemaining = allowance - allowanceUsed
allowance = allowanceRemaining
// calculate taxableDividendIncome
...
There seems to be a fairly strict order to some of the calculations. I.e. allowance should be deducted from otherIncome before savingsIncome or dividend income.
Is drools suitable for this type of application?
Many thanks,
Chris
_________________________________________________________________
Discover Bird's Eye View now with Multimap from Live Search
http://clk.atdmt.com/UKM/go/111354026/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080910/f0407539/attachment.html
More information about the rules-users
mailing list