<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
I'm currently studying uk tax, and I was wondering whether drools would be suitable for calculating an individuals tax liability.<br><br>There are lots of rules such as:<br><br>if age &lt; 65<br>then <br>&nbsp; allowance = 5225<br>if age &gt;= 65 and age &lt; 75 <br>then <br>&nbsp; allowance = 7550 - ((net income - 20,900) * 0.5)<br>&nbsp; if allowance &lt; 5225<br>&nbsp;&nbsp;&nbsp; then allowance = 5225<br>if age &gt;= 75 <br>then <br>&nbsp; allowance =7690&nbsp; - ((net income - 20,900) * 0.5)<br>&nbsp; if allowance &lt; 5225<br>
&nbsp;&nbsp;&nbsp; then allowance = 5225<br><br>if 1=1 (run always)<br>&nbsp; // calculate taxableOtherIncome (earnings, trading profits)<br>&nbsp; taxableOtherIncome = otherIncome - allowance<br>&nbsp; allowanceUsed = taxableOtherIncome - otherIncome<br>&nbsp; allowanceRemaining = allowance - allowanceUsed<br>&nbsp; allowance = allowanceRemaining<br><br>&nbsp; // calculate taxableSavingsIncome<br>
&nbsp; taxableSavingsIncome = savingsIncome - allowance<br>
&nbsp; allowanceUsed = taxableSavingsIncome - savingsIncome<br>
&nbsp; allowanceRemaining = allowance - allowanceUsed<br>
&nbsp; allowance = allowanceRemaining<br><br>&nbsp; // calculate taxableDividendIncome<br>&nbsp; ...<br><br>There seems to be a fairly strict order to some of the calculations.&nbsp; I.e. allowance should be deducted from otherIncome before savingsIncome or dividend income.<br><br>Is drools suitable for this type of application?<br><br>Many thanks,<br><br>Chris<br><br /><hr />Get Hotmail on your mobile from Vodafone  <a href='http://clk.atdmt.com/UKM/go/111354028/direct/01/' target='_new'>Try it Now</a></body>
</html>