I am thinking that it should only subtract the remaining amount.
jay
yes, this is my idea!
for example you set 60 days for expiration time. when the user uses the promotion code the value is saved in a record, and in another record is saved today+60days (expiration date)
When an user buy a premium ad we have a code like:
if user promo_reward_amount >0
{
if expiration date >=today
{
if promo_reward_amount > premium cost
promo_reward_amount - premum cost
else
{
if promo_reward_amount = premium cost
{
promo_reward_amount - premum cost
expiration date == null
}
else
difference= premum cost - promo_reward_amount
promo_reward_amount==0
user f_amount - difference
}
}
else
promo_reward_amount==0
expiration date == null
(so the user can use a new promotion code)
}
else
user f_amount - premium cost