Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Apr 16, 2024 6:02 am
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: a2billing_batch_process.php possible bug?
PostPosted: Mon Jul 25, 2011 3:45 pm 
Offline

Joined: Wed Mar 10, 2010 5:42 pm
Posts: 47
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


Top
 Profile  
 
 Post subject: Re: a2billing_batch_process.php possible bug?
PostPosted: Thu Jul 28, 2011 8:03 pm 
Offline

Joined: Wed Mar 10, 2010 5:42 pm
Posts: 47
Hello....please anyone...tell me if I am wrong....

Regards!
Fernando


Top
 Profile  
 
 Post subject: Re: a2billing_batch_process.php possible bug?
PostPosted: Fri Jul 29, 2011 3:59 pm 
Offline

Joined: Wed Mar 10, 2010 5:42 pm
Posts: 47
In addition, I propose to include the clause "AND status=1" in the sql query to avoid applying the recurr service to expired cards. Is this OK?


Regards!
Fernando


Top
 Profile  
 
 Post subject: Re: a2billing_batch_process.php possible bug?
PostPosted: Mon Aug 29, 2011 10:38 pm 
Offline

Joined: Mon Apr 21, 2008 1:58 pm
Posts: 16
you are wrong
this script must be executed every day
so it check state only 1 day before.
ur script can have more issues.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group