Reputation: 913
I have to create a stored proc to calculate interest.
--Sending these parameters to stored proc
@rec_date date,
@amount_paid numeric(18,2)
The rules are below, there are more rules but I can handle the other ones if I can get this
Interest is calculated at a rate of 2% per month using a 30-day month on a pro-rata basis (not compounded).
The @rec_date
is used to determine the days between that date and today
Interest is calculated based on the parameter @amount_paid
If calculated interest > 5.00
then interest = calculate interest or else interest = 0
Upvotes: 0
Views: 2031