[rules-users] Help writing DRL

niraj manandhar regniraj at gmail.com
Sun Jan 25 03:37:56 EST 2009


I have following condition
buying 3 pen gives 1 free pencil
buying 5 pen gives 1 free rubber
buying 10 pen gives 1 free chocolate


so if some one buys 19 pen then his free items will be

1 chocolate due to 10 pen
1 rubber due to remaining (19-10) pen
1 pencil due to remaining (9-5) pen

I have objects of sales_details where trnqty is the quantity purchased how
to calculate the free items using drl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090125/28e09786/attachment.html 


More information about the rules-users mailing list