Hello people..
I want to write a rule in prolog, which basically says If a user X has not paid amount Y within 7 days then it will evaluate to payment_outstanding(X).
so far i have something like this:
debtpayment_unfulfilled(X) :- owes_money(X, Amountowed, Amountpaid, Days), Days > 7 ,Amountowed > Amountpaid.
owes_money(bob, 500, 0, 3). //bob borrowed 500 on day 3
the rule works, but the problem is the Days + 7 part, for example in the system if someone borrowed on day 3 then the clause will never evaluate to true has Days will always be 3, how can i implement this? do i have to write a seperate rule?? hope you understand what im trying to say.
thanks