Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 5:19 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Rate Card Expiration Date Bug
PostPosted: Thu Mar 28, 2013 4:16 am 
Offline

Joined: Thu Apr 21, 2011 5:22 pm
Posts: 106
After upgrade to 2.0, rate cards are entered with expiration date of " 0000-0000.000". This causes the rate engine not to see the rate card thus giving a rate not found error. To fix this, one has to manually enter an expiration date in the future.

Is there a fix where a2billing automatically inputs the correct date?


Top
 Profile  
 
 Post subject: Re: Rate Card Expiration Date Bug
PostPosted: Wed Apr 03, 2013 12:14 pm 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
I think I've just realized what's causing this. My guess is it only affects 32 bit platforms.

A2Billing is trying to add 25 years to the current date to generate the experation date.

19 January 2038 is the last date that 32 bit Linux can represent because of the way the date is stored. This means since 19/1/2013 A2Billing has been generating an invalid date - which results in the 0000-00-00

A simple fix could be to reduce the default expiry dates. I've not looked at the code to see where this is done.


Last edited by bucasia on Wed Apr 03, 2013 12:49 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Rate Card Expiration Date Bug
PostPosted: Wed Apr 03, 2013 12:41 pm 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
It looks like the default 25 years is added to the current date at line 94 here (version 2.0.1) -

admin/Public/form_data/FG_var_tariffplan.inc

Code:
     92 if ($form_action=="ask-add"){
     93         $begin_date = date("Y");
     94         $begin_date_plus = date("Y")+25;
     95         $end_date = date("-m-d H:i:s");
     96         $comp_date = "value='".$begin_date.$end_date."'";
     97         $comp_date_plus = "value='".$begin_date_plus.$end_date."'";
     98 }


Top
 Profile  
 
 Post subject: Re: Rate Card Expiration Date Bug
PostPosted: Wed Apr 03, 2013 4:36 pm 
Offline

Joined: Thu Apr 21, 2011 5:22 pm
Posts: 106
Thanks. Will test to confirm fix.


Top
 Profile  
 
 Post subject: Re: Rate Card Expiration Date Bug
PostPosted: Thu Apr 04, 2013 3:28 am 
Offline

Joined: Fri Mar 01, 2013 8:53 pm
Posts: 39
thats true, but that happens to me with a2billing 1.9.4


Top
 Profile  
 
 Post subject: Re: Rate Card Expiration Date Bug
PostPosted: Thu May 09, 2013 4:08 am 
Offline

Joined: Thu May 09, 2013 4:05 am
Posts: 1
sanjap wrote:
After upgrade to 2.0, rate cards are entered with expiration date of " 0000-0000.000". This causes the rate engine not to see the rate card thus giving a rate not found error. To fix this, one has to manually enter an expiration date in the future.



This also happens in 2.0.1 with DID creation...


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 18 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group