Yes. It would perfectly suit your requirement.
thanks and regards,
vinoth s
________________________________
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Carolyn Green
Sent: Wednesday, September 10, 2008 11:06 AM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] drools appropriate for calculating uk tax
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
________________________________
Get Hotmail on your mobile from Vodafone Try it Now
<
http://clk.atdmt.com/UKM/go/111354028/direct/01/>