Welcome! Log In Create A New Profile

Advanced

Calcualte number of Payments based on Membership

Posted by Joel 
Hi - I could really use some help on this one -

I have a membership that could be days, weeks, months or years. So i.e 3 days, 5 weeks, 1 year, etc.

Then I have Payment Installment Plan Options of: Single, Weekly, 2 weeks, monthly, every 2 months, every 3 months, every 4 months and every 6 months.

I need a routine that will calculate the total number of payments from that info. Certainly, No matter the Membership length, a Payment Option of "Single" would = 1 payment.

But then there are all the other permutations, and that has me stumped. I not really experienced as a programmer - this kind of scenario has got to be fairly common. Anyone have any ideas or even a resource to go look at?

Thanks!

J
Al
Re: Calcualte number of Payments based on Membership
March 29, 2009 12:28AM
Hello Joel

You could reduce the number of payment permutations by only offering those that are eligible. This will eliminate payment options that cannot possible apply .e.g 4monthly payments for a 2 week membership

e.g
membership measured in days can only have a single payment
membership measured in weeks can only have single or weekly payment
membership measured in months < 2 can only have single or weekly
membership measured in months >= 2 but <=3 can only have single, weekly, monthly

By testing the membership period you could fill a combo box of payment methods with only those that could possible apply.

Once you have three parts of the equation, length of membership, units of membership (days,weeks etc) and the payment unit of measure(single, weekly etc) you can calculate the number of payments.

A really simple solution would be to just ask the member how many payments they want to make smiling smiley

Regards
Al



Thanks Al-

You're right - I realized that there are too many options, I'll take a much simpler approach. A friend of mine suggested converting everything into days to do calculations - that makes things much simpler -

Thanks!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: