Hello A2B Team,
Playing arround with recurring services I noticed something in a2billing_batch_process.php file. Could this be a bug?
Here is the extract (the first column indicates the line number):
Code:
155 if (($rule == 2) && ($rule_day > 0)) {
156 $filter .= " -- Apply service if card used in last y days
157 AND UNIX_TIMESTAMP(lastuse) >= UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - $oneday \n";
This $filter variable is taking into account only cards used in the last 24 hours. I think the correct sentence for line 157 should be:
Code:
157 AND UNIX_TIMESTAMP(lastuse) >= UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - $oneday * $rule_day \n";
where $rule_day represents the amount of "last y days"
Am I wrong?
Thank you!
Fernando