Maths dumbass
| From: | Ryan A | Date: | Sat, 27 Dec 2003 04:08:51 +0000 |
| Subject: | Maths dumbass | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-173352@lists.php.net to get a copy of this message | ||
Hi guys,
Its not 5am here and have started on a blasted problem where am feeling like
a maths dumbass...the old noodle is just not working, any help appreciated.
Problem, selling 4 packages rangeing from $27.50-$99.00 a month...the
subscriber can change anytime he wants from one package to the other
(upgrade), if so I have to calculate how many days he has is with us and
then he just pays the balance...
eg:
if he is on the smallest package ($27.50)
and the month has 30 days,
and 15 days are up,
(means 50% is used and that translates to 13.75$)
and he wants to upgrade to the next higher package ($43.00) he just has to
pay $29.25
Can you give me a clue on how to calculate that depending on the 12 months
and 4 packages?
Thanks in advance,
-Ryan