[rules-users] drools appropriate for calculating uk tax

Vinoth Kumar Somasundaram vinoth.k at technologiaworld.com
Wed Sep 10 01:56:39 EDT 2008


Yes. It would perfectly suit your requirement.

 

thanks and regards,

vinoth s 

________________________________

From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Carolyn Green
Sent: Wednesday, September 10, 2008 11:06 AM
To: rules-users at 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/> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080910/d608faa3/attachment.html 


More information about the rules-users mailing list